24/7 VPS Deployment (PM2 & Cat Den Ops)
Production daemon setup, PM2 process management, automated updates, and health diagnostics.
[24/7 DAEMON OPS]
OpenCatz AI runs as a resilient Node.js daemon managed by PM2 under the process name opencatz-agent. It features automatic crash restart, detached memory management, and webhook alerts for deployments.
1. Production VPS Quickstart
# Step 1: Install & bootstrap repository in one command:
curl -fsSL https://opencatz.xyz/install.sh | bash
# Step 2: Interactive onboarding wizard (if not run automatically):
opencatz onboard
# Step 3: Launch 24/7 background PM2 daemon:
opencatz deploy 2. Process Management Commands
| Command | Function & Description |
|---|---|
opencatz deploy | Installs dependencies, builds TypeScript, and starts/reloads opencatz-agent in PM2. |
npx pm2 logs opencatz-agent | Streams live stdout/stderr logs from the background screening daemon. |
npx pm2 restart opencatz-agent | Zero-downtime hot restart of all agent worker threads. |
npx pm2 stop opencatz-agent | Gracefully stops background screening daemons without losing database state. |
npx pm2 status | Displays CPU usage, memory consumption, uptime, and restart counts. |
3. Automated Self-Updater
Updating OpenCatz is seamless. Run opencatz update (or trigger /update in Discord). The script automatically performs:
- Stashes any uncommitted local adjustments.
- Runs
git pull --ff-onlyfrom the official repository. - Installs any newly introduced npm dependencies.
- Recompiles TypeScript into
dist/. - Triggers a detached restart of the PM2 daemon.
- Sends a deployment confirmation card to Telegram and Discord webhooks (if configured).
# Run updater from CLI:
opencatz update 4. Diagnostic Health Doctor
Run opencatz doctor anytime to verify RPC endpoints, API key quotas, SQLite state, and Discord bot connectivity:
# Run full system diagnostics:
opencatz doctor 5. Clean Uninstallation
If you ever need to reset your environment or uninstall the daemon:
# Stop PM2 daemons and clean build artifacts:
opencatz uninstall