Skip to content

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.

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:

Terminal window
# 1. Download and extract the starter bundle
curl -fsSL https://github.com/ivo-toby/talon/releases/latest/download/talon-starter.tar.gz | tar xz
cd talon-starter
# 2. Install the talonctl helper (no sudo)
./install.sh
# 3. Configure
cp .env.example .env # add your bot token and provider key
cp config/talond.example.yaml config/talond.yaml # set allowedChatIds, pick a provider
# 4. Run
docker compose up -d
talonctl status

The 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.

The rest of this page describes deploy/Dockerfile and deploy/docker-compose.yaml in the Talon repository. To build and run the image yourself:

Terminal window
# 1. Copy and edit the example config
cp config/talond.example.yaml config/talond.yaml
# 2. Set up environment variables
cp deploy/.env.example deploy/.env
# Fill in your secrets (API keys, tokens)
# 3. Create the bind-mount directories
mkdir -p personas data
# 4. Start the daemon
docker compose -f deploy/docker-compose.yaml up -d
# 5. Verify it's running
docker compose -f deploy/docker-compose.yaml ps
docker compose -f deploy/docker-compose.yaml logs -f

The image uses a multi-stage build to keep the final image small:

StageBase imagePurpose
buildernode:24-slimInstalls all dependencies, compiles TypeScript to dist/
productionnode:24-slimMinimal runtime with only production dependencies
  • 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:talond with fixed UID/GID 1000: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), curl and jq for agents that shell out
  • Tool instructions: the build copies templates/tool-instructions/*.md into the image, so personas get the same tool guidance as a source install
  • Image support: the build loads the sharp native 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 directory
RUN groupadd --gid 1000 talond && \
useradd --uid 1000 --gid talond --create-home --shell /usr/sbin/nologin talond
# Switch to non-root user
USER talond
# Health check via PID file
HEALTHCHECK --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"]

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:

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
VolumeTypePurpose
talond-data:/dataNamedSQLite database, PID file, IPC sockets — persists across restarts
../config/talond.yaml:/config/talond.yamlBind-mount (read-only)Your configuration — edit on the host, the container picks it up on restart
../personas:/personasBind-mountPersona directories and system prompts
../skills:/skills, ../subagents:/subagentsBind-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.

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.yaml

Every entry in the env file is visible to talond and to the processes it starts.

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.sock

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: 3

The compose file applies defense-in-depth beyond what the Dockerfile alone provides:

# Drop ALL Linux capabilities — Talon doesn't need any
cap_drop:
- ALL
# Prevent privilege escalation via setuid/setgid binaries
security_opt:
- no-new-privileges:true
SettingEffect
cap_drop: ALLRemoves all Linux capabilities from the container
no-new-privileges:truePrevents 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 mountConfig cannot be modified from inside the container

Adjust based on your expected agent workload:

deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M

For 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.

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.

CLICommandUsed by
Claude Codebundled in the @anthropic-ai/claude-agent-sdk dependencyclaude-code provider
Codex CLIcodexcodex-cli provider
Gemini CLIgeminigemini-cli provider
GitHub CLIghAgents 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.

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.

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.

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:

Terminal window
talonctl auth-mcp <skill>:<server> --docker

Open 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 is off by default and the Compose files publish no port for it. To use it with a container:

  • Set voice.port to a fixed port. The default is 0.
  • The voice listener binds 127.0.0.1 inside the container by default. A reverse proxy outside the container’s network namespace cannot reach that. Set voice.host to 0.0.0.0 or 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 preserve Host and Origin and send X-Forwarded-Proto: https.

Origin, authentication and CSRF checks apply on every listener address.

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.

The container runs as a non-root user with predictable UID/GID 1000:1000. This matters for bind-mounts:

Terminal window
# On the host, ensure the config file is readable by UID 1000:
chown 1000:1000 config/talond.yaml
chmod 644 config/talond.yaml
# For the data directory (if bind-mounting instead of using a named volume):
mkdir -p /opt/talond/data
chown 1000:1000 /opt/talond/data

Named volumes (like talond-data) handle permissions automatically. Bind-mounts require the host directory to be accessible by UID 1000.

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 needed

Run the entire Docker daemon in rootless mode. The socket then grants only the user’s permissions, not root:

Terminal window
# Install and configure rootless Docker
dockerd-rootless-setuptool.sh install
systemctl --user enable docker
systemctl --user start docker
# The socket is at /run/user/1000/docker.sock
# Mount it instead of /var/run/docker.sock
LayerWhat it does
Non-root user (1000:1000)Process runs without root privileges
cap_drop: ALLNo Linux capabilities available
no-new-privileges:truesetuid/setgid binaries cannot escalate
Read-only configConfig 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
Error: EACCES: permission denied, open '/config/talond.yaml'

The container runs as UID 1000. Fix permissions on the host:

Terminal window
chown 1000:1000 config/talond.yaml
chmod 644 config/talond.yaml

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.

The config file is bind-mounted read-only. Changes on the host take effect after a container restart:

Terminal window
# Edit config/talond.yaml on the host, then:
docker compose -f deploy/docker-compose.yaml restart

Check the logs:

Terminal window
docker compose -f deploy/docker-compose.yaml logs talond

Common causes:

  • Missing or invalid config/talond.yaml
  • Missing .env file with required secrets
  • Config references environment variables that aren’t set in .env

If the container shows as unhealthy:

Terminal window
# Check what the health check sees
docker inspect talond --format='{{json .State.Health}}' | jq

The 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.