Self-hosting
Evaluate with Docker Compose
Run critlab on one machine from a source checkout, with Postgres, Redis, SeaweedFS and Caddy in Docker Compose.
The fastest way to try self-hosted critlab is on one machine: Docker Compose runs Postgres, Redis, SeaweedFS and Caddy, and the three critlab services run from a source checkout. Plan on about fifteen minutes.
Prerequisites
- Docker with Compose (Docker Desktop, Colima or plain Docker Engine).
- Node.js 22.23.4 or newer (the repository pins the line in
.nvmrc) and pnpm 9 through Corepack. - Git, and free local ports 3000, 4000, 4001, 4010, 5432, 6379 and 9000.
- Chrome or another browser that resolves
*.localhostto your machine (the sandbox zone defaults tos.localhost:4000).
1. Get the code and configure it
git clone https://github.com/critlab/critlab.git
cd critlab
cp .env.example .envTwo secrets in .env are blank. Generate a value for each and paste it after the = on the matching line, AUTH_SECRET= and SANDBOX_TOKEN_SECRET=:
openssl rand -base64 32
openssl rand -base64 48.env already points every service at the Compose defaults: Postgres on 5432, Redis on 6379, SeaweedFS's S3 API on 9000 with bucket critlab, the sandbox zone at s.localhost:4000, realtime at ws://localhost:4010. The configuration reference explains every variable.
2. Start the infrastructure
corepack enable
pnpm install
pnpm infra:uppnpm infra:up runs docker compose up -d with:
| Service | Image | Host port | Notes |
|---|---|---|---|
| postgres | postgres:16-alpine | 5432 | user, password and database are all critlab |
| redis | redis:7-alpine | 6379 | |
| seaweedfs | chrislusf/seaweedfs:4.47 | 9000 | S3 API only; credentials from infra/seaweedfs/s3.json |
| seaweedfs-init | amazon/aws-cli | — | creates the critlab bucket, then exits |
| caddy | caddy:2-alpine | 4000 | the sandbox origin, proxying to the sandbox service on 4001 |
3. Migrate and run
pnpm db:migrate
pnpm devpnpm dev starts web on http://localhost:3000, the sandbox service on 4001 (reached through Caddy on 4000) and realtime on 4010.
4. Sign in
Open http://localhost:3000/signup and enter any email address. With no mail transport configured, the six-digit code is printed in the pnpm dev output inside a box marked [critlab:mail] console transport. Enter it and you have a workspace.
Upload a build folder, open its share link, press C and click something to leave the first comment.
5. Try the features a licence unlocks
An unlicensed install caps each workspace at the Free plan's limits. To lift the limits for evaluation:
pnpm --filter @critlab/db set-plan <workspace-slug> proTeam and Enterprise features (SSO, SCIM, audit export, your own bucket, custom domains, integrations, members-only access) need a licence key; ask us for an evaluation key. See Licence.
Stop and reset
pnpm infra:downData survives in the Compose volumes critlab_postgres_data and critlab_seaweedfs_data. Remove them with docker volume rm after infra:down to start over.