/docs/vps/daemon

Daemon

What is nextdeployd?

nextdeployd is the lightweight supervisor process that runs permanently on your VPS. It manages the lifecycle of Caddy, Node.js, and the optional Go Sidecar โ€” restarting them on crash, collecting logs, and executing atomic cutovers when you ship a new release.

Process tree

nextdeployd (PID 1 or systemd unit)
โ”œโ”€โ”€ caddy             (edge proxy + TLS)
โ”œโ”€โ”€ node server.js    (Next.js app โ€” current release)
โ”‚   โ””โ”€โ”€ [workers]
โ””โ”€โ”€ go-sidecar        (optional โ€” enabled in nextdeploy.yml)

Common commands

Status

$ nextdeploy status

  Service        Status    PID     Uptime
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  caddy          running   1842    3d 14h
  node           running   1901    3d 14h
  go-sidecar     running   1923    3d 14h

  Current release: v23  (commit a1b2c3d)
  Previous release: v22  (commit f9e8d7c) โ€” kept for rollback

Logs

# Stream all logs
nextdeploy logs

# Filter by service
nextdeploy logs --service node
nextdeploy logs --service go-sidecar

# Last 100 lines
nextdeploy logs --tail 100

Rollback

# Roll back to the previous release instantly
nextdeploy rollback

# Roll back to a specific release by id
nextdeploy rollback --release v21

Crash recovery

nextdeployd uses an exponential back-off restart strategy. If a process crashes more than 5 times in 60 seconds, the daemon marks it as unhealthy and sends an alert via the configured webhook. The previous release is left running during this window.