SSyncropel Docs

Docker Deployment

Run Syncropel in Docker. Covers a single instance, several isolated instances with docker-compose, and a production checklist.

Overview

The syncropic/spl Docker image gives you Syncropel as a self-contained, rootless container. Use it for:

  • Production: one instance behind a reverse proxy, with its data on a Docker volume.
  • Multi-instance development: a coordinator and workers on a private network, each with its own SYNCROPEL_HOME.
  • Repeatable testing: a clean container for each run.

The image is small (about 80–100 MB) and contains only the spl binary and the few tools it needs to run.

Building your own image

A minimal Dockerfile that wraps the released binary:

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
        ca-certificates tini curl \
    && rm -rf /var/lib/apt/lists/*

RUN curl -sSf https://get.syncropic.com/spl | sh \
    && install -Dm755 /root/.local/bin/spl /usr/local/bin/spl

RUN groupadd --system --gid 10001 syncropel \
    && useradd --system --uid 10001 --gid syncropel \
               --create-home --home-dir /home/syncropel syncropel

ENV SYNCROPEL_HOME=/syncropel \
    SPL_SERVE_HOST=0.0.0.0

RUN mkdir -p /syncropel && chown syncropel:syncropel /syncropel
VOLUME /syncropel
USER syncropel
EXPOSE 9100

HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
    CMD curl -fsS http://127.0.0.1:9100/health || exit 1

ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/spl"]
CMD ["serve", "--port", "9100", "--host", "0.0.0.0"]

Build it:

docker build -t myorg/spl:latest .

Single-instance deployment

The simplest deployment: one instance, one volume, one host port:

docker run -d \
  --name spl \
  -p 9100:9100 \
  -v spl-home:/syncropel \
  --restart unless-stopped \
  syncropic/spl:dev

The container:

  • Runs as non-root user syncropel (UID 10001).
  • Uses tini so that stopping the container shuts the server down cleanly.
  • Mounts a named volume at /syncropel, which is the value of SYNCROPEL_HOME. Everything (config, database, secrets, logs) lives in that one path.
  • Listens on 0.0.0.0:9100 inside the container, mapped to localhost:9100 on the host.
  • Reports a HEALTHCHECK every 10 seconds against /health. docker ps shows (healthy) once the instance is ready.

Verify it works:

docker ps                                       # status should show (healthy)
curl http://localhost:9100/health               # returns version + record count
docker exec spl spl version                    # CLI inside the container
docker exec -it spl spl status                 # interactive status

Configuration

Everything is stored under SYNCROPEL_HOME. To customize, mount a host directory or write to the volume directly:

# Option 1: bind-mount a host directory
docker run -d -p 9100:9100 \
  -v $HOME/.syncro:/syncropel \
  syncropic/spl:dev

# Option 2: write a config.toml into a named volume before first start
docker run --rm -v spl-home:/syncropel alpine sh -c \
  'cat > /syncropel/config.toml <<TOML
[identity]
actor = "did:sync:user:prod"
display_name = "Production"
TOML'
docker run -d -p 9100:9100 -v spl-home:/syncropel syncropic/spl:dev

Useful environment variables you can pass with -e:

VariablePurpose
RUST_LOGLog level (info, debug, trace). Default info.
SPL_ACTORSet the instance's identity (also settable in config.toml).
SYNCROPEL_HOMEOverride the home path inside the container. Default /syncropel.

API keys for any configured LLM provider (Anthropic, OpenAI, Google, etc.) are read from ${SYNCROPEL_HOME}/secrets/. The simplest way to provide them is to copy the file into the volume after first start:

docker exec spl mkdir -p /syncropel/secrets
docker cp ~/.syncro/secrets/<provider>.key spl:/syncropel/secrets/<provider>.key
docker exec spl spl stop && docker restart spl

Multi-instance topology with docker-compose

To run several instances (a coordinator and workers, or federation experiments) without touching your host's data, use the docker-compose.yml included with the Syncropel source:

docker compose up -d
docker compose ps

The compose file defines three services on a private bridge network:

ServiceHostnameHost portVolumeIdentity
coordinatorcoordinator9200coordinator-homedid:sync:user:coordinator
worker-aworker-a9201worker-a-homedid:sync:user:worker-a
worker-bworker-b9202worker-b-homedid:sync:user:worker-b

Host ports are in the 9200 range so they don't collide with a production instance that may be running on localhost:9100. Inside each container the instance still listens on its own port 9100. Only the host-side mapping changes.

Each container has its own database, trust, and config, so they are fully isolated. Containers reach each other on the syncropel network by service name:

# From coordinator, ping worker-a's health endpoint
docker compose exec coordinator curl -fsS http://worker-a:9100/health

# Run spl commands inside any instance
docker compose exec coordinator spl status
docker compose exec worker-a spl task list

To wipe everything and start fresh:

docker compose down -v   # -v removes the named volumes too

Production hardening checklist

When you're ready to put a docker deployment in front of real traffic:

  • Reverse proxy with TLS: terminate HTTPS at nginx/caddy/traefik in front of the container. The image serves plain HTTP on port 9100, so TLS is handled by the proxy.
  • Backup the volume: schedule periodic docker run --rm -v spl-home:/data alpine tar -czf - /data snapshots. Restore by extracting back into a new volume before starting the container.
  • Read-only root filesystem: Syncropel doesn't write outside /syncropel, so you can run with --read-only and a writable tmpfs:
    docker run --read-only --tmpfs /tmp -v spl-home:/syncropel ...
  • Resource limits: --memory 1g --cpus 2 is plenty for a single-actor instance. Bump for multi-actor production loads.
  • Permission enforcement: turn on permission rules before exposing the instance. See Permission Enforcement and author an admin allow rule first so you don't lock yourself out.

Troubleshooting

Container exits immediately after startup. Check docker logs spl for the error message. Most common cause: the volume mount has wrong ownership. Fix:

docker run --rm -v spl-home:/syncropel alpine chown -R 10001:10001 /syncropel

Healthcheck stays (unhealthy). The server can be slow to start on first run while it sets up its storage. Wait 30 seconds and re-check. If it's still unhealthy, run the binary in the foreground to see the error:

docker run --rm -v spl-home:/syncropel syncropic/spl:dev serve --port 9100 --host 0.0.0.0

Records lost across restart. The volume isn't mounted. Confirm with docker inspect spl | grep -A 5 Mounts. The Source must be a docker volume or host path, not an anonymous volume.

Two containers conflicting on port 9100. Use distinct host ports: -p 9101:9100, -p 9102:9100, etc. The container always listens on 9100 internally.

On this page