Skip to main content

Discord on Mac (Docker dev)

Everything runs inside the container. On your Mac you only need Docker and the docker-dev.sh scripts.

./scripts/docker-dev.sh bootstrap

One command: installs Rust (first time), builds, runs bunny configure (email, password, Discord).

First time with Discord? Create the application and invite the bot to your server first — see Discord application and server setup (Steps 1–2), then continue below.

Then:

./scripts/docker-dev.sh shell
bunny run # terminal 1 — keep open

In another terminal:

./scripts/docker-dev.sh start-bridge
  • Web UI: http://127.0.0.1:7681
  • Discord: /bunny help then /bunny link (code from Web UI → session → Discord)

Manual steps (equivalent)

./scripts/docker-dev.sh up
./scripts/docker-dev.sh shell # installs Rust automatically if needed
bunny configure
bunny run # terminal 1
# terminal 2:
bunny discord bridge

bunny commands

CommandPurpose
bunny setup --minimalInstall Rust/tools (first time in container)
bunny configureAdmin account + optional Discord
bunny discord setupDiscord config only
bunny discord bridgeStart Discord bot
bunny runAgent + Web UI (:7681)

Mac scripts

CommandPurpose
./scripts/docker-dev.sh bootstrapInstall + interactive bunny configure
./scripts/docker-dev.sh browser-setupXvfb + Chromium + noVNC for Browser tab
./scripts/docker-dev.sh shellShell (auto setup if Rust missing)
./scripts/docker-dev.sh start-agentbunny run
./scripts/docker-dev.sh start-bridgebunny discord bridge
./scripts/docker-dev.sh check-networkTest DNS/HTTPS to Discord from container
./scripts/docker-dev.sh statusHealth check
./scripts/docker-dev.sh down -vFull reset

Troubleshooting

ProblemAction
Rust toolchain requiredbunny setup --minimal then bunny configure
Blank page on :7681bunny run
Browser: Xvfb / No such file./scripts/docker-dev.sh browser-setup (setup --minimal does not install the browser stack)
/bunny does not respondstart-bridge (dedicated terminal). Stop: Ctrl+C in that terminal, or ./scripts/docker-dev.sh stop-bridge
405 Method Not Allowed on shell_close / new commandRebuild + restart agent: in container cargo build --release -p bunny-server, then Ctrl+C on bunny run and relaunch
Unknown discord subcommandbunny setup --minimal (rebuilds CLI)
DisallowedGatewayIntentsDiscord Portal → your bot → Privileged Gateway Intents → enable Message Content Intent (save), then restart start-bridge
failed to lookup address / HTTP request to get gateway URL failed when starting bridgeContainer DNS (not Discord) — run ./scripts/docker-dev.sh check-network then down + up to apply compose DNS; restart Docker Desktop if it persists
invalid bridge token on /bunny linkToken in .discord/bridge.yaml not in agent config — bunny discord sync then restart bunny run (Ctrl+C, relaunch)
discord account not linked to bunny user on runRestart bunny run (recent fix), retry /bunny run — or redo /bunny link with a new Web UI code
/bunny run + npm run dev → 40s timeoutRebuild bunny-server: /bunny run injects into tmux; if the command does not finish in ~8s, Discord reports persistent process + excerpt; full logs in Terminal tab
Stop npm run dev (or similar)/bunny run_stop — Ctrl+C on the channel shell (shell:<name> if needed). Not /bunny stop (Claude tasks)
Pick a shell/bunny shell_list then /bunny run shell:<name> command:pwd (without shell: = first shell created)
Create a shell/bunny shell_new or /bunny shell_new name:debug
Close a shell/bunny shell_close shell:shell 1 (omit shell: if only one tab)
Shell snapshot/bunny snapshot or /bunny snapshot shell:shell 1 — Discord caption shows the shell
Full snapshot/bunny full_snapshot — shell + browser (headless Chromium auto-started on :3000 or first preview)
Browser stream/bunny stream_browser_start — read-only by default; port:5173 for a local port; interactive:true for mouse/keyboard
Stop browser stream/bunny stream_browser_stop — all active links for the channel; url:<watch URL> for one link
Browser: black screen in Stream / watchNormal in Docker with legacy WebRTC — rebuild Web UI + agent; Stream/watch then use noVNC read-only (tunnel :7681). Restart bunny run
Duplicate slash commands (run + shell_run, each cmd ×2)Global + guild registered in parallel. ./scripts/docker-dev.sh stop-bridge then one start-bridge. Check guild_id in .discord/bridge.yaml. Quit Discord (Cmd+Q). Expected log: removed stale global slash commands
@bunny mention → no reply in threadRebuild + restart agent + bridge: cargo build --release -p bunny-server -p bunny-discord-bridge, then Ctrl+C on bunny run and start-bridge. Threads use claude -p (headless) — reply arrives in Discord after the call finishes (up to ~5 min)
Thread: discord-* shell, no Discord replyVerify Claude Code is installed (?claude=setup in Web UI). Thread shell shows transcript of claude -p commands, not an interactive session
Thread: typing then silence (no GOAL)Old bug: claude -p was blocked as an "interactive" command. Rebuild bunny-server + bunny-discord-bridge, restart agent + bridge

Discord threads (@bunny mention)

  • Mention the bot in a channel → auto thread + discord-* shell in Web UI (project cwd).
  • Claude runs headless (claude -p --output-format json); the response is posted directly in the thread (no tmux polling).
  • Follow-up messages (reply or @mention) re-inject Goal (context) + thread history; only the user closes with Goal! (Claude does not declare the goal done).
  • Goal! / Cancel close the thread shell (tab disappears from Web UI).
  • ⛔ reaction on the last input message → interrupt the running Claude subprocess.
  • discord-* shell in Web UI: transcript [discord] $ claude -p … appears after the call (reload tab if needed).
  • error_max_turns: agent hit agents.max_turns (default 30); partial plan extracted from JSON if present — raise the limit in config.yaml or continue in the thread.
  • AskUserQuestion: if Claude needs a choice, the bot posts buttons in the thread; after click, claude -p --resume continues with your answers. Multiple questions → one message/buttons per question.

Enable Discord intents (required once)

  1. Discord Developer Portal → your application → Bot
  2. Privileged Gateway Intents section
  3. Enable Message Content Intent (for /bunny and @bunny mentions)
  4. Save Changes
  5. Restart ./scripts/docker-dev.sh start-bridge (bunny run already running in the other terminal)

Full guide: Discord setup.