docker-compose.yml, service-level .env files, and the domain update guide.
Use this when:
- Updating domains
- Migrating environments
- Troubleshooting service misconfiguration
- Performing production deployments
Global notes
- All services read environment variables from their respective directories.
- Domain values must be updated consistently across API, WebSocket, Notifications, Webhooks, and NGINX configurations.
- Changing the primary domain impacts reverse proxy routing, OAuth headers, CORS, webhook endpoints, and TiDB host references.
Chat API
Update these values when changing domains:MAIN_DOMAIN="<your-domain>"EXTENSION_DOMAIN="<your-domain>"WEBHOOKS_BASE_URL="https://webhooks.<your-domain>/v1/webhooks"TRIGGERS_BASE_URL="https://webhooks.<your-domain>/v1/triggers"EXTENSION_BASE_URL="https://notifications.<your-domain>"MODERATION_ENABLED=trueRULES_BASE_URL="https://moderation.<your-domain>/v1/moderation-service"ADMIN_API_HOST="api.<your-domain>"CLIENT_API_HOST="apiclient.<your-domain>"ALLOWED_API_DOMAINS="<your-domain>,<additional-domain>"DB_HOST="tidb.<your-domain>"DB_HOST_CREATOR="tidb.<your-domain>"V3_CHAT_HOST="websocket.<your-domain>"
Management API (MGMT API)
ADMIN_API_HOST="api.<your-domain>"CLIENT_API_HOST="apiclient.<your-domain>"APP_HOST="dashboard.<your-domain>"API_HOST="https://mgmt-api.<your-domain>"MGMT_DOMAIN="<your-domain>"MGMT_DOMAIN_TO_REPLACE="<your-domain>"RULES_BASE_URL="https://moderation.<your-domain>/v1/moderation"ACCESS_CONTROL_ALLOW_ORIGIN="<your-domain>,<additional-domain>"
WebSocket
Hostnames are derived automatically from NGINX and Chat API configuration; no manual domain updates are required.Notifications service
CC_DOMAIN="<your-domain>"(controls routing, token validation, and push delivery)
Moderation service
CHAT_API_URL="<your-domain>"for rule evaluation, metadata retrieval, and decision submission
Webhooks service
CHAT_API_DOMAIN="<your-domain>"- must match the Chat API domain exactly to avoid retries or signature verification failures
Extensions
Receipt Updater
RECEIPTS_MYSQL_HOST="tidb.<your-domain>"for delivery receipts, read receipts, and thread metadata
SQL Consumer
NGINX configuration files
Update domain values in:- chatapi.conf
- extensions.conf
- mgmtapi.conf
- notifications.conf
- dashboard.conf
- globalwebhooks.conf
- moderation.conf
- websocket.conf
Summary of domain values to update
- Chat API, Client API, and Management API
- Notifications, Moderation, Webhooks, and Extensions services
- NGINX reverse proxy hostnames
- TiDB host references
- WebSocket host configuration in Chat API