Skip to main content

Deployment files

Create a deployment directory and save both of the following files in it. The files work together: Docker Compose reads the environment values from .env when it starts the services.

docker-compose.yml

.env.template

Create your .env file

1

Copy the template

Create your deployment-specific configuration file:
2

Fill in the required values

Open .env and set every variable marked # Required below. Everything else has a sensible default and can be left as-is to start.
Do not edit .env.template after copying it; keep it as a reference and make all deployment-specific changes in .env.
Never commit .env, and never paste real values from it into a shared document, ticket, or chat. It holds live secrets for your deployment.

Required values

Other settings you can leave at their defaults

.env.template groups the rest of the variables by area — adjust them if you need to, otherwise the defaults are fine for a first deployment:
  • Database / Redis — connection details for the bundled db and redis containers (DB_NAME, DB_USER, DB_HOST, DB_PORT, REDIS_HOST, REDIS_PORT).
  • Backend local storage — where uploaded media and chat data are stored inside the container (LOCAL_STORAGE_ROOT, MEDIA_ROOT, CHATS_BACKEND, CHATS_LOCAL_DIR).
  • On-prem organization bootstrapON_PREM_ORGANIZATION_NAME, the organization name your users will see.
  • Usage ingestion / feature flags — optional integrations (RELAI_USAGE_INGEST_URL, RELAI_USAGE_INGEST_TOKEN, SEND_TO_RELAI, RELAI_ENABLE_TRACING, RELAI_STORE_SFT_SAMPLES, RELAI_ENABLE_FINETUNING). Leave these off unless RELAI has instructed you to turn them on.
  • Backend server tuningONPREM_WEB_WORKERS (Uvicorn worker count), UVICORN_LOG_LEVEL.
  • DashboardSERVER_BASE_URL, the URL the dashboard uses to reach the backend. Update this if you put a reverse proxy or a different hostname in front of the backend.
  • Docker Hub credentialsDOCKER_HUB_USERNAME, DOCKER_HUB_TOKEN, see Pulling the images.