Skip to content

Docker

The silo image holds the control plane with the console compiled in. It makes every Bot’s machine through Docker’s socket.

Make Silo’s directory and give it to uid 1000, the user the control plane runs as:

Terminal window
sudo mkdir -p /var/lib/silo
sudo chown 1000:1000 /var/lib/silo

Put these two files in a directory of their own. DOCKER_GID is the group of Docker’s socket, which the control plane’s user joins: stat -c %g /var/run/docker.sock prints it.

.env
SILO_VERSION=v1.0.0
SILO_PUBLIC_URL=https://silo.example.com
SILO_DB_PASSWORD=change-me
SILO_ADMIN_EMAIL=you@example.com
SILO_ADMIN_PASSWORD=change-me-too
DOCKER_GID=999
compose.yaml
# Not "silo": compose would name containers silo-…, which is the prefix of
# the containers Silo makes itself.
name: silohost
services:
db:
image: pgvector/pgvector:pg17
container_name: silodb
restart: unless-stopped
environment:
POSTGRES_USER: silo
POSTGRES_PASSWORD: ${SILO_DB_PASSWORD}
POSTGRES_DB: silo
volumes:
- silodb:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U silo -d silo"]
interval: 5s
timeout: 3s
retries: 30
silo:
image: ghcr.io/d-513/silo:${SILO_VERSION}
container_name: silo
restart: unless-stopped
depends_on:
db:
condition: service_healthy
# The socket's group, so uid 1000 may use it.
group_add:
- "${DOCKER_GID}"
volumes:
- /var/run/docker.sock:/run/docker.sock
# The same path on both sides. Never a named volume.
- /var/lib/silo:/var/lib/silo
ports:
- "8080:8080" # the console, and the Bots' machines
- "8081:8081" # the workers' port, where the network filter sends the Bots' machines
- "3479:3479/udp" # calls
- "3479:3479/tcp"
- "25:2525" # mail, if you use it
environment:
SILO_DATABASE_URL: postgres://silo:${SILO_DB_PASSWORD}@db:5432/silo?sslmode=disable
SILO_PUBLIC_URL: ${SILO_PUBLIC_URL}
SILO_BOOTSTRAP__EMAIL: ${SILO_ADMIN_EMAIL}
SILO_BOOTSTRAP__PASSWORD: ${SILO_ADMIN_PASSWORD}
volumes:
silodb:
Terminal window
docker compose up -d
docker compose logs -f silo

The same control plane, next to a Postgres 17 with pgvector that you already run:

Terminal window
docker run -d --name silo --restart unless-stopped \
-v /var/run/docker.sock:/run/docker.sock \
--group-add "$(stat -c %g /var/run/docker.sock)" \
-v /var/lib/silo:/var/lib/silo \
-p 8080:8080 -p 8081:8081 -p 3479:3479/udp -p 3479:3479/tcp -p 25:2525 \
-e SILO_DATABASE_URL=postgres://… \
-e SILO_PUBLIC_URL=https://silo.example.com \
-e SILO_BOOTSTRAP__EMAIL=you@example.com \
-e SILO_BOOTSTRAP__PASSWORD=change-me \
ghcr.io/d-513/silo:v1.0.0
  • The socket at /run/docker.sock inside the container. The control plane makes every other container through it.
  • The data directory at the same path as on the host (/var/lib/silo on both sides). The engine binds folders under it into the Bots’ machines and reads those paths on the host, so a different path or a named volume points every workspace at nothing.
  • Ports 8080 and 8081 published on the host. The Bots’ machines dial the control plane there: 8081 through the network filter, 8080 without it. Put TLS in front of 8080 for people (Reverse proxy), keep both from the internet, and set SILO_PUBLIC_URL to the proxy’s address.
  • No container named silo-…. That prefix belongs to the containers Silo makes.

The first admin is made at the first start from SILO_BOOTSTRAP__*, and those two settings do nothing once an admin exists. Use the newest version from the releases in place of v1.0.0.

Then go on with Getting started, and put a reverse proxy in front.

Change SILO_VERSION and bring it up again:

Terminal window
docker compose pull && docker compose up -d

A control plane runs the Bot and sidecar images of its own version, and fetches them itself. A running Bot gets its new image the next time it starts from stopped.

  • The network filter, as above.
  • TLS. The image serves plain HTTP on 8080; a reverse proxy in front is yours to run. Reverse proxy has examples.
  • Backups of the database volume and /var/lib/silo.