PC2 Operations
Operator reference for running PC2 as a long-lived service — process management, logs, config, monitoring. If you're running PC2 from the Desktop Launcher on your own machine and just want Start/Stop, see Managing PC2 instead.
Process management
PC2 runs as a background process. Which command you use depends on how you installed it.
PM2 (local install)
pm2 status # Check status
pm2 logs pc2 # View logs
pm2 stop pc2 # Stop server
pm2 start pc2 # Start server
pm2 restart pc2 # Restart server
pm2 monit # Live monitoring dashboard
Systemd (VPS / production)
systemctl status pc2-node # Check status
journalctl -u pc2-node -f # View logs (live tail)
sudo systemctl stop pc2-node # Stop server
sudo systemctl start pc2-node # Start server
sudo systemctl restart pc2-node # Restart server
sudo systemctl enable pc2-node # Start on boot
Health endpoint
curl http://localhost:4200/health
Returns:
{
"status": "ok",
"version": "0.1.1",
"uptime": 3600
}
Useful for load balancers, uptime monitors, and cron-driven sanity checks.
Configuration
Config file location:
~/pc2.net/pc2-node/data/config/pc2.json
Common settings
{
"http_port": 4200,
"owner": "0x..."
}
Change the port. Edit pc2.json, change "http_port": 4200 to the desired port, then restart PC2.
Lock to a specific wallet. Add "owner": "0xYourWalletAddress" to pc2.json and restart. After this, only that wallet can log in.
For every available config key, see the full Configuration Reference.
Monitoring
Resource usage
pm2 monit # PM2 dashboard
htop # System-wide resources
Disk usage
du -sh ~/pc2.net/data # PC2 data size
df -h # Available space
Logs
| Installation | Log location |
|---|---|
| PM2 | pm2 logs pc2 or ~/.pm2/logs/ |
| Systemd | journalctl -u pc2-node |
| Desktop Launcher | In-app Logs panel |
Clear logs
pm2 flush pc2 # PM2
sudo journalctl --vacuum-time=7d # Systemd (older than 7 days)
Quick troubleshooting
PC2 won't start. Check logs (pm2 logs pc2 or journalctl -u pc2-node -n 200), check the port is free (lsof -i :4200), check Node version (node --version — needs v20+).
High CPU usage. Check for AI processing or background indexing tasks. htop shows per-process CPU.
Out of disk space. Empty trash in the PC2 UI, remove old backups, clear logs with pm2 flush pc2 or journalctl --vacuum-time=.
For deeper diagnostics see Troubleshooting.