Skip to content

Self-hosting

One KALLH server runs one club, with its own Postgres database. You need a machine that can run Docker (1 GB of memory is plenty for a club) and a domain name for the club.

Terminal window
curl -O https://raw.githubusercontent.com/kallhq/kallh/main/docker-compose.example.yml
curl -o .env https://raw.githubusercontent.com/kallhq/kallh/main/server/.env.example
mv docker-compose.example.yml docker-compose.yml

In .env, set at least:

  • SESSION_SECRET: a long random value (openssl rand -hex 32)
  • CLUB_NAME: your club’s name
  • CLUB_FEATURES: the parts your club uses (see Configuration)

In docker-compose.yml, replace change-me with a database password (in both places). Then:

Terminal window
docker compose up -d
docker compose exec app node server/dist/scripts/createAdmin.js <username> <password>

Open http://<your-server>:3001 and sign in. Everything else (members, rates, emails, payments) is set up in the app itself, and its Getting started checklist walks you through it.

Put a reverse proxy that handles TLS in front of KALLH, such as Caddy, Traefik or nginx. Pass the original Host header through, and set COOKIE_SECURE=true in .env. With Caddy, for example:

club.example.org {
reverse_proxy localhost:3001
}

Set PUBLIC_BASE_URL=https://club.example.org so links in emails point to your site.

To use an existing Postgres 16 or newer (a managed one, for example), set DATABASE_URL in .env and drop the db service from docker-compose.yml. KALLH creates its own tables in that database; add ?sslmode=require for a managed database that needs TLS.