Skip to content

Backups & Upgrades

The entire working directory contains everything you need:

/opt/vps-deployer/
├── vps-deployer.db # Database (all state)
├── vps-deployer.log # Application logs
├── caddy.config # Reference config
├── nginx.config # Reference config
└── <project-id>/ # Project workspaces
Terminal window
tar -czf vps-deployer-backup-$(date +%Y%m%d).tar.gz /opt/vps-deployer/

Add a cron job for daily backups:

Terminal window
0 2 * * * tar -czf /backups/vps-deployer-$(date +\%Y\%m\%d).tar.gz /opt/vps-deployer/
Terminal window
# Stop the service
vps-deployer uninstall
# Restore from backup
tar -xzf vps-deployer-backup-20250101.tar.gz -C /
# Reconfigure (uses existing database)
vps-deployer config -w /opt/vps-deployer -p 3000 -s your-secret-key
# Start
vps-deployer start

Upgrading VPS Deployer is simple. The vps-deployer uninstall command only removes the systemd service — it does not delete your database, working directory, or project files.

Terminal window
vps-deployer uninstall
Terminal window
npm update -g vps-deployer
Terminal window
vps-deployer config -w /opt/vps-deployer -p 3000 -s any-key

Use the same working directory and port from your previous setup. The session key can be anything — your database and projects remain untouched.

Terminal window
vps-deployer start
  1. Check the service is running: systemctl --user status vps-deployer
  2. Verify the web UI loads
  3. Test a manual deployment

Check the GitHub releases page for breaking changes before upgrading. Major version bumps may require database migrations (handled automatically).

If an upgrade causes issues:

Terminal window
# Stop the service
systemctl --user stop vps-deployer
# Install the previous version
npm install -g vps-deployer@<previous-version>
# Restart
vps-deployer start

Your database and working directory are not affected by version changes.