Skip to content

Configuration Reference ​

The server edition is configured through the .env file (read by docker-compose.yml). Copy .env.example to .env and edit as needed.

Sensitive Information

.env contains keys and passwords and is excluded by .gitignore. Never commit it to the repository.

Required ​

VariableDescriptionExample / How to generate
SECRET_KEYJWT signing key; must be a long random valueopenssl rand -hex 32
MYSQL_ROOT_PASSWORDMySQL root passwordA strong password of your choice
MYSQL_PASSWORDPassword for the application database userA strong password of your choice

Database ​

VariableDefaultDescription
MYSQL_DATABASEquestion_bankDatabase name
MYSQL_USERquestion_bankApplication database user
DB_URLmysql+aiomysql://question_bank:<MYSQL_PASSWORD>@mysql:3306/question_bankBackend connection string; usually no need to set manually

Vector Database (ChromaDB) ​

VariableDefaultDescription
CHROMADB_HOSTchromadbChromaDB host (container name)
CHROMADB_PORT8000In-container port

Runtime ​

VariableDefaultDescription
IMAGE_TAGlatestTag of the prebuilt images to pull; set to a specific version (e.g. 1.2.0) to pin it
LOG_LEVELINFOLog level (DEBUG/INFO/WARNING/ERROR)
DATA_DIR/dataWritable backend data directory (uploads, static media, runtime config); preset in the image, usually no need to change
MCP_ALLOWED_ORIGINSemptyComma-separated origins allowed to call the MCP server cross-site from a browser (e.g. https://inspector.example.com). Native MCP clients need no configuration

Switching a server in mainland China to the Alibaba Cloud mirrors requires no extra variables — just one more file to download; see Mainland China Mirrors.

AI Configuration Is Not in .env ​

AI providers, models, API keys and other dynamic business settings are stored in the database and managed through the UI rather than environment variables. After logging in, configure them in AI Providers & Models; changes take effect without a restart.

Likewise, business parameters such as review thresholds and prompt templates are managed in the UI; see System Settings.

Static vs. Dynamic Configuration

  • Static configuration (fixed before startup): .env / environment variables, such as keys and the database connection.
  • Dynamic configuration (changeable at runtime): tables such as system_setting in the database, hot-updated through the UI.

After Changing Configuration ​

After editing .env, recreate the containers for the changes to take effect:

bash
docker compose up -d

Released under the AGPL-3.0 License