Skip to content
Cluster Docs
Menu
On this page
Self-host

Requirements

What a server needs to run Cluster with Docker Compose, which services it starts, which ports it uses, and measured sizing.

Cluster runs as a set of containers described in docker-compose.yml. This page lists what the server needs before you follow First start.

Server

  • A Linux server with Docker Engine and Docker Compose v2.
  • A checkout of the Cluster repository at a release tag. docker compose build builds the images on the server, so you do not need Node.js or pnpm on the host: the images carry their own runtime.
  • A domain or subdomain pointing at the server. The web app and the API must be served from the same site (one domain, or subdomains of one domain) over HTTPS, or nobody stays signed in. See HTTPS and reverse proxy.
  • Optional: an SMTP account for invitations, password links and security emails. Without one, Cluster sends no email and administrators hand over access links instead.

Services

The stack starts these services with docker compose up -d. Nothing outside the server is required: the database, the cache and file storage all run in the stack.

ServiceWhat it isNotes
postgresPostgreSQL 16All data. Volume postgres-data.
redisRedis 7.4Rate-limit counters only; losing them weakens nothing. Requires REDIS_PASSWORD.
storageSeaweedFS, S3-compatible object storageUploaded files and images. Volume storage-data. The browser never reaches it directly.
migrateOne-shot jobCreates the database roles and applies migrations, then exits. The only container with the database owner's credentials.
apiThe Cluster APIStarts after migrate succeeds.
webThe web appStarts when api is healthy.
collabRealtime editing serviceRequires COLLAB_INTERNAL_SECRET, the same value the API uses.
caddyOptional TLS proxyOnly with --profile proxy. Gets and renews the certificate.

Ports

PortBound toUsed by
80, 443 (TCP) and 443 (UDP)All interfacescaddy, or your own reverse proxy
3000127.0.0.1web (default of WEB_PORT)
3001127.0.0.1api (default of API_PORT)
3002127.0.0.1collab (default of COLLAB_PORT)

PostgreSQL, Redis and storage publish no port; they are reachable only inside the Compose network. Open only SSH, 80 and 443 in the server firewall.

Memory and CPU limits in the stack

The Compose file caps api at 1 CPU and API_MEMORY_LIMIT (1 GB by default; lesson video uploads and playback need more than 512 MB), and web and collab at 1 CPU and 512 MB each. PostgreSQL, Redis and storage have no limits.

Measured sizing

One load test was run with the whole stack pinned to a fixed number of cores and memory, using synthetic users on a fast desktop core (4.8 GHz). Each simulated person kept live connections open and acted every 15 seconds (ordinary use) or every 5 seconds (intensive use): opening pages and images, the learning screens, the directory and search. It did not include a large GROW dataset (many courses, assignments and reports).

LimitsOrdinary useIntensive use
1 CPU, 2 GBabout 150 people75 to 100 people
2 CPU, 4 GB500 people, and still coping150 to 200 people
  • A cloud vCPU can be up to twice as slow as the core used in the test. Treat these figures as a starting point and measure on your own server.
  • Signing in is the most expensive action. In the same test, 100 people signing in in the same second took about 20 seconds on 2 CPU; 100 people signing in over one minute was fine.
  • The memory of the whole stack peaked between 570 and 930 MB in every run.

Disk

Stored files grow the most: images up to 20 MB, documents up to 50 MB and uploaded lesson videos up to 1 GB each. Text pages are small. Plan room for:

  • The PostgreSQL and storage volumes, and their backups (see Backups and restore).
  • The container images and the build.
  • The temporary folder for uploads (UPLOAD_TMP_DIR, or the system temporary folder when empty): up to 3 videos of 1 GB can be in flight at once, and the API refuses an upload that would leave less than 512 MB free there.