Configuration
All configuration is done with environment variables. Copy .env.example to .env (Docker Compose) or paste it into the Portainer stack’s environment variables. .env is in .gitignore; never commit it.
Required
Section titled “Required”| Variable | Description |
|---|---|
DISCORD_BOT_TOKEN |
Bot token from the Discord Developer Portal → Bot → Reset Token. |
CLAUDE_CODE_OAUTH_TOKEN |
Claude subscription token. Create it with claude setup-token on your own machine. Recommended. |
ANTHROPIC_API_KEY |
Alternative to the OAuth token: an Anthropic Console API key, billed per token. |
Set exactly one of CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY.
| Variable | Default | Description |
|---|---|---|
BOT_MODE |
bridge |
bridge: one Claude session per Discord thread (Thread sessions). plugin: one shared session through the Discord channel plugin. |
Discord access
Section titled “Discord access”Bridge mode needs DISCORD_CHANNELS and DISCORD_ALLOWED_ROLES or DISCORD_ALLOWED_USERS (or both), and ignores DMs and the DISCORD_DM_POLICY / DISCORD_ACCESS_MODE / DISCORD_STATE_DIR variables.
Plugin mode: leave DISCORD_ALLOWED_USERS empty to manage access by hand with /discord:access instead. When it is set, access.json is rebuilt from these values on every start (see Entrypoint).
| Variable | Default | Description |
|---|---|---|
DISCORD_ALLOWED_USERS |
(empty) | Comma-separated Discord user IDs allowed to use the bot (plugin mode: also to DM it). |
DISCORD_CHANNELS |
(empty) | Comma-separated server channel IDs where the bot listens. Text channels and forums. |
DISCORD_CHANNEL_USERS |
DISCORD_ALLOWED_USERS |
User IDs allowed to trigger the bot in those channels. |
DISCORD_ALLOWED_ROLES |
(empty) | Bridge mode: comma-separated role IDs; members with any of them may use the bot, in addition to the users above. |
DISCORD_REQUIRE_MENTION |
true |
true: a new session starts only on an @mention. Inside a session thread no mention is needed. |
DISCORD_MENTION_EVERYWHERE |
false |
true: an @mention in any text channel or thread the bot can see starts a session, not only in DISCORD_CHANNELS. In threads people already use, Claude answers only messages that @mention it. |
DISCORD_DM_POLICY |
allowlist |
Plugin mode: allowlist, pairing or disabled. .env.example sets disabled. |
DISCORD_ACCESS_MODE |
(empty) | Plugin mode: static reads access.json once at boot and never writes it (no pairing). .env.example sets static. |
DISCORD_STATE_DIR |
~/.claude/channels/discord |
Where the plugin keeps its state. Not in .env.example; rarely needed. |
To find an ID, enable Developer Mode in Discord (Settings → Advanced), then right-click a user or channel → Copy ID.
Claude Code
Section titled “Claude Code”| Variable | Default | Description |
|---|---|---|
CLAUDE_PERMISSION_MODE |
auto |
auto, manual, acceptEdits, dontAsk, bypassPermissions or plan. |
CLAUDE_MODEL |
account default | Model ID, e.g. claude-opus-5-5 or claude-sonnet-5-5. Bridge: !model default in Discord overrides it. |
CLAUDE_EFFORT |
default | low, medium, high, xhigh or max. Bridge: !effort default overrides it. |
CLAUDE_CONTINUE |
true |
Plugin mode: resume the previous conversation after a restart. Bridge threads always resume their own session. |
Bridge
Section titled “Bridge”| Variable | Default | Description |
|---|---|---|
BRIDGE_MAX_CONCURRENT |
3 |
Sessions that may run at the same time. Each needs roughly 250 MB of memory or more. |
BRIDGE_APPROVAL_TIMEOUT_S |
600 |
Seconds to wait for Allow/Deny on a permission prompt before denying. |
BRIDGE_STATUS_CHANNEL |
empty | Channel ID for the pinned status message. Empty = none. See Model and usage. |
BRIDGE_PRESENCE |
true |
Show the default model, 5-hour usage and running sessions as the bot’s Discord status. |
BRIDGE_FOOTER |
true |
Post a small model · steps · time · cost line after each answer. |
BRIDGE_THREAD_STATUS |
true |
Status emoji in front of thread names and status tags in forums. |
BRIDGE_SPINNER |
true |
Live ✻ Combobulating… · time · activity line while Claude works. No tokens. |
BRIDGE_SPINNER_THEME |
built-in |
Spinner words of threads without their own theme: built-in, random or a theme from !spinner list. !spinner default overrides it. See Live progress line. |
BRIDGE_SPINNER_VERBS_URL |
the README of claude-code-spinner-verbs on main |
Where the spinner themes are downloaded from. Use a commit URL to pin the list. |
BRIDGE_SLASH_COMMANDS |
true |
Register the Discord slash commands (/status, /model…) on startup. |
MEETING_NOTES_CHANNEL |
empty | Channel for meeting transcripts and summaries; empty turns meeting notes off. See Meeting notes. |
MEETING_SUMMARY_MODEL |
sonnet |
Model that writes the meeting summary. |
MEETING_MAX_MINUTES |
180 |
A recording stops by itself after this long. |
AUDIO_EPHEMERAL |
false |
false: keep the meeting audio in RECORDINGS_DIR. true: delete it after a successful transcript. See Kept recordings. |
RECORDINGS_DIR |
/recordings |
Where kept meeting audio goes, one folder per meeting. Mount a disk here. |
TRANSCRIBER_HOST / TRANSCRIBER_USER / TRANSCRIBER_PORT |
empty / empty / 22 |
SSH address and Windows user of the PC that runs Whisper. |
TRANSCRIBER_WAKE_VIA |
empty | [email protected]: wake the PC through the Pi host’s forced-command script (pi/setup-wake.sh). Recommended. |
TRANSCRIBER_MAC |
empty | Only without TRANSCRIBER_WAKE_VIA: the bot sends Wake-on-LAN itself, which needs network_mode: host. |
TRANSCRIBER_BROADCAST |
host’s /24 .255 |
Wake-on-LAN broadcast address. |
TRANSCRIBER_BOOT_TIMEOUT_S |
240 |
How long to wait for the PC to boot. |
BRIDGE_SHOW_COST |
auto |
Dollar amounts in the footer, !usage and the status message. auto shows them only when ANTHROPIC_API_KEY is set; true / false force it. |
BRIDGE_CWD |
/workspace |
Working directory of every session. |
BRIDGE_STATE_DIR |
~/.claude/discord-bridge |
Where the thread → session map, model defaults and usage totals are stored. |
BRIDGE_INBOX_DIR |
/workspace/.discord-inbox |
Where Discord attachments are saved for Claude. |
CLAUDE_CODE_PATH |
/usr/local/bin/claude |
Claude Code executable the sessions run. |
The last four are not in .env.example; the defaults fit the image.
Git and GitHub
Section titled “Git and GitHub”| Variable | Description |
|---|---|
GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL |
Commit author; also written to the global git config at start. |
GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL |
Commit committer. |
GH_TOKEN |
GitHub token used by gh and by git over HTTPS. Use a fine-grained token scoped to specific repositories. |
For a GitHub-verified identity without exposing a personal address, use the account’s noreply email (<id>+<username>@users.noreply.github.com).
| Variable | Example | Description |
|---|---|---|
TZ |
Europe/Vilnius |
Container time zone. |
Example
Section titled “Example”BOT_MODE=bridgeDISCORD_BOT_TOKEN=xxxxxxxxCLAUDE_CODE_OAUTH_TOKEN=xxxxxxxx
DISCORD_ALLOWED_USERS=111111111111111111,222222222222222222DISCORD_CHANNELS=333333333333333333DISCORD_REQUIRE_MENTION=true
CLAUDE_PERMISSION_MODE=autoBRIDGE_MAX_CONCURRENT=3
GIT_AUTHOR_NAME=Your NameGIT_COMMITTER_NAME=Your NameGH_TOKEN=github_pat_xxxxxxxxTZ=Europe/Vilnius