Skip to content

Quickstart

This page walks you from zero to a supervised, log-captured, auto- restarting service in three commands.

Assumes Lynx is already installed and the daemon is running (systemctl is-active lynxd or pgrep lynxd).

Pick any long-running command. This example uses Node, but it could just as easily be python, go run, bun dev, or a compiled binary.

Terminal window
lynxpm start "node server.js" --name api --namespace prod --restart always

What the flags mean:

  • --name api — the label you’ll refer to it by.
  • --namespace prod — groups this process with every other prod:* app for bulk operations.
  • --restart always — restart on any exit. Other policies: never, on-failure.

After a successful start, Lynx prints the current process table with the new row marked :

✓ Started api
ID: 019dbd…
PID: 2336607
Status: running
┌──────────┬──────┬──────────┬────────┬─────────┐
│ id │ name │ namespace│ status │ pid │
├──────────┼──────┼──────────┼────────┼─────────┤
│ ▸ 019dbd │ api │ prod │ running│ 2336607 │
└──────────┴──────┴──────────┴────────┴─────────┘
Terminal window
lynxpm list # full table
lynxpm show api # detail view for one process
lynxpm logs api --follow # live stdout/stderr

Every lifecycle command accepts a namespace selector, so you never need xargs loops:

Terminal window
lynxpm restart --namespace prod # roll every prod:* app
lynxpm stop 'prod:*' # halt the tier (quote the glob)
lynxpm delete --namespace old --purge