Skip to main content

Auto Updates

PC2 includes a macOS-style auto-update system.

How It Works

  1. Check -- node checks for updates every 6 hours
  2. Notify -- toast notification when update available
  3. Confirm -- you decide when to install
  4. Install -- one-click automatic update
  5. Restart -- server restarts, page refreshes

Update Notification

When an update is available, you'll see a toast popup (bottom-right) and a banner in Settings -> About. Click "Update Now" to proceed.

Update Process

When you click "Install Update":

  1. Downloading -- git pull origin main
  2. Installing -- npm install
  3. Building -- npm run build
  4. Restarting -- server restart
  5. Complete -- page auto-refreshes

A progress modal shows each step.

Desktop Launcher Update

If you use the ElastOS Desktop Launcher, it displays the installed PC2 version and checks for updates automatically. When a new release is available, an "Update" button appears -- click it to update with zero terminal commands.

Manual Update

If you prefer manual control:

cd ~/pc2.net && git fetch origin && git reset --hard origin/main
cd pc2-node && npm install --legacy-peer-deps && npm run build
pm2 restart pc2 # or: systemctl restart pc2-node (on VPS)

Check Current Version

From UI: Go to Settings -> About.

From API:

curl http://localhost:4200/api/update/status

Rollback

If an update causes issues:

git log --oneline -10
git checkout <commit-hash>
npm run build
systemctl restart pc2-node
warning

Rolling back may lose features. Only do this if absolutely necessary.

Disable Auto-Check

Edit data/config/pc2.json:

{
"updates": {
"autoCheck": false
}
}

You can still check manually in Settings.

Troubleshooting

Update stuck: Check server logs with journalctl -u pc2-node -f, refresh the page, or try manual update via SSH.

Build failed: Check disk space (df -h), memory (free -m), and npm errors in logs.