Installation
Prerequisites
- Docker >= 20.10
- Docker Compose >= 2.0 (included with Docker Desktop)
- A server or VM with at least 1 GB RAM and 10 GB disk
- A domain name (for production with HTTPS)
Docker Installation
This is the recommended method. The Docker image bundles everything into a single container with no external dependencies.
-
Create a project directory
Terminal window mkdir -p /opt/club && cd /opt/club -
Create
docker-compose.ymlversion: "3.9"services:club:image: ghcr.io/birjuvachhani/club:latestcontainer_name: clubrestart: unless-stoppedports:- "127.0.0.1:8080:8080"env_file: .envvolumes:- club_data:/datahealthcheck:test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/health"]interval: 30stimeout: 5sretries: 3start_period: 10svolumes:club_data:driver: local -
Create the
.envfileTerminal window # Generate a strong JWT secret (must be at least 32 characters)JWT_SECRET=$(openssl rand -hex 32)cat > .env << EOFSERVER_URL=https://packages.example.comJWT_SECRET=$JWT_SECRETEOFThe only required values are
SERVER_URLandJWT_SECRET. See the configuration reference for all supported environment variables (listen port, DB backend, blob backend, search backend, signup, proxy trust, and so on). -
Start club
Terminal window docker compose up -d -
Create the first (owner) account via the setup wizard
club does not read
ADMIN_EMAILorADMIN_PASSWORD— the first user is created through a one-shot web wizard. On first startup the server prints a one-time setup code to the logs:Terminal window docker compose logs club | grep -i "setup code"Then open
https://packages.example.com/setup, enter your email + the setup code to verify, and submit a display name and password to finish. The first user is created with theownerrole, and/setupis disabled afterwards (requests return 404).
Building from the repository
If you prefer to build the Docker image yourself instead of pulling a pre-built image:
git clone https://github.com/BirjuVachhani/club.gitcd club
# Build the imagedocker build -f docker/Dockerfile -t club:latest .
# Start using the local imagecd dockerdocker compose up -dThe Dockerfile uses a three-stage build:
- Stage 1 (Dart builder) — compiles the Dart server to a native AOT binary using
dart:3.7-sdk - Stage 2 (Node builder) — builds the SvelteKit frontend to static HTML/JS/CSS using
node:22-alpine - Stage 3 (Runtime) — copies the binary and static files into
debian:bookworm-slim(~80 MB total)
No Dart SDK or Node.js runtime is included in the final image.
From-Source Installation
Use this method if you want to run club without Docker, or if you need to modify the source code.
-
Clone the repository
Terminal window git clone https://github.com/BirjuVachhani/club.gitcd club -
Install Dart dependencies
Terminal window dart pub get -
Generate code
The
club_corepackage usesbuild_runnerfor code generation:Terminal window cd packages/club_coredart run build_runner build --delete-conflicting-outputscd ../.. -
Build the frontend
Terminal window cd packages/club_webnpm installnpm run buildcd ../..This produces a static export in
packages/club_web/build/. -
Create data directories
Terminal window sudo mkdir -p /var/lib/club/packagessudo chown $(whoami) /var/lib/club -
Start the server
Terminal window export SERVER_URL=https://packages.example.comexport JWT_SECRET=$(openssl rand -hex 32)export SQLITE_PATH=/var/lib/club/club.dbexport BLOB_PATH=/var/lib/club/packagesexport STATIC_FILES_PATH=packages/club_web/builddart run packages/club_server/bin/server.dartOr build a native binary for better performance:
Terminal window dart build cli -t packages/club_server/bin/server.dart -o build/server./build/server/bundle/bin/serverThe binary always lands at
build/server/bundle/bin/serverwith shared libraries alongside it inbuild/server/bundle/lib/. -
Create the first (owner) account
Watch the startup logs for a one-time setup code, then open
https://packages.example.com/setupin a browser, verify with your email + the code, and submit a display name and password. This step creates theowneraccount and permanently disables/setup.
Verifying the Installation
Health check
The health endpoint does not require authentication:
curl http://localhost:8080/api/v1/healthExpected response:
{"status":"ok"}Web UI
Open your server URL in a browser. You should see the club login page. Log in with the email and password you chose in the setup wizard.
CLI verification
# Install the club CLIcurl -fsSL https://club.birju.dev/install.sh | bash
# Loginclub login https://packages.example.com
# Configure dart pubclub setup
# Verify the token is registereddart pub token listSee the CLI installation guide for Windows, manual downloads, and other options.
You should see your server URL in the list of configured hosted repository tokens.
Next Steps
- First Package — publish your first private Dart package
- Docker deployment — production deployment with volumes, health checks, and logging
- TLS / HTTPS — set up HTTPS (required for production)
- Configuration reference — all environment variables and config options