Managing PC2
Complete guide to managing your PC2 installation.
Process Management
PC2 runs as a background process. Commands depend on your installation method.
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 # Monitor dashboard
Systemd (VPS)
systemctl status pc2-node # Check status
journalctl -u pc2-node -f # View logs (live)
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 # Enable on boot
Desktop App
The desktop app provides a GUI: click Start/Stop, view status indicator (green/red/yellow), and check logs in the Logs panel.
Health Check
curl http://localhost:4200/health
Returns:
{
"status": "ok",
"version": "0.1.1",
"uptime": 3600
}
Configuration
Config file location: ~/pc2.net/pc2-node/data/config/pc2.json
Common Settings
{
"http_port": 4200,
"owner": "0x..."
}
Change Port
- Edit
pc2.json, change"http_port": 4200to desired port - Restart PC2
Lock to Specific Wallet
Set an owner to restrict access: add "owner": "0xYourWalletAddress" to pc2.json and restart.
For the full configuration reference, see Configuration.
Monitoring
Resource Usage
pm2 monit # PM2 dashboard
htop # System 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 App | In-app Logs panel |
Clear Logs
pm2 flush pc2 # PM2
sudo journalctl --vacuum-time=7d # Systemd
Quick Troubleshooting
PC2 won't start: Check logs (pm2 logs pc2), check port (lsof -i :4200), check Node version (node --version, need v20+).
High CPU usage: Check for AI processing or indexing tasks. View processes with htop.
Out of disk space: Empty trash in PC2 UI, remove old backups, clear logs with pm2 flush.
For the full troubleshooting guide, see Troubleshooting.