Environment Variables
Every environment variable Mellow reads.
Mellow loads a .env file if present, then reads the environment. A starting point is
.env.example in the repository.
| Variable | Description |
|---|
TOKEN | Discord bot token. |
CLIENT_ID | Discord application (client) ID. Used for the invite link. |
DATABASE_URL | PostgreSQL connection string, e.g. postgres://user:pass@host:5432/mellow?sslmode=require. Use sslmode=disable only for a local database. |
ANTHROPIC_API_KEY | Anthropic API key. Without it, AI features fall back to fixed responses. |
ENCRYPTION_KEY | 32-byte key for per-field AES-256-GCM encryption. If unset, data is stored as plain text (development only). |
| Variable | Default | Description |
|---|
PRIVATE_GUILD_ID | - | Guild that owner-only commands are registered to. |
OWNER_IDS | - | Comma-separated Discord user IDs allowed to run owner commands. |
ENCRYPTION_SALT_LIST | mellow-encryption-salt | Comma-separated salts. Writes use the first; reads try all. Add a new salt to the front to rotate keys. |
PORT | 9420 | Port for the HTTP API. |
API_TOKEN | - | Bearer token required by POST /v1/chat and POST /v1/feedback. |
LOG_LEVEL | info | debug, info, warn, or error. |
LOG_CHANNEL_ID | - | Discord channel for internal system logs (gateway, guild join/leave, startup). |
Defaults are derived from WEBSITE_URL when not set explicitly.
| Variable | Default |
|---|
WEBSITE_URL | https://mymellow.xyz |
DOCS_URL | <WEBSITE_URL>/docs |
SUPPORT_URL | <WEBSITE_URL>/support |
INVITE_URL | <WEBSITE_URL>/invite |
SOURCE_URL | https://github.com/CodeMeAPixel/Mellow |
| Variable | Description |
|---|
MELLOW_STATUS_API_KEY | Key sent (as apiKey in the body) when posting the 5-minute status heartbeat to the website. The website checks it against its own MELLOW_STATUS_API_KEY. |
STATUS_API_URL | Heartbeat endpoint. Defaults to <WEBSITE_URL>/api/status. |
The website's status page reads live per-shard detail directly from the bot's
GET /v1/status; point the site's MELLOW_BOT_API_URL at the bot's HTTP API base for that.
| Variable | Description |
|---|
GITHUB_TOKEN | Optional token for higher GitHub API rate limits. |
GITHUB_REPO | owner/repo. Defaults to CodeMeAPixel/Mellow, or is derived from SOURCE_URL. |
| Variable | Description |
|---|
PATCHNOTES_PATH | Path to PATCHNOTES.md, read by the owner-only /changelog command. |
| Variable | Description |
|---|
OMNIPLEX_TOKEN | Token for the Omniplex integration. Leave empty to disable. |
OMNIPLEX_BASE_URL | Base URL for the Omniplex API. |
| Variable | Description |
|---|
MELLOW_MIGRATE_ONLY | If set, run database migrations and exit without starting the bot. |
MELLOW_FORCE_DEPLOY | If set, force a full re-registration of slash commands on startup. |
- Database migrations are embedded and run automatically at startup (before anything else).
- Command registration happens on startup: global commands overwrite the global set, and
owner-only commands are pushed to
PRIVATE_GUILD_ID.