Skip to main content

Environment Variables

Mandatory Environment Variables

ProvenAI uses environment variables to configure the services. The environment variables are set in the .env-local file in the docker-compose directory. There are some mandatory ennvironment variables the user must create fin order for the provenAI app to operate. The user has to generate:

  • At least one LLM key. Default is openAI key.

These are presented below:

Environment VariableExample ValueDescriptionDocumentation Link
OPENAI_KEYsk-*****API key used to authenticate with the OpenAI API for AI model integration.How to get an OpenAI API key
COHERE_KEY*****API key used to authenticate with the Cohere AI model.How to get a Cohere API key
GROQ_KEY*****API key used to authenticate with the Groq AI model.How to get a Groq API key

API Ports

VariableValueDescription
DATABASE_PORT5433Port number for the PostgreSQL database service.
GENDOX_BACKEND_PORT8080Port number for the Gendox backend service.
GENDOX_FRONTEND_PORT3000Port number for the Gendox frontend application.
KEYCLOAK_HTTPS_PORT8443HTTPS port for Keycloak authentication.
KEYCLOAK_HTTP_PORT8880HTTP port for Keycloak authentication.
PROVEN_AI_BACKEND_PORT8082Port number for the Proven AI backend service.
PROVEN_AI_FRONTEND_PORT3001Port number for the Proven AI frontend application.

Spring Profiles

With this variable we set the active spring profile.

VariableValueDescription
SPRING_PROFILES_ACTIVElocal,openai-integrationSpecifies the active Spring Boot profiles for the application.

Database Configuration

Environment variables for connecting to the database.

VariableValueDescription
DATABASE_NAMEpostgresName of the database being used.
DATABASE_USERNAMEgendox_userUsername used to authenticate with the database.
DATABASE_PASSWORDrootPassword used to authenticate with the database.
DATABASE_URLjdbc:postgresql://gendox-database:5432/postgresJDBC connection ururl for the PostgreSQL database.

Gendox Core API Environment Variables

This section contains variables related to email configuration for the Gendox Core API. To enable features requiring email address like email verification and user invitation to projects you need to configure the following variables. By default these variables are not required and are commented out.

VariableExample ValueDescription
GENDOX_SPRING_EMAIL_HOST<email host>SMTP host for sending emails.
GENDOX_SPRING_EMAIL_PASSWORD*****Password for the SMTP email account.
GENDOX_SPRING_EMAIL_PORT200SMTP port for sending emails.
GENDOX_SPRING_EMAIL_USERNAME<email>Username for the SMTP email account.

External Service Keys

Lists API keys used for accessing external services, ensuring secure communication with these services.

VariableExample ValueDescription
GROQ_KEYchange_itAPI key used to authenticate with the Groq AI model.
COHERE_KEYchange_itAPI key used to authenticate with the Cohere AI model.
OPENAI_KEYsk-*****API key used to authenticate with the OpenAI API for AI model integration.
RSA_KEY_PATH****Path to the RSA private key for JWT.
PROVEN_AI_ENABLEDtrueFlag to enable Proven AI integration.
PROVEN_AI_SDK_ISCC_ENABLEDfalseFlag to enable ISCC SDK for Proven AI.

You will need to configure one LLM key for the chat functionality. By setting the PROVEN_AI_ENABLED flag to true, search on provenAI data pods is enabled. Also by setting PROVEN_AI_SDK_ISCC_ENABLED to true, when a document instance is created an ISCC code is assgined to it. Otherwise a random UUID is assigned.

AWS Configuration

Configuration settings for AWS services, specifically for accessing S3 storage. These variables are not mandatory, you need to configure them only if you want s3 integration. If these variables are not set, any files uploaded will be stored in your local filesystem on your home folder.

The path of the documents stored will be: {user.home}/gendox/documents.

VariableValueDescription
AWS_ACCESS_KEY****Token used to authenticate the application with AWS services(e.g. S3 storage).
AWS_SECRET_ACCESS_KEY******Secret key used in conjunction with the access key to authenticate with AWS services.

Keycloak Configuration

These are the environment variables required for Keycloak, including client credentials and endpoints for authentication.

VariableValueDescription
KEYCLOAK_ADMINgendox_adminAdmin username for Keycloak.
KEYCLOAK_ADMIN_PASSWORDchangeitAdmin password for Keycloak.
KEYSTORE_PASSWORDchangeitPassword for the Keycloak keystore.
KEYCLOAK_HTTP_RELATIVE_PATHidpRelative path for Keycloak HTTP access.
KEYCLOAK_CLIENT_IDgendox-private-clientClient ID for Gendox Keycloak client.
KEYCLOAK_PROVEN_AI_CLIENT_IDproven-ai-private-clientClient ID for Proven AI Keycloak client.
KEYCLOAK_CLIENT_SECRETyour-gendox-secretClient secret for Gendox Keycloak client.
KEYCLOAK_PROVEN_AI_CLIENT_SECRETyour-proven-secretClient secret for Proven AI Keycloak client.

Gendox Frontend Configuration

Lists the environment variables for the Gendox frontend application, including OIDC settings and backend URLs.

