Synopsis
Description
serve starts the profClaw HTTP API server. It displays an ASCII banner, checks that the configured port is available, then spawns the server process. In production mode it monitors the child process and automatically restarts it on crash using exponential backoff (up to 5 restart attempts).
The server exposes:
- REST API at
http://localhost:<port>/api - Health endpoint at
http://localhost:<port>/health - Web UI at
http://localhost:<port>/
Flags
Port to listen on. Must be available. If already in use, the command exits with instructions to free the port or use an alternate.
Disable scheduled cron jobs. The server starts normally but no cron triggers will fire.
Run in development mode with file watching via
tsx watch. Auto-restarts on source changes. Disables the crash-restart loop.Disable automatic restart on crash. Used internally by the
daemon subcommand - the OS service manager handles restarts.Crash Recovery
In production mode (serve without --dev), the process manager applies exponential backoff:
| Attempt | Wait |
|---|---|
| 1 | 1s |
| 2 | 2s |
| 3 | 4s |
| 4 | 8s |
| 5 | 16s |
profclaw serve again.
Examples
Environment Variables
| Variable | Description |
|---|---|
PORT | Overrides the --port flag |
ENABLE_CRON | Set to false to disable cron (same as --no-cron) |
PROFCLAW_MODE | Deployment mode (pico, mini, pro) |
Related
profclaw daemon- Run as a system service (launchd/systemd)profclaw status- Check server healthprofclaw logs- View server logsprofclaw doctor- Diagnose startup issues