12docker compose up -d docker compose logs -f
data: {"type":"install_url". Open that URL, pick your Discord server, click Authorize. Credentials stay on the volume, so later restarts skip this step.kimaki --gateway. On first boot Kimaki creates local credentials, prints an install URL, and waits for you to authorize the shared bot. After that it connects through the gateway proxy and listens for Discord messages.Your VPS Kimaki cloud Discord ┌──────────────────────────┐ ┌─────────────────────┐ ┌──────────────┐ │ Docker │ │ │ │ │ │ kimaki --gateway │────>│ gateway proxy │────>│ your server │ │ │ │ kimaki.dev │ │ │ │ /data (volume) │ │ │ │ channels │ │ discord-sessions.db │ └─────────────────────┘ │ + threads │ │ projects/ │ └──────────────┘ └──────────────────────────┘
kimaki-demo/Dockerfile. The files below are the same idea, written for a normal VPS instead of Fly.io.123456789101112131415161718192021222324FROM node:24-slim RUN apt-get update && apt-get install -y git curl unzip \ && rm -rf /var/lib/apt/lists/* # bun is required by OpenCode RUN curl -fsSL https://bun.sh/install | bash ENV PATH="/root/.bun/bin:$PATH" RUN npm install -g kimaki@latest # Pre-install OpenCode so the first session does not hit GitHub rate limits RUN curl -fsSL https://opencode.ai/install | bash ENV PATH="/root/.opencode/bin:$PATH" RUN mkdir -p /data/projects WORKDIR /data # --gateway: shared Kimaki bot, no Discord bot token # --data-dir /data: sqlite DB and credentials on the volume # --projects-dir /data/projects: folders created by /create-new-project # --auto-restart: respawn the bot process after a crash CMD ["kimaki", "--gateway", "--data-dir", "/data", \ "--projects-dir", "/data/projects", "--auto-restart"]
123456789101112services: kimaki: build: . restart: unless-stopped volumes: - kimaki-data:/data environment: NODE_ENV: production KIMAKI_DATA_DIR: /data volumes: kimaki-data:
1docker compose up -d --build
1docker compose logs -f
1data: {"type":"install_url","url":"https://kimaki.dev/discord-install?clientId=...&clientSecret=..."}
url value, open it in a browser, select your Discord server, click Authorize.docker compose up │ v install_url in logs ──> open URL ──> Authorize ──> authorized ──> ready
| Event | What it means |
install_url | Open this URL once. It contains your credentials. |
authorized | Discord install succeeded. A guild_id is now stored. |
ready | The bot is connected and listening. |
error | Something failed. Read message. Restart and try again. |
1docker compose exec kimaki kimaki discord-install-url --gateway --data-dir /data
/data./login and connect Claude, Codex, or an API key. See Models & Subscriptions.CMD when they match how you want the VPS to behave.| Flag | When to use it |
--allow-all-users | Anyone in the Discord server can start sessions. The no-kimaki role still blocks. Default access is role-based. |
--restrict-directories | The agent must ask before leaving the project folder. |
--no-auto-upgrade | Stop Kimaki from upgrading itself on boot. You control versions by rebuilding the image. |
--verbosity <level> | Default thread verbosity. See Verbosity. |
--allow-all-users and an OpenCode config that auto-allows tools, because nobody is sitting on permission buttons. A personal VPS can keep the defaults and approve tools from Discord.kimaki@latest (or bump a pinned version in the Dockerfile):1docker compose up -d --build
/data, so gateway credentials and projects survive. From Discord you can also run /upgrade-and-restart, which upgrades the npm package inside the running container. A later image rebuild overwrites that, so prefer rebuilding when you manage the box with Docker.12345# follow bot output docker compose logs -f # shell inside the container docker compose exec kimaki bash
/data/kimaki.log. It resets every time the bot process starts. See Troubleshooting if sessions stall after the bot is online.kimaki process) there and install that instance into the same Discord server. See Advanced Setup.