.env.example to .env and fill in your values before starting the bot.
Required
The bot will not start without these variables.Your Discord bot token. Found in the Discord Developer Portal under Bot → Token.
Your Discord application (client) ID. Used to deploy slash commands. Found in the Developer Portal under General Information → Application ID.
PostgreSQL connection string. When using Docker Compose, this is set automatically.
Anthropic API key for Claude AI features. Required unless you are using OAuth access tokens instead (see
CLAUDE_CODE_OAUTH_TOKEN).Standard API keys begin with sk-ant-api03-. Do not set this variable if you are using an OAuth token — the SDK will send conflicting auth headers and the API will reject the request.Optional
These variables are not required for the bot to start, but enable additional functionality or change default behavior.OAuth access token for Claude (begins with
sk-ant-oat01-). Use this instead of ANTHROPIC_API_KEY when authenticating via OAuth. Do not set both variables at the same time.Comma-separated list of Discord user IDs whose accounts bypass all permission checks. Falls back to
config.json’s permissions.botOwners array if not set.To find your Discord user ID: go to User Settings → Advanced, enable Developer Mode, then right-click your username and select Copy User ID.API key for mem0 long-term user memory. Memory features are disabled when this variable is not set.
PostgreSQL connection pool size.
Redis connection URL for session storage. Falls back to in-memory storage when not set.
Logging verbosity. Accepted values:
debug, info, warn, error.Node.js environment. Set to
development during local development.Maximum request body size accepted by the Express API.
Set to
false to disable TLS for local PostgreSQL connections.Set to
1 to disable Anthropic prompt caching.Web dashboard
These variables are required when running the web dashboard alongside the bot.Discord OAuth2 client secret. Required for Discord login in the web dashboard. Found in the Developer Portal under OAuth2 → Client Secret.
The OAuth2 callback URL Discord redirects to after login. Must match the redirect URI registered in the Developer Portal.
Secret used to sign JWT session tokens. Generate a secure value with:
Encryption secret for NextAuth.js sessions in the web dashboard. Generate with:
Public URL of the web dashboard. Docker Compose sets this to
http://localhost:3000 automatically.URL the web dashboard uses to reach the bot’s REST API. Docker Compose sets this automatically.
Shared secret for authenticating requests between the web dashboard and the bot API. Use a long random value.
URL of the web dashboard. Used to configure CORS on the bot API.
Discord client ID exposed to the browser for OAuth2 flows in the web dashboard. Set to the same value as
DISCORD_CLIENT_ID.Port the bot’s REST API listens on.
Webhooks
HMAC signing secret for outbound webhook requests. Used to generate the
X-Webhook-Signature header. Use a different value from SESSION_SECRET to maintain key separation. Generate with:URL that receives a POST request whenever the global configuration changes. The request is fire-and-forget with a 5-second timeout.
URL that receives a POST request when a guild configuration changes. Used to notify the dashboard of updates. Fire-and-forget, 5-second timeout.
Error monitoring
Sentry DSN that enables error tracking and alerting. When not set, Sentry is disabled.
Sentry environment label. Defaults to the value of
NODE_ENV.Sentry performance sampling rate, from
0 (disabled) to 1 (100%).