Managing PC2
This page documents ElastOS v1 (PC2), the proof of concept. ElastOS v2 is the current system. To install it, see Install ElastOS. To see how the stages fit together, see ElastOS in stages.
Complete guide to managing your PC2 installation - starting, stopping, updating, and monitoring.
Process Management
PC2 runs as a background process. Commands depend on your installation method.
PM2 (Local Install)
Used for local installations via start-local.sh:
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 dashboardSystemd (VPS)
Used for VPS deployments:
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 bootDesktop App
The desktop app provides a GUI:
- Click Start to start the server
- Click Stop to stop the server
- Status indicator shows current state (green/red/yellow)
- View logs in the Logs panel
Updating PC2
Via UI (Recommended)
- Open PC2 in your browser
- Go to Settings → Updates
- Click “Check for Updates”
- If available, click “Install Update”
- Wait for automatic restart
Via Terminal (PM2)
cd ~/pc2.net
git pull origin main
npm install --legacy-peer-deps --include=dev
npm run build
pm2 restart pc2Via Terminal (Systemd)
cd ~/pc2.net
git pull origin main
npm install --legacy-peer-deps --include=dev
npm run build
sudo systemctl restart pc2-nodeHealth Check
PC2 provides a health endpoint:
curl http://localhost:4200/healthReturns:
{
"status": "ok",
"version": "0.1.1",
"uptime": 3600
}Backup & Restore
Create Backup
Via UI: Settings → Storage → Backups → Create Backup
Via Terminal:
cd ~/pc2.net
tar -czvf backup-$(date +%Y%m%d).tar.gz data/Restore Backup
pm2 stop pc2
cd ~/pc2.net
rm -rf data/
tar -xzvf backup-YYYYMMDD.tar.gz
pm2 start pc2Store backups off-site for safety. The data/ directory contains all your files and database.
Configuration
Config file location: ~/pc2.net/pc2-node/config/config.json
Common Settings
{
"port": 4200,
"owner": "0x...",
"ipfs": {
"mode": "hybrid"
}
}Change Port
- Edit config.json
- Change
"port": 4200to desired port - Restart PC2
Lock to Specific Wallet
Set an owner to restrict access:
- Edit config.json
- Add
"owner": "0xYourWalletAddress" - Restart PC2
Monitoring
Resource Usage
# PM2 dashboard
pm2 monit
# System resources
htopDisk Usage
# PC2 data size
du -sh ~/pc2.net/data
# Available space
df -hLogs
| Installation | Log Location |
|---|---|
| PM2 | pm2 logs pc2 or ~/.pm2/logs/ |
| Systemd | journalctl -u pc2-node |
| Desktop App | In-app Logs panel |
Clear Logs
# PM2
pm2 flush pc2
# Systemd
sudo journalctl --vacuum-time=7dTroubleshooting
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
- Check for indexing tasks
- View processes:
htop
Out of Disk Space
- Empty trash in PC2 UI
- Remove old backups
- Clear logs:
pm2 flush