Environment variables
All server settings live in the .env file in the installation folder. The installer creates it with mode 600; it never goes into git or Docker images. After editing, restart the services:
bash
docker compose up -d api worker caddyMost settings are in the admin panel
Rates, payment systems, mail, notifications, AML/KYC, design and texts are changed in the admin panel. Keys entered there are stored encrypted in the database (with SETTINGS_SECRET), and the panel only shows whether they are set.
Generated automatically
The installer generates these once. Do not change them without a reason.
| Variable | Meaning |
|---|---|
NODE_ENV | production on the server |
POSTGRES_PASSWORD | Database owner password — migrations run under it |
APP_DB_PASSWORD | Password of the application role, which cannot alter the action log and money ledger |
DATABASE_URL | The app's database connection (as the application role) |
SESSION_SECRET | Session signing, at least 32 characters |
SETTINGS_SECRET | Encryption key for secrets from the admin panel. If you change it, all keys from the admin panel must be entered again |
BACKUP_PASSWORD | Backup encryption password. Without it a backup cannot be opened — keep it in a password manager |
ADMIN_GATE_SECRET | Secret Caddy uses to ask the API whether an address may open the admin panel |
Domains and access
| Variable | Default | Meaning |
|---|---|---|
SITE_DOMAIN | from the install command | Website domain. Changed here, no code changes |
ADMIN_DOMAIN | admin. + domain | Admin subdomain. There is no admin panel on the main domain |
ADMIN_ALLOWED_IPS | 127.0.0.1/32 (closed to all) | Emergency admin access: IPs or subnets, space-separated. Works even if the API is down |
Backups
| Variable | Default | Meaning |
|---|---|---|
BACKUP_HOST_DIR | /home/deploy/backups/auto | Backup folder on the server, outside the installation folder — updates do not touch it |
Schedule, retention and Telegram delivery are in the admin panel, Settings → Backups.
External services
| Variable | Meaning |
|---|---|
TELEGRAM_BOT_TOKEN | Bot token from @BotFather: notifications, backups to Telegram, client bot |
API_INTERNAL_URL | Where the bot sends requests inside Docker. Default http://api:3000 — do not change |
ANTHROPIC_API_KEY | AI reply suggestions in support. Without it the “Suggest reply” button is hidden |
AMLBOT_ACCESS_ID, AMLBOT_ACCESS_KEY, AMLBOT_API_URL | AML screening via AMLBot. Usually AML providers are connected in the admin panel, AML and KYC |
KYC_PROVIDER | manual — documents are uploaded on the website, an operator decides |
KYC_STORAGE_DIR | Private folder for KYC documents and payment proofs. On the server it is a separate Docker volume, so data survives updates |
Mail — fallback
Mail is normally configured in the admin panel, Mail. These are needed only if the panel is not available yet.
| Variable | Meaning |
|---|---|
SMTP_HOST, SMTP_PORT | Server and port: 465 — TLS, 587 — STARTTLS |
SMTP_SECURE | true / false if the server differs from its port's default |
SMTP_USER, SMTP_PASSWORD | Mailbox login and password |
SMTP_FROM | Sender, e.g. "Exchange <no-reply@example.com>" |