Skip to main content

Environment Variables

info

Before you begin, ensure you have NodeJS installed on your computer. AnswerAI supports Node v18.15.0 or v20 and above.

There are three different .env files you can set environment variables for AnswerAI.

  • Root (.env)
  • Server (packages/server/.env)
  • UI (packages/ui/.env)
VariableDescriptionFile Location
PORTThe port number for the server to run onRoot, Server, UI
API_PORTThe port number for the API serverUI
APIKEY_PATHPath to the API key fileRoot, Server
SECRETKEY_PATHPath to the secret key fileRoot, Server
LOG_PATHPath to store log filesRoot, Server
DISABLE_FLOWISE_TELEMETRYDisable Flowise telemetry when set to trueRoot
IFRAME_ORIGINSAllowed origins for iframesRoot
VITE_AUTH_DOMAINAuth0 domain for authenticationRoot, UI
VITE_AUTH_CLIENT_IDAuth0 client ID for authenticationRoot, UI
VITE_AUTH_AUDIENCEAuth0 audience for authenticationRoot, UI
VITE_AUTH_ORGANIZATION_IDAuth0 organization ID for authenticationRoot, UI
DOMAINDomain for the staging environmentRoot
ANSWERAI_DOMAINDomain for the beta environmentRoot
DATABASE_TYPEType of database (e.g., postgres)Root, Server
DATABASE_USERDatabase usernameRoot, Server
DATABASE_PASSWORDDatabase passwordRoot, Server
DATABASE_HOSTDatabase host addressRoot, Server
DATABASE_PORTDatabase port numberRoot, Server, AnswerAI
AUTH0_JWKS_URIAuth0 JSON Web Key Set URIRoot
AUTH0_ISSUER_BASE_URLAuth0 issuer base URLRoot
AUTH0_BASE_URLBase URL for Auth0 authenticationRoot
AUTH0_CLIENT_IDAuth0 client IDRoot
AUTH0_CLIENT_SECRETAuth0 client secretRoot
AUTH0_AUDIENCEAuth0 audienceRoot
AUTH0_SCOPEAuth0 scope for authenticationRoot
AUTH0_TOKEN_SIGN_ALGAuth0 token signing algorithmRoot
AUTH0_ORGANIZATION_IDAuth0 organization IDRoot
LANGFUSE_RELEASELangfuse release identifierRoot
LANGFUSE_SECRET_KEYLangfuse secret keyRoot
LANGFUSE_PUBLIC_KEYLangfuse public keyRoot
LANGFUSE_HOSTLangfuse host URLRoot
AUTH_AUTH0_CLIENT_IDAuth0 client ID for authenticationRoot
AUTH_AUTH0_CLIENT_SECRETAuth0 client secret for authenticationRoot
AUTH_AUTH0_ISSUERAuth0 issuer URL for authenticationRoot
DATABASE_URLFull database connection URLAnswerAI
VITE_FLAGSMITH_ENVIRONMENT_IDFlagsmith environment IDUI
NUMBER_OF_PROXIESNumber of proxies (commented out)Server
CORS_ORIGINSAllowed CORS origins (commented out)Server
DATABASE_NAMEDatabase name (commented out)Server
DATABASE_SSLEnable SSL for database connection (commented out)Server
DATABASE_SSL_KEY_BASE64Base64 encoded SSL key for database (commented out)Server
FLOWISE_USERNAMEFlowise username (commented out)Server
FLOWISE_PASSWORDFlowise password (commented out)Server
FLOWISE_SECRETKEY_OVERWRITEEncryption key for Flowise (commented out)Server
FLOWISE_FILE_SIZE_LIMITFile size limit for Flowise (commented out)Server
DISABLE_CHATFLOW_REUSEDisable chatflow reuse when set to true (commented out)Server
DEBUGEnable debug mode when set to true (commented out)Server
LOG_LEVELLogging level (commented out)Server
TOOL_FUNCTION_BUILTIN_DEPBuilt-in dependencies for tool functions (commented out)Server
TOOL_FUNCTION_EXTERNAL_DEPExternal dependencies for tool functions (commented out)Server
LANGCHAIN_TRACING_V2Enable LangChain tracing v2 (commented out)Server
LANGCHAIN_ENDPOINTLangChain API endpoint (commented out)Server
LANGCHAIN_API_KEYLangChain API key (commented out)Server
LANGCHAIN_PROJECTLangChain project name (commented out)Server
MODEL_LIST_CONFIG_JSONPath to model list configuration JSON (commented out)Server
STORAGE_TYPEStorage type (local or s3) (commented out)Server
BLOB_STORAGE_PATHPath for local blob storage (commented out)Server
S3_STORAGE_BUCKET_NAMES3 storage bucket name (commented out)Server
S3_STORAGE_ACCESS_KEY_IDS3 storage access key ID (commented out)Server
S3_STORAGE_SECRET_ACCESS_KEYS3 storage secret access key (commented out)Server
S3_STORAGE_REGIONS3 storage region (commented out)Server
S3_ENDPOINT_URLCustom S3 endpoint URL (commented out)Server
APIKEY_STORAGE_TYPEAPI key storage type (json or db) (commented out)Server
SHOW_COMMUNITY_NODESShow community nodes when set to true (commented out)Server

This table provides a comprehensive overview of all the environment variables used across the different files in your project. The "File Location" column indicates which file(s) each variable is found in (Root, Server, UI, or AnswerAI).