CLI Commands Reference
Complete reference for all commands and options provided by the epd CLI.
Command Overview
The epd command line is organized into five functional categories:
Deploy & Lifecycle
| Command | Usage | Description |
|---|---|---|
epd init | epd init [--ci] | Initialize a new project with interactive runtime detection. |
epd setup | epd setup [--host <ip>] | Provision server prerequisites, launch Traefik, install SSH keys, and run initial deploy. |
epd deploy | epd deploy [-d <dest>] [--dry-run] | Build and deploy with zero-downtime blue/green switching. |
epd redeploy | epd redeploy [--dry-run] | Restart current running version without rebuilding or uploading. |
epd rollback | epd rollback [version] | Revert traffic to the previous version or a listed version. |
epd remove | epd remove [-y] | Stop application, remove routes, and delete files from servers. |
Observability & Metrics
| Command | Usage | Description |
|---|---|---|
epd status | epd status [--json] | Show live slots, running replicas, accessories, and route health. |
epd logs | epd logs [-f] [-n <num>] | Stream and tail logs from services, accessories, or servers. |
epd top | epd top [--once] | Real-time multi-server CPU, memory, and container monitor (epd stats). |
epd ssl | epd ssl [--host <ip>] | Inspect and verify Let's Encrypt SSL/TLS certificates (epd certs). |
epd config | epd config [--raw] | Validate and display resolved epd.yml configuration. |
epd docker-command | epd docker-command | Output copy-pasteable docker run commands for debugging. |
Server Management
| Command | Usage | Description |
|---|---|---|
epd exec | epd exec -- <cmd> | Execute a one-off command in the app's container environment. |
epd shell | epd shell | Open an interactive terminal inside a live replica or accessory. |
epd lock | epd lock <action> | Inspect or clear atomic deployment locks. |
epd proxy | epd proxy <action> | Inspect, view logs, view routes, or restart shared Traefik proxy. |
epd maintenance | epd maintenance <on|off> | Zero-downtime 503 maintenance mode toggle. |
epd backup | epd backup [accessory] | Create compressed database and volume snapshot archives. |
epd restore | epd restore <file> | Restore a database or volume snapshot into a live accessory. |
Cloud & Automation
| Command | Usage | Description |
|---|---|---|
epd gh-action | epd gh-action | Generate GitHub Actions CI/CD workflow (epd ci). |
epd auth | epd auth [subcommand] | Manage linked Cloudflare & Hetzner credentials globally or per project. |
epd dns | epd dns <action> | Check status or synchronize DNS records with Cloudflare or Hetzner. |
epd cloudflare | epd cloudflare <action> | Manage Cloudflare DNS records for application domains. |
epd hetzner | epd hetzner <action> | List, create, provision, or delete Hetzner Cloud servers. |
epd sevalla | epd sevalla <action> | Manage Sevalla applications and managed database clusters. |
Diagnostics & Tools
| Command | Usage | Description |
|---|---|---|
epd doctor | epd doctor [--local] | Run pre-flight health, configuration, and server connectivity diagnostics. |
epd completion | epd completion <shell> | Generate shell autocompletion script (bash, zsh, fish). |
epd update | epd update | Check for updates and upgrade to the latest version. |
Global options
| Option | Description |
|---|---|
-c, --config <file> | Path to epd.yml |
-d, --destination <d> | Overlay epd.<d>.yml (staging, production, …) |
-v, --verbose | Print every command epd runs |
--log-format <pretty|json> | Output format (also EPD_LOG_FORMAT). See below. |
Run logs
Every command writes a complete, timestamped log on the machine running epd, including the output of every build and remote command and the debug detail that --verbose would show. When a command fails, epd prints the path:
Full log: ~/.local/state/epd/logs/2026-10-07_15-29-06-deploy-18749.logLogs live in $XDG_STATE_HOME/epd/logs (default ~/.local/state/epd/logs), the newest 200 are kept. Set EPD_LOG_DIR to move them, or EPD_LOG_DIR=off to disable them.
A command that produces no output for 20 seconds reports that it is still running (… still running: docker buildx build (40s)), so a slow step is never mistaken for a hung one. When a deploy fails on a host, epd prints the state, exit code and last log lines of the containers it started before rolling back.
Machine-readable output
With --log-format json every line on stdout is one JSON event, and the last line is always a result event, even for argument errors and interrupts:
{"ts":"…","t":12,"level":"step","msg":"Preparing servers","phase":"prepare"}
{"ts":"…","t":840,"level":"output","msg":"#5 DONE 0.4s","stream":"stderr","label":"docker buildx build"}
{"ts":"…","t":9120,"level":"host","host":"10.0.0.5","msg":"web: healthy","phase":"health"}
{"ts":"…","t":9900,"level":"result","ok":true,"code":0,"msg":"ok","logFile":"/…/deploy.log"}| Field | Meaning |
|---|---|
level | step, info, ok, warn, error, debug, host, output, plain, result |
phase | On step/host events: plan, connect, build, push, hooks, prepare, accessories, proxy, deploy, health, routes, diagnose |
host | The server the line concerns |
stream, label | For output: child stream and the command that produced it |
ok, code, hint, logFile | On the final result event |
json mode never prompts. On SIGINT/SIGTERM epd releases the deploy lock, emits a result with code 130/143 and exits, so CI runners and the web control plane can cancel a deploy safely.
epd init
Interactively initializes epd.yml for the current project.
epd init [options]Options:
--name <name>: Override project name (defaults to folder name orpackage.json).--mode <docker|process>: Choose deployment runtime (dockerorprocess).--host <ip>: Server host IP address.--domain <domain>: Public domain to configure.--port <port>: Internal application port (default: 3000).--dockerfile: Automatically generate a production-ready starterDockerfile.--ci: Automatically generate.github/workflows/deploy.yml.
epd doctor
Run comprehensive pre-flight diagnostics on your local tooling, project configuration, environment secrets, and remote servers before running a deployment.
epd doctor [options]Options:
-l, --local: Only run local diagnostics (skips SSH connections to remote servers). Useful when working offline or in air-gapped environments.
Diagnostics performed:
- Local environment: Runtime version, Docker CLI and daemon response, clean git tree verification, SSH client and permissions on private keys (
0600). - Configuration & Secrets: Validates
epd.ymlschema, verifies that all declared secrets exist in.envor system environment, and checks cloud DNS token availability. - Remote servers: Validates SSH ping latency, tests passwordless sudo status, queries remote Docker daemon health, checks available disk space (
df -h /), and detects active deploy locks.
epd completion
Generate shell autocompletion scripts for Zsh, Bash, or Fish.
epd completion <bash|zsh|fish>Setup Instructions:
# Add to ~/.zshrc:
eval "$(epd completion zsh)"
# Or generate completion file:
epd completion zsh > ~/.zsh/completion/_epd# Add to ~/.bashrc:
source <(epd completion bash)
# Or save to system completions:
epd completion bash | sudo tee /etc/bash_completion.d/epd > /dev/null# Add to ~/.config/fish/config.fish:
epd completion fish | source
# Or generate completions file:
epd completion fish > ~/.config/fish/completions/epd.fishepd setup
Prepares fresh servers for deployment. Installs Docker (or rsync and pm2 in process mode), creates the shared bridge network, configures Let's Encrypt Traefik reverse proxy, and runs the initial deployment.
epd setup [options]Interactive SSH Key Installation:
When running epd setup against a brand new server where SSH keys have not yet been installed, EPD prompts for the account's initial password in the terminal. It then automatically installs your public SSH key (~/.ssh/id_ed25519.pub), verifies passwordless key authentication, and configures passwordless sudo in /etc/sudoers.d/epd. You only have to enter the server password once!
Options:
--host <ip>: Run setup only on a specific host (repeatable).--skip-deploy: Install prerequisites and start Traefik without executing the first deploy.
epd deploy
Executes a zero-downtime blue/green deployment. The new version starts alongside the existing live slot, passes its configured health checks, and only then does the reverse proxy seamlessly transition traffic.
epd deploy [options]Options:
--dry-run: Simulate the deployment plan without building images, making SSH connections, or altering remote servers.-d, --destination <name>: Deploy using overlay configuration (e.g.epd.staging.yml).--service <name>: Deploy only a specific service group (e.g.--service web).--host <ip>: Deploy only to a specific host (repeatable).--no-build: Skip local image build (reuse an image already present on the servers).--version <tag>: Explicit version or git tag to deploy instead of the current commit.--recreate-accessories: Rebuild and restart accessory containers (PostgreSQL, Redis, etc.).--skip-health: Skip healthcheck verification (not recommended for production).--skip-hooks: Skippre_deploy/post_deploylifecycle scripts.--skip-lock: Bypass atomic deployment concurrency lock.
epd redeploy
Restarts the currently running version across all servers without rebuilding or re-uploading container images.
epd redeploy [options]epd rollback
Instantly re-routes live traffic to the previously healthy slot without re-building.
# Roll back to the immediately preceding version
epd rollback
# List all deployable versions stored on the server
epd rollback --list
# Roll back to a specific version
epd rollback <version>epd status
Displays the live deployment state across all configured hosts.
epd status [options]Options:
--json: Output state as structured JSON (ideal for status dashboards or CI scripts).
epd logs
View or follow live container or PM2 logs across replicas and hosts.
epd logs [options]Options:
-f, --follow: Follow / stream logs in real time.-n, --lines <number>: Number of lines to show from the end of logs (default: 100).--service <name>: Filter logs to a specific service (e.g.weborworker).--accessory <name>: View logs from an accessory container (e.g.db).--host <ip>: Filter logs to a specific server.--grep <pattern>: Filter log lines matching a string or pattern.--since <time>: Show logs since timestamp (e.g.10m,1h,2026-09-08T15:00:00).
epd exec
Run a one-off command inside the app's container environment on the server.
# Run database migrations
epd exec -- bun run db:migrate
# Open an interactive shell inside Postgres accessory
epd exec --accessory db -i -- psql -U postgresepd shell
Opens an interactive shell inside a running replica container or accessory.
epd shell
epd shell --accessory db
epd shell --host 203.0.113.10epd top
Real-time multi-server metrics monitor (aliased as epd stats). Displays CPU %, memory consumption, container processes, network I/O, disk usage, and host load averages across all servers.
epd top # Launch interactive streaming metrics dashboard (2s refresh)
epd top --once # Print a single metrics snapshot and exit
epd top --host 203.0.113.10 # Monitor a specific serverepd ssl
Inspect and verify Let's Encrypt SSL/TLS certificates managed by Traefik across your servers (aliased as epd certs).
epd ssl # Display table of domains, SANs, issuers, and days remaining
epd ssl --json # Output certificate metadata as JSON
epd ssl --host 203.0.113.10 # Query a specific hostepd maintenance
Toggle or inspect zero-downtime maintenance mode for this application. Injects an instant Traefik routing override that presents a responsive 503 Maintenance page to all public visitors without stopping backend containers or dropping TLS certificates.
epd maintenance status # Check if maintenance mode is active
epd maintenance on # Enable maintenance mode
epd maintenance on -m "Upgrading database. Back at 15:00 UTC."
epd maintenance off # Disable maintenance mode and restore trafficepd database
Provision and verify a self-hosted PostgreSQL accessory, or stream a logical database backup and restore. Docker must already be installed on the target. Provisioning publishes PostgreSQL to host loopback, retains a persistent Docker volume, refuses existing containers or volumes, and succeeds only after SELECT 1 works.
epd database provision --accessory database --port 5432 --memory 1024
epd database check --accessory database
epd database backup --accessory database --file ./database.sql.gz
epd database restore --accessory database --file ./database.sql.gz --yesThe accessory must use a supported PostgreSQL Alpine image and define POSTGRES_DB, POSTGRES_USER, and a password of at least 20 characters. Backups use pg_dump --clean --if-exists; restore runs SQL in a single transaction with ON_ERROR_STOP, then verifies a query. Restore replaces database objects, so create a protection backup first. External clients must forward the host loopback port through SSH.
epd archive
Archive a non-database Docker accessory's declared named volume. This is the supported project volume archive path used by the dashboard. Select a volume by its zero-based position in the accessory's volumes list.
accessories:
uploads:
image: alpine:3.22
host: 203.0.113.10
command: sleep 86400
volumes:
- uploads_data:/dataepd archive backup --accessory uploads --volume-index 0 --file ./uploads.tar.gz --log-format json
# Record the SHA256 target fingerprint in the ARCHIVE_TARGET log message.
epd archive restore --accessory uploads --volume-index 0 --file ./uploads.tar.gz --expected-target <recorded-fingerprint> --yesBackup and restore stop the owning accessory while streaming and restore its original running state afterward. The configured named volume must be mounted by that accessory; another running container using it prevents the operation. Bind mounts, process-mode projects and database images are unsupported here. Use logical database backups for databases.
Restore verifies that the host, accessory container, named volume and destination match the recorded target. It rejects traversal paths, links and special files, extracts into staging, and copies current contents before replacement. If rollback itself fails, .epd-archive-old retains recovery data. Existing .epd-archive-* entries block another operation until an operator inspects them. Leave enough free volume space for the archive, staged extraction and protection copy.
The dashboard adds organization and role checks, pinned SSH credentials, uploaded archive SHA256 read-back verification, a verified protection backup before restore, explicit storage-object deletion and opt-in scheduled retention. Its restore form requires the exact project name. Direct CLI archives remain local files; keep and verify a separate protection backup before confirming replacement.
epd backup
Create compressed database and volume backups from running accessories (PostgreSQL, MySQL, MariaDB, MongoDB, or generic persistent volumes).
epd backup # Back up all configured accessories
epd backup db # Back up a specific database accessory
epd backup db -o ./my-backup.sql.gz # Custom local output file pathepd restore
Restore a database or volume snapshot into a live running accessory.
epd restore ./backups/myapp-db-2026-09-07.sql.gz
epd restore ./backups/myapp-db.sql.gz --accessory db -y # Skip confirmation promptepd gh-action
Generate a production-ready GitHub Actions deployment workflow (aliased as epd ci).
epd gh-action [options]Prompts for trigger events (push, pull_request, or both), target git branch, and destination overlay. Displays the exact repository secrets required (SSH_PRIVATE_KEY, DNS tokens, etc.).
epd auth
Manage linked Cloudflare and Hetzner accounts (aliased as epd login).
epd auth [status|cloudflare|hetzner|logout]epd dns
Manage automated DNS record synchronization with Cloudflare or Hetzner DNS.
epd dns status # Compare live DNS records against server IPs
epd dns sync # Synchronize A/AAAA records
epd dns sync --dry-run # Preview changes without making API requests
epd dns sync --no-proxied # Disable Cloudflare CDN orange-cloud proxyepd hetzner
Manage Hetzner Cloud infrastructure directly.
epd hetzner list # List all servers in your Hetzner Cloud project
epd hetzner types # View server specs and prices (vCPU, RAM, EUR/mo)
epd hetzner locations # List available datacenter locations
epd hetzner create <name> # Create new VPS (e.g. --type cx22 --location fsn1)
epd hetzner create <name> --setup # Create and immediately configure with epd setup
epd hetzner delete <name> # Delete serverepd sevalla
Manage Sevalla cloud applications, deployments, and managed database clusters.
epd sevalla list # List all Sevalla applications
epd sevalla databases # List managed database clusters
epd sevalla deploy <id> # Trigger deployment of a Sevalla applicationepd lock
Manage atomic deployment locks.
epd lock status # Who holds the deploy lock on each server; flags locks that look stale
epd lock release # Release the deploy lock on every server (use when no deploy is running)A lock looks stale when the process that took it is gone (same machine) or it has been held for more than 6 hours. epd lock release is the override. epd deploy --skip-lock ignores the lock for a single deploy, and should be used only with the same care.
epd remove
Completely tear down an application from the servers.
epd remove
epd remove -y # Non-interactive confirmation
epd remove --keep-data # Leave persistent volume data on diskepd update
Check for new releases and upgrade EPD to the latest version.
epd update