Skip to content

Docker

Sairo ships as a single Docker image. You can run it directly with docker run or use Docker Compose for a more reproducible setup.

The quickest way to start Sairo:

Terminal window
docker run -d --name sairo -p 8000:8000 \
-e S3_ENDPOINT=https://your-s3-endpoint.com \
-e S3_ACCESS_KEY=your-access-key \
-e S3_SECRET_KEY=your-secret-key \
-e ADMIN_PASS=choose-a-strong-password \
-e JWT_SECRET=$(openssl rand -hex 32) \
-v sairo-data:/data \
stephenjr002/sairo:latest

For production or team environments, Docker Compose keeps your configuration in version control.

Terminal window
cp .env.example .env

Edit .env and fill in your S3 credentials and admin password. See the Configuration reference for all available variables.

Terminal window
docker compose up -d
services:
sairo:
build: .
ports:
- "8000:8000"
env_file: .env
volumes:
- sairo-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/healthz')"]
interval: 30s
timeout: 5s
retries: 3
volumes:
sairo-data:

Every push to main and every version tag produces a Docker image. The following tags are available on Docker Hub:

TagWhen pushedUse case
:latestEvery push to mainDevelopment, always the newest build
:X.Y.Z (e.g. :2.1.0)On vX.Y.Z releaseProduction — pin to an exact release
:X.Y (e.g. :2.1)On vX.Y.Z releaseTrack patch updates within a minor version
:sha-abc1234Every push + releasePinpoint a specific commit

All images are built for linux/amd64 and linux/arm64.

The /data directory inside the container stores all SQLite database files (one per bucket). Mounting a named volume or host path to /data ensures your index survives container restarts.

Container pathPurpose
/dataSQLite databases (per-bucket .db files, WAL journals)

If you lose the /data volume, Sairo will simply rebuild the index from S3 on the next startup. No data is lost, but the initial crawl will take time depending on how many objects you have.

Sairo exposes a health check endpoint:

GET /healthz

Returns 200 OK when the service is ready. Use this in Docker health checks, load balancer probes, or monitoring systems.

Terminal window
curl -f http://localhost:8000/healthz

Sairo’s authentication relies on cookies with the Secure flag enabled by default. This means cookies are only transmitted over HTTPS connections.

Terminal window
# SECURE_COOKIE defaults to true -- no change needed
-e S3_ENDPOINT=https://s3.example.com

To upgrade Sairo to a new version:

Terminal window
docker pull stephenjr002/sairo:latest
docker stop sairo
docker rm sairo
# Re-run the original docker run command

Your SQLite index in the sairo-data volume is preserved across upgrades. Sairo handles any necessary schema migrations automatically on startup.