Skip to content

CLI Commands Reference

Complete reference for all commands and options provided by the epd CLI.


Command Overview

CommandUsageDescription
epd initepd init [--ci]Initialize a new project with interactive runtime detection.
epd setupepd setup [--host <ip>]Provision server prerequisites, launch Traefik, and run initial deploy.
epd deployepd deploy [-d <dest>]Build and deploy with zero downtime blue/green switching.
epd redeployepd redeployRestart current running version without rebuilding or uploading.
epd rollbackepd rollback [version]Revert traffic to the previous version or a listed version.
epd statusepd status [--json]Show live slots, running replicas, accessories, and route health.
epd logsepd logs [-f] [-n <num>]Stream and tail logs from services, accessories, or servers.
epd execepd exec -- <cmd>Execute a one-off command in the app's container environment.
epd shellepd shellOpen an interactive terminal inside a live replica or accessory.
epd proxyepd proxy <action>Inspect, view logs, view routes, or restart shared Traefik proxy.
epd dnsepd dns <action>Check status or synchronize DNS records with Cloudflare or Hetzner.
epd hetznerepd hetzner <action>List, create, provision, or delete Hetzner Cloud servers.
epd lockepd lock <action>Inspect or clear atomic deployment locks.
epd configepd config [--raw]Validate and display resolved epd.yml configuration.
epd docker-commandepd docker-commandOutput copy-pasteable docker run commands for debugging.
epd removeepd remove [-y]Stop application, remove routes, and delete files from servers.

epd init

Interactively initializes epd.yml for the current project.

bash
epd init [options]

Options:

  • --name <name>: Override project name (defaults to folder name or package.json).
  • --mode <docker|process>: Choose deployment runtime.
  • --host <ip>: Server host IP address.
  • --domain <domain>: Public domain to configure.
  • --port <port>: Internal application port (default: 3000).
  • --dockerfile: Automatically generate a starter Dockerfile.
  • --ci: Automatically generate .github/workflows/deploy.yml.

epd setup

Prepares fresh servers for deployment.

bash
epd setup [options]

Options:

  • --host <ip>: Run setup only on a specific host.
  • --skip-deploy: Install prerequisites and start Traefik without executing the first deploy.

epd deploy

Executes a zero-downtime blue/green deployment.

bash
epd deploy [options]

Options:

  • -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.
  • --no-build: Skip local image build (deploy existing image tag).
  • --version <tag>: Explicit version/tag to assign to this release.
  • --recreate-accessories: Rebuild and restart accessory containers (PostgreSQL, Redis, etc.).
  • --skip-health: Skip healthcheck verification (not recommended for production).
  • --skip-hooks: Skip pre_deploy / post_deploy lifecycle scripts.
  • --skip-lock: Bypass atomic deployment concurrency lock.

epd rollback

Instantly re-routes live traffic to the previously healthy slot.

bash
# 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 current state across all servers.

bash
epd status [options]

Options:

  • --json: Output state as structured JSON (useful for custom monitoring scripts).

epd logs

View or follow live container or PM2 logs.

bash
epd logs [options]

Options:

  • -f, --follow: Follow / stream logs in real time.
  • -n, --lines <number>: Number of lines to show from the end of the logs (default: 100).
  • --service <name>: Filter logs to a specific service (e.g. web or worker).
  • --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).

epd exec

Run a one-off command inside the app's container environment on the server.

bash
# Run database migrations
epd exec -- bun run db:migrate

# Open an interactive shell inside Postgres accessory
epd exec --accessory db -i -- psql -U postgres

epd shell

Opens an interactive shell inside a running replica container.

bash
epd shell
epd shell --accessory db
epd shell --host 203.0.113.10

epd proxy

Manage and inspect the shared host Traefik reverse proxy.

bash
epd proxy status    # View Traefik container status
epd proxy logs -f   # Tail live Traefik access & error logs
epd proxy routes    # View rendered dynamic routing configuration
epd proxy reboot    # Restart Traefik proxy

epd dns

Manage automated DNS record synchronization with Cloudflare or Hetzner DNS.

bash
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 proxy

epd hetzner

Manage Hetzner Cloud infrastructure directly.

bash
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 server

epd lock

Manage atomic deployment locks.

bash
epd lock status     # Check who currently holds the deploy lock
epd lock release    # Forcefully release the deploy lock

epd remove

Completely tear down an application from the servers.

bash
epd remove
epd remove -y              # Non-interactive confirmation
epd remove --keep-data     # Leave persistent volume data on disk

Released under the MIT License.