docs Installation
Installation
Install DeployKit on your server in minutes.
Install via the CLI (Recommended)
DeployKit is installed and managed with the official @deploykit/cli. SSH into your VPS (Node.js 20+ required), install it globally and run the installer:
npm install -g @deploykit/cli
sudo deploykit install --domain deploy.example.com --email you@example.com
# Or one-shot, without a global install
sudo npx @deploykit/cli install --domain deploy.example.com --email you@example.comRun sudo deploykit install without --domain / --email in a terminal to be prompted for the dashboard domain, the Let's Encrypt email, and an optional admin email and password. By default the latest released version is installed; see the CLI Reference for --tag, --branch and the other flags.
What the installer does
- Checks it is running on Linux as root and reports the system specs
- Installs Git, Docker and the Docker Compose plugin if they are missing
- Clones DeployKit into /opt/deploykit at the selected release
- Generates every secret (database password, JWT secrets, encryption key, webhook secret) into /opt/deploykit/.env with mode 600. If a .env already exists, its secrets are kept and only the domain and email are updated
- Creates the deploykit-network Docker network and /var/backups/deploykit, builds the images and starts the stack
- Waits for the API and, if you passed an admin email and password, tries to create the admin account
Redis password (v0.6.0+): since v0.6.0 the production Compose file refuses to start without REDIS_PASSWORD in .env, and the installer does not generate it yet. If the install stops with Set REDIS_PASSWORD in .env, add one (hex only — it goes inside a redis:// URL) and run the same install command again; your generated secrets are kept:
echo "REDIS_PASSWORD=$(openssl rand -hex 32)" | sudo tee -a /opt/deploykit/.env
sudo deploykit install --domain deploy.example.com --email you@example.comManual Installation
If you prefer to run the production Compose file yourself:
# 1. Clone the repository (pick a release tag)
git clone https://github.com/deploykithq/deploykit.git /opt/deploykit
cd /opt/deploykit
git checkout v0.6.0
# 2. Create .env from the production template
cp .env.production .env
# Set DOMAIN and ACME_EMAIL, then replace every CHANGE_ME:
openssl rand -hex 32 # ENCRYPTION_KEY (64 hex chars)
openssl rand -hex 32 # REDIS_PASSWORD (hex only)
openssl rand -hex 24 # DB_PASSWORD (hex: it is embedded in DATABASE_URL)
openssl rand -base64 32 # JWT_SECRET, JWT_REFRESH_SECRET, WEBHOOK_SECRET
# 3. The proxy network is external and must exist first
docker network create deploykit-network
# 4. Build and start everything (migrations run when the API starts)
docker compose -f docker-compose.prod.yml up -d --buildDo not set WEB_URL in production — the Compose file derives it as https://${DOMAIN}. See Configuration for every variable.
What Gets Installed
- Traefik v3.6 — Reverse proxy on ports 80/443 with automatic Let's Encrypt SSL (HTTP → HTTPS redirect)
- Docker socket proxy — Read-only Docker API for Traefik
- PostgreSQL 16 — Main database (volume pgdata)
- Redis 7 — Password-protected job queue and cache (volume redis-data)
- DeployKit API — Node 20 Alpine container with Docker socket access; serves /api, /trpc and /ws on your domain
- DeployKit Web — The dashboard, served on the same domain
Host paths used: /opt/deploykit (install), /var/backups/deploykit (database and game-server backups) and /var/lib/deploykit/compose (Compose stack files).
Post-Installation
Point an A record for your domain at the server's public IP — Traefik requests the certificate on the first request. Then open https://deploy.example.com. If no admin account was created during install, you'll see a registration form: the first user to register becomes the admin, and registration closes after that. Continue with the Quickstart.
Updating DeployKit
# Latest release
sudo deploykit update
# Pin (or roll back to) a specific release
sudo deploykit update --tag v0.6.0
# Manual installs
cd /opt/deploykit && git pull && docker compose -f docker-compose.prod.yml up -d --buildDatabase migrations run automatically when the API container starts, and it refuses to start if they fail. Upgrading to v0.6.0 from an earlier version requires adding REDIS_PASSWORD to .env first (see above).
Tip: if the API container will not start and its logs show relation "users" already exists, the database was created by an old fallback that left no migration bookkeeping. Repair it once with sudo scripts/repair-migration-state.sh from /opt/deploykit.