Skip to content

Self-hosting with Docker

One command starts the whole of Chelsea on a machine with Docker and Compose v2: the web app, the background worker, Postgres (with pgvector), Valkey and an S3-compatible file server (RustFS). It needs about 1 GB of free memory and no other tools.

From a copy of the Chelsea repository:

Terminal window
./scripts/selfhost-init.sh # creates .env with generated secrets
docker compose --profile app up -d # builds the image and starts everything

Open http://localhost:8080. The first visit shows a setup page where you name your organization and create the owner account. The page disappears as soon as that account exists, so do it right after the first start. Setup also creates the default roles and catalogs.

  1. Postgres, Valkey and the file server start first.
  2. migrate checks the required settings, applies the database migrations, syncs permissions and creates the storage bucket, then exits.
  3. Only then do web and worker start.

The web app (port 8080) and the file server (port 9000) are published on the host. Postgres and Valkey listen only on the machine itself.

Without --profile app, Compose starts only Postgres, Valkey and the file server, which is what development uses. Every command that touches migrate, web or worker needs --profile app.

Session cookies are HTTPS-only, so anywhere other than localhost Chelsea needs HTTPS in front of it.

  1. Run a reverse proxy (Caddy, Traefik or nginx) that serves two host names over HTTPS: one to web:8080, one to s3:9000.
  2. In .env, set APP_URL=https://chelsea.example.com and S3_PUBLIC_URL=https://files.example.com.
  3. Run docker compose --profile app up -d again.

Browsers download files straight from the file server through short-lived signed links, so S3_PUBLIC_URL must be an address your users’ browsers can reach. Signing in over plain http:// works only on localhost.

To use AWS S3, Garage, SeaweedFS or any other S3-compatible server, remove the s3 service (and migrate’s dependency on it) from compose.yml, then set ENDPOINT, BUCKET, ACCESS_KEY_ID, SECRET_ACCESS_KEY, REGION and, when the server needs it, FORCE_PATH_STYLE=true on the web, worker and migrate services.

  • Configuration lists every setting and which ones you need.
  • Upgrading and backups explains how to update without losing data.
  • Set up email before inviting anyone: invitations, password resets and two-factor codes need it.