VariableValueDescription
NEXT_PUBLIC_OIDC_AUTHORITYhttps://dev.gendox.ctrlspace.dev/idp/realms/gendox-idp-devOIDC authority for authentication.
NEXT_PUBLIC_GENDOX_OIDC_AUTHORITYhttp://localhost:8443/idp/realms/gendox-idp-devLocal OIDC authority for authentication.
NEXT_PUBLIC_GENDOX_OIDC_CLIENT_IDgendox-pkce-public-client-localPublic client ID for Gendox OIDC.
NEXT_PUBLIC_GENDOX_OIDC_REDIRECT_URIhttp://localhost:3000/oidc-callback/Redirect URI after OIDC authentication.
NEXT_PUBLIC_GENDOX_OIDC_POST_LOGOUT_REDIRECT_URIhttp://localhost:3000/loginRedirect URI after OIDC logout.
NEXT_PUBLIC_GENDOX_OIDC_SILENT_REDIRECT_URIhttp://localhost:3000/silent-renewSilent redirect URI for OIDC.
NEXT_PUBLIC_GENDOX_BACKEND_URLhttp://localhost:8080/gendox/api/v1/Backend URL for Gendox API.
NEXT_PUBLIC_PROVEN_AI_FRONTEND_URLhttp://localhost:3001/Frontend URL for Proven AI.

Proven AI Git Configuration

Configuration settings for accessing the Proven AI Git repository, including repository details and branch information.

VariableValueDescription
PROVEN_AI_GIT_REPOSITORYgithub.com/ctrl-space-labs/proven-ai.gitRepository URL for Proven AI.
PROVEN_AI_GIT_BRANCHdevBranch name for Proven AI.

Proven AI Backend Configuration

VariableValueDescription
ISSUER_DIDdid:did:key:z*******Decentralized Identifier (DID) of the issuer for Verifiable Credentials (VC)
ISSUER_PRIVATE_JWK{"kty":"EC","d":"****"}JSON Web Key (JWK) of the issuer's private key for signing Verifiable Credentials.
note

Default ISSUER_DID and ISSUER_PRIVATE_JWK values are provided in the .env-local. These are for testing only as they are not private values, to facilitate the provenAI setup.

Proven AI Frontend Configuration

This section specifies the environment variables related to the Proven AI frontend.

VariableValueDescription
NEXT_PUBLIC_PROVEN_AI_OIDC_AUTHORITYhttp://localhost:8880/idp/realms/gendox-idp-devThe OIDC authority URL for authentication.
NEXT_PUBLIC_PROVEN_AI_OIDC_CLIENT_IDproven-pkce-public-client-localThe client ID for the OIDC application.
NEXT_PUBLIC_PROVEN_AI_OIDC_REDIRECT_URIhttp://localhost:3001/oidc-callback/Redirect URI after successful OIDC authentication.
NEXT_PUBLIC_PROVEN_AI_OIDC_POST_LOGOUT_REDIRECT_URIhttp://localhost:3001/loginRedirect URI after logout from OIDC.
NEXT_PUBLIC_PROVEN_AI_OIDC_SILENT_REDIRECT_URIhttp://localhost:3001/silent-renewSilent renew redirect URI for OIDC authentication.
NEXT_PUBLIC_PROVEN_AI_BACKEND_URLhttp://localhost:8082/proven-ai/api/v1/Backend URL for the Proven AI API.
NEXT_PUBLIC_GENDOX_FRONTEND_URLhttp://localhost:3000/URL for the Gendox frontend application.
NEXT_PUBLIC_VERIFIER_URLhttp://localhost:7003/URL for the Verifier service.

ISCC App Configuration

This section specifies the configuration for the ISCC application, including environment settings and operational parameters.

VariableValueDescription
ISCC_WEB_ENVIRONMENTproduction
ISCC_WEB_SITE_EMAILexample@example.comEmail address for the website contact.
ISCC_WEB_SITE_ADDRESShttp://localhost:8970Address of the ISCC web application.
ISCC_WEB_SITE_PORT8971Port on which the ISCC web application runs.
ISCC_WEB_PRIVATE_FILEStrueIndicates if private file storage is enabled.
ISCC_WEB_MAX_UPLOAD_SIZE1073741824Maximum upload size in bytes (1 GB).
ISCC_WEB_STORAGE_EXPIRY3600Expiration time for stored files in seconds.
ISCC_WEB_CLEANUP_INTERVAL600Cleanup interval for stored files in seconds.
ISCC_WEB_LOG_LEVELINFOLogging level for the application.
ISCC_WEB_IO_READ_SIZE2097152Size for IO read operations in bytes (2 MB).
FORWARDED_ALLOW_IPS*Allowed IPs for forwarded requests.
ISCC_SDK_GRANULARfalseFlag for granular SDK features are enabled.

Wallet, Issuer, Verifier Ports

VariableValueDescription
WALLET_BACKEND_PORT7001Port for the Wallet backend service.
ISSUER_API_PORT7002Port for the Issuer API service.
VERIFIER_API_PORT7004Port for the Verifier API service.
WALLET_FRONTEND_PORT7101Port for the Wallet frontend application.
WEB_PORTAL_PORT7102Port for the Web Portal application.
VC_REPO_PORT7103Port for the Verifiable Credentials repository service.