docs CLI Reference

CLI Reference

Install, update, and manage your DeployKit instance from the command line.

Overview

@deploykit/cli is the official Node CLI for installing and operating a DeployKit instance: install, update, status, logs, restart and uninstall. It manages the DeployKit stack itself, not your applications — those are managed from the dashboard or the API. It only runs on Linux (it refuses to run on macOS or Windows), so connect to your VPS via SSH and run it there.

Install

bash
# Global install
npm install -g @deploykit/cli

# Or one-shot via npx
sudo npx @deploykit/cli install --domain deploy.example.com --email you@example.com

Requirements: Linux VPS (Ubuntu, Debian, RHEL, Alpine), Node.js >= 20, root or sudo access, and ports 80/443 reachable from the internet. Every command except status and logs must run as root.

deploykit install

Bootstraps DeployKit on the current machine: installs Git, Docker and Docker Compose if missing, clones the selected release to /opt/deploykit, generates secrets into .env (or keeps an existing one, updating only the domain and email), builds and starts every service, and optionally creates the admin account.

bash
sudo deploykit install \
  --domain deploy.example.com \
  --email you@example.com \
  --admin-email admin@example.com \
  --admin-password mypassword123

Omitting --domain or --email in a TTY drops into interactive prompts. If the admin account cannot be created automatically, the installer says so — open the dashboard and register; the first user becomes admin.

FlagDescriptionDefault
--domain <domain>Dashboard domain (required)—
--email <email>Let's Encrypt email (required)—
--admin-email <email>Pre-create admin account—
--admin-password <pwd>Admin password, min 8 chars—
--dir <path>Install directory/opt/deploykit
--tag <tag>Install a specific release, e.g. v0.6.0 (the v is optional)latest release
--branch <branch>Install from a Git branch instead of a release—

By default the CLI installs the highest released semver tag (pre-releases are ignored). An unknown --tag fails immediately and lists the tags that exist; if the repository has no release at all, it falls back to master.

REDIS_PASSWORD: DeployKit v0.6.0 requires REDIS_PASSWORD in .env, which the CLI does not generate yet. If an install or update stops with Set REDIS_PASSWORD in .env, run echo "REDIS_PASSWORD=$(openssl rand -hex 32)" | sudo tee -a /opt/deploykit/.env and re-run the command.

deploykit update

Moves the installation to the latest release, rebuilds the images, restarts the stack and waits for the API. Database migrations run automatically on API startup. Takes the same --tag and --branch flags as install, so you can pin or roll back to a release.

bash
sudo deploykit update                 # latest release
sudo deploykit update --tag v0.6.0    # pin (or roll back) to a release
sudo deploykit update --branch master # track unreleased code

deploykit status

Lists the DeployKit containers via docker compose ps.

bash
deploykit status

deploykit logs

Follows live logs from every DeployKit service (docker compose logs -f). Useful when debugging a failed deploy or a misbehaving worker.

bash
deploykit logs

deploykit restart

Restarts every DeployKit service in place (docker compose restart). A restart does not pick up changes to .env — to apply those, recreate the containers with docker compose -f docker-compose.prod.yml up -d --build from /opt/deploykit (see Configuration).

bash
sudo deploykit restart

deploykit uninstall

Stops the stack with docker compose down -v, removes the DeployKit images and deletes the install directory. Without --yes it asks you to type yes, and refuses to run non-interactively. --delete-data also deletes the backups in /var/backups/deploykit. Docker, user-deployed containers and deploykit-network are never touched.

bash
sudo deploykit uninstall --yes
sudo deploykit uninstall --yes --delete-data

Warning: down -v removes the stack's named volumes — including the PostgreSQL database and Redis data — even without --delete-data. Export your configuration (Settings → Configuration export and import) and copy your backups off the server before uninstalling.

Global Flags

Every subcommand accepts --dir <path> to point at a non-default install location, and --help to print usage:

bash
deploykit --help
deploykit install --help
deploykit --version