Configuration reference

Every environment variable an operator sets for a production deployment, which are required, and which are fixed by the compose file.

For: Administrators operating a deployment · Last updated

You configure a production deployment through the .env file that sits next to docker-compose.prod.yml (/opt/wi/.env on the AWS path). Docker Compose reads that file automatically, so you never type these values on a command line.

The app service also loads every KEY=value line of .env straight into the application's environment. Any setting in the application's WI_ namespace therefore reaches it as soon as you add the line and restart the app container. The values the compose file sets itself (listed at the end) take precedence over .env, so do not try to change those there.

After editing .env, apply the change:

cd /opt/wi
sudo docker compose -f docker-compose.prod.yml up -d

Each key must appear once. Edit an existing line rather than adding a second one.

Required#

Variable What it is
WI_MASTER_KEY Base64 AES key (16, 24 or 32 bytes) that protects the data key encrypting every stored credential. Generated once by the installer, never regenerated by it. See Master key custody. The stack will not start without it, and the application refuses to start if it is malformed or does not match the key stored in the database.
WI_SESSION_SECRET Secret that signs sign-in sessions. Generated once, for example with openssl rand -base64 32. The stack will not start without it.
WI_DOMAIN Your domain name, for example wi.example.com. The one address setting you provide: the web origin (https://<domain>), the base URLs for emailed links, webhooks, and deployed Apps, and the host Builders use for git push are all derived from it. The stack will not start without it (or, on a box with no domain, WI_ALLOWED_ORIGIN). Caddy also uses it to obtain a certificate.

Registry credentials for install.sh#

These are read by install.sh from the shell environment when it runs; they are not .env settings and the stack does not read them.

Variable What it does
REGISTRY_USER, REGISTRY_TOKEN The credentials for the registry named by WI_IMAGE_REGISTRY. install.sh runs sudo docker login <registry> with them. A box that already holds a login for that registry host needs neither. For ghcr.io, the token is a classic personal access token with read:packages.
GHCR_USER, GHCR_TOKEN Aliases for REGISTRY_USER and REGISTRY_TOKEN. If both pairs are set, REGISTRY_* wins.

The login is made as root because /root/.docker/config.json is what the in-app updater reads. See Registry credentials for updates.

Optional#

Variable Default What it does
WI_MASTER_KEY_OLD blank Set only while rotating the master key: the previous WI_MASTER_KEY, in the same format. Remove it once the Encryption keys card on Settings, Administration, Secrets says it is safe. See Rotate the master key.
WI_ALLOWED_ORIGIN https://<WI_DOMAIN> The origin your users browse to. Set it only on a box with no domain (for example http://203.0.113.10), or to include a port if you changed WI_HTTP_PORT or WI_HTTPS_PORT.
WI_PUBLIC_BASE_URL, WI_API_BASE_URL, WI_APPS_BASE_URL the origin Base URLs for emailed links, for links the API hands out (webhook trigger URLs and the addresses Slack and Microsoft call for chat apps), and for deployed Apps. Override only to point one elsewhere. Chat apps need WI_PUBLIC_BASE_URL to start with https://, and Slack's events and Teams' direct connection need WI_API_BASE_URL to as well.
WI_DOKKU_SSH_HOST WI_DOMAIN (else the origin's host) The public hostname Builders use for their git push to deployed Apps.
WI_HTTP_PORT 80 Host port published for HTTP.
WI_HTTPS_PORT 443 Host port published for HTTPS.
WI_DOKKU_SSH_PORT 2222 Host port published for Dokku's SSH (the box's own SSH server keeps 22).
WI_IMAGE_REGISTRY ghcr.io The registry host the wi-server and wi-web images are pulled from. install.sh reads it from the shell environment, then .env, then the default, and saves it to .env (after the login and pull succeed) only when it is not the default. Changing it on an installed box takes a re-run of install.sh with the new host and the matching WI_IMAGE_OWNER; if .env already has this line, edit it to the new host (or delete it to return to ghcr.io) first, because the script refuses a host that differs from the line in .env. An in-app update does not change it.
WI_IMAGE_OWNER radialventures The namespace on the registry that holds the wi-server and wi-web images: the account or organization on ghcr.io, the project on another registry. Set it to wi together with WI_IMAGE_REGISTRY=harbor.getwi.com to pull from Workforce Intelligence's registry. install.sh reads it from the shell environment, then .env, then the default, and saves it to .env (after the login and pull succeed) only when it is not the default. Like the registry, it cannot differ from an existing line in .env: the script stops, so edit that line first. Moving the host without the namespace pulls a path that does not exist.
WI_IMAGE_TAG latest The image tag the app and web services run.
WI_DOCKER_CONFIG_DIR /root/.docker The host directory holding the registry login that the in-app updater reads. See Registry credentials for updates.
WI_SESSION_COOKIE_DOMAIN blank Scopes the session cookie to a parent domain, for example example.com. Leave blank to keep the cookie on the exact host. Setting it widens where the cookie is sent.
WI_TRIGGER_SCHEDULER dbos dbos runs Coworker triggers on their schedules. none turns off automatic firing, so triggers fire only when run by hand.
WI_FEEDBACK_SYNTHESIS_SCHEDULER dbos dbos runs the weekly feedback synthesis for companies that have the Feedback Synthesis feature turned on. none removes the schedule entirely, so syntheses run only when someone starts one.
WI_CRAWL_SCHEDULER dbos dbos re-crawls web sources hourly according to each source's refresh schedule. none removes the timer, so sources sync only when someone chooses Sync now.
WI_IMAGE_CLEANUP_SCHEDULER dbos dbos runs Docker housekeeping after each successful update and once a week, on production deployments only. none removes the timer, so cleanups run only when an admin selects Clean up now. See Docker housekeeping.
WI_INGEST_SWEEPER_SCHEDULER dbos dbos checks every ten minutes for uploaded documents that are stuck being read and marks them failed so they can be retried. none removes the check.
WI_FEEDBACK_SYNTHESIS_CHUNK_TOKENS 24000 Estimated tokens of feedback sent to the model in one call. A larger batch is split into several calls and merged.
WI_QUALITY_REVIEW_SCHEDULER dbos dbos runs the hourly automatic conversation review for companies that have Conversation quality review turned on and a review share above 0. none removes the schedule entirely, so reviews run only when a Supervisor starts one. See Conversation quality review.
WI_VALUE_ATTRIBUTION_SCHEDULER dbos dbos runs the hourly check that starts the daily Value estimates run for companies that have it turned on. none removes the schedule entirely. See Value estimates.
WI_PROMPT_CACHE on on lets the product ask supporting model providers (Anthropic, Amazon Bedrock Claude models) to cache the repeated start of prompts; providers that cache by themselves do so either way. off stops the product asking, for every call. See Usage & cost view.
WI_COMPACTION_TOKEN_THRESHOLD 100000 Estimated tokens of conversation history before a Coworker's conversation is condensed to a summary.
WI_LLM_IDLE_TIMEOUT_SECONDS 300 How many seconds the app waits without receiving any data from a model before giving up on the reply (10 to 3600). It counts silence, not total reply time: a reply that keeps arriving is never cut off. Raise it for slow local models that need a long time to load or think before the first word. When it runs out, the Coworker's thread says "This reply took too long to come back. Please try again."
WI_OAUTH_PROVIDER_DRIVER http How people sign in to outside systems such as GitHub. http talks to the system's own sign-in addresses saved on the connection. fake is for tests and is refused in production.
WI_CONNECTION_BROKER_DRIVER http How Coworkers' calls reach an outside system's tools. http calls the system's own server. fake is for tests and is refused in production.
WI_CENTRAL_URL https://getwi.com Address of the Workforce Intelligence service. Setup-guide links in the app open its articles and Workforce Intelligence model providers connect to it, and bug reports are sent there when an administrator turns on Share bug reports with Workforce Intelligence (see Data sharing with Workforce Intelligence). Optional: nothing in the application needs it to be reachable to start or run; a deployment with no route to it only loses those options. In production it must be an https:// address.
WI_CENTRAL_DRIVER http How the application reaches the Workforce Intelligence service. http makes real HTTPS requests. fake is for tests and is refused in production.
WI_CENTRAL_SIGNER deployment How requests to the Workforce Intelligence service are signed. deployment signs them with this deployment's own key (see Data sharing with Workforce Intelligence). none sends no signature and is for tests and development only. It is refused in production.
WI_CHANNEL_DRIVER native How Coworkers reach Slack and Microsoft Teams. native talks to Slack and Microsoft. fake is for tests and is refused in production. See Connect Slack.
WI_CHANNEL_PURGE_SCHEDULER dbos dbos runs the hourly clean-up of expired chat link tokens, old message-delivery records and the duplicate-message ledger. none removes the timer and is refused in production.
WI_CHANNEL_SOCKET_LISTENERS true true keeps the outbound connections for Slack apps set to We connect to Slack and Teams apps set to We connect to Microsoft directly. false stops those apps from receiving messages and is refused in production.
WI_SLACK_API_BASE_URL https://slack.com/api/ The Slack Web API address. Change it only to point tests at a local stand-in.
WI_MSTEAMS_OPENID_METADATA_URL, WI_MSTEAMS_TOKEN_URL_TEMPLATE, WI_MSTEAMS_BOT_SCOPE, WI_MSTEAMS_TOKEN_ISSUER, WI_MSTEAMS_DEFAULT_SERVICE_URL Microsoft's public-cloud values (https://login.botframework.com/v1/.well-known/openidconfiguration, https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token, https://api.botframework.com/.default, https://api.botframework.com and https://smba.trafficmanager.net/teams/) How the box signs in as a Teams bot and verifies Microsoft's messages. Change them only for a Microsoft sovereign cloud, and change the first four together. The box sends the bot's secret only to Microsoft's own sign-in hosts whatever these say.
WI_CRAWLER_MAX_PAGES_PER_RUN 200 Safety cap on pages one knowledge-source crawl may collect.
WI_CRAWLER_MAX_FETCHES_PER_RUN 400 Safety cap on fetches one knowledge-source crawl may make.

Fixed by the compose file#

The compose file sets these for you. Do not change them. A value in .env does not override them.

Variable Value Why it is fixed
WI_ENV prod Turns on the production boot checks.
WI_DATABASE_URL postgresql+psycopg://wi:wi@postgres:5432/wi Points at the Postgres container on the private Compose network.
WI_DATA_DIR /data The durable application volume.
DOCKER_CONFIG /run/host-docker-config Where the application finds the mounted registry login.
WI_DEPLOY_DRIVER dokku Deployed Apps run on the Dokku container.
WI_DOKKU_CONTAINER_NAME wi-prod-dokku Must match the Dokku container's name.
WI_APPS_PLATFORM_BASE_URL http://app:8300 How a deployed App's container reaches the application.
WI_DOKKU_APP_NETWORK wi-prod_default The Compose network that deployed Apps join.
WI_DOKKU_ADMIN_SSH_HOST dokku The application reaches Dokku by its service name.
WI_DOKKU_ADMIN_SSH_PORT 22 Dokku's internal SSH port, independent of the published one.

The postgres service uses the database user, password, and database name wi. The database port is not published, so only the other containers on the Compose network can reach it.

Where the files live#

Path What it holds
.env Secrets and deployment settings. Root-only, mode 0600.
docker-compose.prod.yml The stack definition, extracted from the wi-server image by install.sh (it is replaced on every run, so do not edit it).
install.sh, find-setup-token.sh The installer and the token helper.

On the AWS path all of these are in /opt/wi.