Skip to content

Docker Setup

Octipus runs as a multi-container Docker application with three services:

ServiceImagePurpose
octipus-appCustom (Bun + Next.js)API backend + web frontend
octipus-dbpgvector/pgvector:pg16PostgreSQL with vector extensions
octipus-valkeyvalkey/valkey:7.2-alpineCaching and pub/sub (Redis-compatible)

The repository’s root docker-compose.yml defines all three. The app container points DATABASE_URL / REDIS_URL at the octipus-db / octipus-valkey service names automatically, so the only values you must supply are the three security keys.

Terminal window
# From the cloned repo root. Generate the three required secrets and put them
# in .env.docker (the compose env_file), e.g.:
cat > .env.docker <<EOF
MASTER_KEY=$(openssl rand -hex 32)
JWT_SECRET=$(openssl rand -hex 32)
SESSION_SECRET=$(openssl rand -hex 32)
EOF
# Build and start the full stack (app + db + cache)
docker compose up --build -d
# View logs
docker compose logs -f octipus

The backend runs migrations on first boot — no manual migrate step. Once it’s up, complete admin + model setup against the container from your host:

Terminal window
octi setup --remote http://localhost:3015

Then open the web UI at http://localhost:3017.

The compose file maps host ports to the in-container ports (host → container):

ServiceHost portContainer portEnv override
API30153005OCTIPUS_API_PORT
Web UI30173007OCTIPUS_WEB_PORT
PostgreSQL54425432POSTGRES_PORT
Valkey63896379REDIS_PORT
VolumeContainer PathPurpose
octipus-workspace/data/workspaceAgent workspace (files created by agents)
octipus-documents/data/documentsUploaded documents
octipus-extensions/data/extensionsPlugins and extensions
octipus-pgdataPostgreSQL dataDatabase persistence
octipus-valkeyValkey dataCache persistence

The container includes these tools for agent shell access:

CategoryTools
Corebash, curl, wget, git, ca-certificates
Text/Datajq, sed, awk, grep, ripgrep, less
Filestree, file, zip, unzip, tar, gzip, rsync
Buildmake, bun
Scriptingpython3 (minimal)
Remoteopenssh-client (ssh, scp, sftp)
  • Filesystem — full access within mounted volumes
  • Shell — commands run inside the container using installed tools
  • Git — fully functional (SSH keys need mounting)
  • Browser Extension — runs in user’s real browser, connects via WebSocket
  • Playwright — headless browser inside the container
  • Database & Valkey — full access
  • MCP Servers — SSE transport works; stdio-based must be installed in the container
  • Network — full outbound access
CapabilityReasonWorkaround
Host CLI toolsContainer isolationInstall in Dockerfile or use Docker socket
Host filesystemOnly mounted volumes visibleAdd bind mounts in docker-compose.yml
Host processesContainer isolationUse Docker socket for other containers
GUI applicationsNo display serverUse browser extension (runs on host)

The Docker socket is mounted into the container, allowing Octipus to spawn sibling containers on the host’s Docker engine:

volumes:
- //var/run/docker.sock:/var/run/docker.sock

This enables running language-specific tools, building Docker images, and managing other containers. Docker socket access is powerful — only enable in trusted environments.

services:
octipus:
volumes:
- /path/on/host:/data/workspace/host-files:ro # read-only
- ~/projects:/data/workspace/projects # read-write

Mount into subdirectories of /data/workspace so agents can access them via the filesystem tool.

Terminal window
# Rebuild and restart (preserves data volumes)
docker compose down && docker compose up --build -d
# Full reset (deletes all data)
docker compose down -v && docker compose up --build -d