ACTIVE PLATFORM:

24/7 Deployment & Daemon Ops (PM2)

Production daemon setup, PM2 process management for Linux, Windows & VPS, 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 restarts, detached memory management, automated failover, and deployment status notifications sent to Telegram and Discord.

1. Production Quickstart by Platform

🐧 Linux / VPS (Ubuntu, Debian, CentOS)

# 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

🪟 Windows (PowerShell / CMD)

# Step 1: Clone and install
git clone https://github.com/dizcorvus/opencatz-ai-robinhood-chain.git
cd opencatz-ai-robinhood-chain
.\setup.bat

# Step 2: Run configuration wizard
npm run wizard

# Step 3: Start 24/7 background process on Windows via PM2
npx pm2 start dist/index.js --name opencatz-agent --update-env
npx pm2 status

2. Process Management Commands

Command Function & Description
opencatz deploy / npm run deploy Installs dependencies, compiles 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 screening loops and 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 Engine

Updating OpenCatz is seamless. Run opencatz update (or npm run update, or trigger /update in Discord). The updater automatically executes:

  1. Stashes any uncommitted local adjustments.
  2. Runs git pull --ff-only from the official upstream repository.
  3. Installs any newly introduced npm dependencies.
  4. Recompiles TypeScript into dist/.
  5. Triggers a detached restart of the PM2 daemon.
  6. Sends a deployment confirmation card to Telegram and Discord webhooks (if configured).
# Run updater from CLI across any platform:
opencatz update
# (or: npm run update)

4. Diagnostic Health Doctor

Run opencatz doctor (or npm run doctor) anytime to verify RPC endpoints, API key quotas, SQLite state, and Discord bot connectivity:

# Run full system diagnostics:
opencatz doctor

5. Clean Uninstallation & Reset

If you ever need to reset your environment or uninstall the daemon:

# Stop PM2 daemons and clean build artifacts:
opencatz uninstall
# (or: npm run uninstall)