Self-Hosting

Your infrastructure,
your reviews.

Run Crit Web on your own server with Docker. Share reviews within your team without sending data to a third party.

tomasz-tomczyk/crit-web

Source code, Dockerfile, example configs, and issue tracker.

View on GitHub →
01

Prerequisites

Docker with Compose. That's it.

Docker

With Compose plugin (included in Docker Desktop and most server installs).

PostgreSQL 17

Bundled in the docker-compose file, or bring your own.

02

Download and configure

Grab the example files and generate a secret key.

Terminal
# Download config files
$ curl -o docker-compose.yml \
https://raw.githubusercontent.com/tomasz-tomczyk/crit-web/main/contrib/docker-compose.example.yml
$ curl -o .env \
https://raw.githubusercontent.com/tomasz-tomczyk/crit-web/main/.env.example
# Generate a secret key
$ openssl rand -base64 64

Set SECRET_KEY_BASE and PHX_HOST in your .env file.

03

Start the services

One command. Database migrations run automatically.

Terminal
$ docker compose up -d
Container crit-db Started
Container crit-web Started
$ # Ready at https://crit.example.com
04

Environment variables

All configuration lives in .env.

DATABASE_URL

PostgreSQL connection URL

required
SECRET_KEY_BASE

64+ byte secret for signing cookies

required
SELFHOSTED

Set to true to enable self-hosted mode (dashboard, no marketing pages)

required
PHX_HOST

Hostname where crit-web is served

required
PHX_SERVER

Set to true to start the web server

required
ADMIN_PASSWORD

Password for the admin dashboard (if unset, dashboard is open)

optional
PORT

HTTP port (default: 4000)

optional
PHX_SCHEME

URL scheme for generated links (default: https)

optional
FORCE_SSL

Set to true to force HTTPS redirects (not needed behind a reverse proxy)

optional
POOL_SIZE

Database connection pool size (default: 10)

optional
05

Using your own Postgres

Skip the bundled database and point to an existing instance.

Terminal
$ docker run -d \
--name crit-web \
--restart unless-stopped \
-e DATABASE_URL="postgres://user:pass@your-host:5432/crit" \
-e SECRET_KEY_BASE="your-generated-secret" \
-e PHX_HOST="crit.example.com" \
-e SELFHOSTED=true \
-e PHX_SERVER=true \
-e PORT=4000 \
-p 4000:4000 \
ghcr.io/tomasz-tomczyk/crit-web:latest \
sh -c "/app/bin/migrate && /app/bin/server"
06

Updating

Pull the latest image and restart.

Terminal
$ docker compose pull
$ docker compose up -d
Updated to latest

Docker Image

Available tags.

Images are published to GitHub Container Registry.

latest

Latest stable release. Recommended for production.

main

Bleeding edge. Built from the main branch on every push.

1.2.3

Pin a specific version. Use for reproducible deployments.

What's next

Keep going.