Docker Deployment
Talon ships a production-ready Docker image with a multi-stage build, baked-in CLIs, health checks, and security hardening. This is the fastest way to get a Talon daemon running.
Quick start
Section titled “Quick start”The published image is ghcr.io/ivo-toby/talond, built for linux/amd64 and linux/arm64, with :latest and per-release tags. The starter bundle pulls it, so there is nothing to build:
# 1. Download and extract the starter bundlecurl -fsSL https://github.com/ivo-toby/talon/releases/latest/download/talon-starter.tar.gz | tar xzcd talon-starter
# 2. Install the talonctl helper (no sudo)./install.sh
# 3. Configurecp .env.example .env # add your bot token and provider keycp config/talond.example.yaml config/talond.yaml # set allowedChatIds, pick a provider
# 4. Rundocker compose up -dtalonctl statusThe bundle bind-mounts config/, personas/, skills/, subagents/, data/ and userdata/, so you edit everything from the host. For a bundle with persistent memory, see the Starter Stack.
Build from a source clone
Section titled “Build from a source clone”The rest of this page describes deploy/Dockerfile and deploy/docker-compose.yaml in the Talon repository. To build and run the image yourself:
# 1. Copy and edit the example configcp config/talond.example.yaml config/talond.yaml
# 2. Set up environment variablescp deploy/.env.example deploy/.env# Fill in your secrets (API keys, tokens)
# 3. Create the bind-mount directoriesmkdir -p personas data
# 4. Start the daemondocker compose -f deploy/docker-compose.yaml up -d
# 5. Verify it's runningdocker compose -f deploy/docker-compose.yaml psdocker compose -f deploy/docker-compose.yaml logs -fDockerfile
Section titled “Dockerfile”The image uses a multi-stage build to keep the final image small:
| Stage | Base image | Purpose |
|---|---|---|
builder | node:24-slim | Installs all dependencies, compiles TypeScript to dist/ |
production | node:24-slim | Minimal runtime with only production dependencies |
Key details
Section titled “Key details”- Base image:
node:24-slim— small, up-to-date, and official - Init system:
tini— forwards signals correctly and reaps zombie processes - Non-root user: Runs as
talond:talondwith fixed UID/GID1000:1000 - Health check: Verifies the daemon process is alive by checking the PID file
- Volumes:
/data(SQLite, PID file, sockets) and/config(talond.yaml). Optional bind-mount points:/personas,/skills,/subagents - Shell tools:
git,gh(GitHub CLI),curlandjqfor agents that shell out - Tool instructions: the build copies
templates/tool-instructions/*.mdinto the image, so personas get the same tool guidance as a source install - Image support: the build loads the
sharpnative binding inside the image and converts a test JPEG. A broken binding fails the build instead of the first image upload. The check runs for each published architecture
# Abridged from the production stage in deploy/Dockerfile:FROM node:24-slim AS production
# Runtime essentials (the gh apt repository is added first)RUN apt-get install -y --no-install-recommends \ tini git gh curl jq ca-certificates
# Create non-root user with predictable UID/GID and a home directoryRUN groupadd --gid 1000 talond && \ useradd --uid 1000 --gid talond --create-home --shell /usr/sbin/nologin talond
# Switch to non-root userUSER talond
# Health check via PID fileHEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ CMD node -e "..."
ENTRYPOINT ["/usr/bin/tini", "--", "node", "/opt/talond/dist/index.js", "--config", "/config/talond.yaml"]docker-compose.yaml
Section titled “docker-compose.yaml”The compose file in deploy/docker-compose.yaml is the recommended way to run Talon. It layers on production hardening that goes beyond the Dockerfile:
Volumes
Section titled “Volumes”The volumes keep your data and config across container restarts and upgrades:
volumes: # Named volume — survives container removal, managed by Docker - talond-data:/data
# Bind-mount — your config file, read-only inside the container - type: bind source: ../config/talond.yaml target: /config/talond.yaml read_only: true
# Bind-mount — persona directories, editable from the host - type: bind source: ../personas target: /personas| Volume | Type | Purpose |
|---|---|---|
talond-data:/data | Named | SQLite database, PID file, IPC sockets — persists across restarts |
../config/talond.yaml:/config/talond.yaml | Bind-mount (read-only) | Your configuration — edit on the host, the container picks it up on restart |
../personas:/personas | Bind-mount | Persona directories and system prompts |
../skills:/skills, ../subagents:/subagents | Bind-mount (commented out) | Custom skills and sub-agents. Uncomment if you use them |
The image does not package skills/. Mount /skills if you add skills or MCP servers, or they are lost when the container is recreated.
Environment
Section titled “Environment”Secrets are loaded from a .env file and never committed to version control:
env_file: - ${TALON_ENV_FILE:-.env} # deploy/.env by default
environment: NODE_ENV: production TALOND_DATA_DIR: /data TALOND_CONFIG_PATH: /config/talond.yamlEvery entry in the env file is visible to talond and to the processes it starts.
Docker socket (optional)
Section titled “Docker socket (optional)”If you want Talon to spawn sandbox containers for agent execution, mount the Docker socket:
# Uncomment to enable sandbox container spawning:# - /var/run/docker.sock:/var/run/docker.sockHealth check
Section titled “Health check”The compose-level health check runs the same PID-file check as the Dockerfile HEALTHCHECK. It reports unhealthy when the PID file is missing or the process is dead:
healthcheck: test: ["CMD", "node", "-e", "..."] # PID file check interval: 30s timeout: 5s start_period: 15s retries: 3Security hardening
Section titled “Security hardening”The compose file applies defense-in-depth beyond what the Dockerfile alone provides:
# Drop ALL Linux capabilities — Talon doesn't need anycap_drop: - ALL
# Prevent privilege escalation via setuid/setgid binariessecurity_opt: - no-new-privileges:true| Setting | Effect |
|---|---|
cap_drop: ALL | Removes all Linux capabilities from the container |
no-new-privileges:true | Prevents setuid/setgid binaries from escalating privileges |
Non-root user (1000:1000) | Container process runs without root, even if the daemon is compromised |
| Read-only config mount | Config cannot be modified from inside the container |
Resource limits
Section titled “Resource limits”Adjust based on your expected agent workload:
deploy: resources: limits: memory: 512M reservations: memory: 128MFor heavier workloads (multiple concurrent agents, large context windows), increase the memory limit. The reservation ensures the container gets at least 128M even under host memory pressure.
Baked CLIs
Section titled “Baked CLIs”The Docker image comes with the provider CLIs pre-installed. You don’t need to install any provider CLI on the host — the image is self-contained.
| CLI | Command | Used by |
|---|---|---|
| Claude Code | bundled in the @anthropic-ai/claude-agent-sdk dependency | claude-code provider |
| Codex CLI | codex | codex-cli provider |
| Gemini CLI | gemini | gemini-cli provider |
| GitHub CLI | gh | Agents that work with GitHub |
This means your talond.yaml provider configuration works out of the box without any host-side setup. Just configure your API keys in .env and the container has everything it needs.
GitHub CLI
Section titled “GitHub CLI”To authenticate gh inside the container, set the optional GH_TOKEN in .env. Every process that talond starts can read it. Use a fine-grained token limited to the repositories and permissions your agents need. Run docker compose up -d talond after you change it so the container gets the new value.
CLI login state
Section titled “CLI login state”The talond user has a home directory at /home/talond. Codex CLI and Gemini CLI write their config and login state under ~/.codex and ~/.gemini. That state does not survive container recreation. Use API-key auth, or bind-mount /home/talond, if you need it to persist.
MCP OAuth in Docker
Section titled “MCP OAuth in Docker”The starter bundle publishes the OAuth callback port on host loopback only (127.0.0.1:8788). Authorize an OAuth MCP server from the host:
talonctl auth-mcp <skill>:<server> --dockerOpen the printed URL in the host browser. The callback listens only while the command runs. If you change --port, change the Compose port mapping to match. See MCP integration.
Browser voice in Docker
Section titled “Browser voice in Docker”Browser voice is off by default and the Compose files publish no port for it. To use it with a container:
- Set
voice.portto a fixed port. The default is0. - The voice listener binds
127.0.0.1inside the container by default. A reverse proxy outside the container’s network namespace cannot reach that. Setvoice.hostto0.0.0.0or another reachable address. - Publish or route the port to your reverse proxy only. Restrict network access to it.
- Route
/voice/on the HTTPS host to the voice port. The proxy must preserveHostandOriginand sendX-Forwarded-Proto: https.
Origin, authentication and CSRF checks apply on every listener address.
Image uploads
Section titled “Image uploads”Image support needs no extra container setup. Normalized image files live under /data/threads/<thread_id>/attachments/images/, inside the data volume. See the Vision guide.
Permissions
Section titled “Permissions”The container runs as a non-root user with predictable UID/GID 1000:1000. This matters for bind-mounts:
# On the host, ensure the config file is readable by UID 1000:chown 1000:1000 config/talond.yamlchmod 644 config/talond.yaml
# For the data directory (if bind-mounting instead of using a named volume):mkdir -p /opt/talond/datachown 1000:1000 /opt/talond/dataNamed volumes (like talond-data) handle permissions automatically. Bind-mounts require the host directory to be accessible by UID 1000.
Security
Section titled “Security”Docker socket proxy
Section titled “Docker socket proxy”Instead of mounting the raw Docker socket, use a proxy that restricts which API endpoints are available:
# In docker-compose.yaml, add a proxy service:services: docker-proxy: image: tecnativa/docker-socket-proxy volumes: - /var/run/docker.sock:/var/run/docker.sock environment: CONTAINERS: 1 # Allow container create/start/stop IMAGES: 1 # Allow image pull/list NETWORKS: 1 # Allow network operations # Deny everything else by default ports: - "127.0.0.1:2375:2375"
talond: environment: DOCKER_HOST: tcp://docker-proxy:2375 # No Docker socket mount neededRootless Docker
Section titled “Rootless Docker”Run the entire Docker daemon in rootless mode. The socket then grants only the user’s permissions, not root:
# Install and configure rootless Dockerdockerd-rootless-setuptool.sh installsystemctl --user enable dockersystemctl --user start docker
# The socket is at /run/user/1000/docker.sock# Mount it instead of /var/run/docker.sockDefense-in-depth summary
Section titled “Defense-in-depth summary”| Layer | What it does |
|---|---|
Non-root user (1000:1000) | Process runs without root privileges |
cap_drop: ALL | No Linux capabilities available |
no-new-privileges:true | setuid/setgid binaries cannot escalate |
| Read-only config | Config cannot be tampered with from inside |
| Socket proxy (optional) | Restrict Docker API access to needed endpoints |
| Rootless Docker (optional) | Docker daemon itself runs without root |
Troubleshooting
Section titled “Troubleshooting”Permission denied on config file
Section titled “Permission denied on config file”Error: EACCES: permission denied, open '/config/talond.yaml'The container runs as UID 1000. Fix permissions on the host:
chown 1000:1000 config/talond.yamlchmod 644 config/talond.yamlAuth directory not persisting
Section titled “Auth directory not persisting”Codex CLI and Gemini CLI store login state under /home/talond (~/.codex, ~/.gemini). That directory is not a volume, so the state is lost when the container is recreated. Use API-key auth, or bind-mount /home/talond. MCP OAuth token bundles live under /data/mcp-auth/ and persist with the data volume.
Config changes not taking effect
Section titled “Config changes not taking effect”The config file is bind-mounted read-only. Changes on the host take effect after a container restart:
# Edit config/talond.yaml on the host, then:docker compose -f deploy/docker-compose.yaml restartContainer exits immediately
Section titled “Container exits immediately”Check the logs:
docker compose -f deploy/docker-compose.yaml logs talondCommon causes:
- Missing or invalid
config/talond.yaml - Missing
.envfile with required secrets - Config references environment variables that aren’t set in
.env
Health check failing
Section titled “Health check failing”If the container shows as unhealthy:
# Check what the health check seesdocker inspect talond --format='{{json .State.Health}}' | jqThe health check verifies that the daemon process named in the PID file is alive. If it’s failing, the daemon may have crashed — check the logs.