Upgrading
How to upgrade Uncloud to a new version.
Upgrade Process
1. Back Up
Before upgrading, back up your data:
# Back up the SQLite database
cp data/nebula.db data/nebula.db.backup-$(date +%Y%m%d)
# Back up config
cp config.yaml config.yaml.backup
2. Pull Latest Code
3. Rebuild the Backend
cd backend
go mod download
go build -o dukaancloud-api cmd/api/main.go
4. Rebuild the Frontend
cd frontend
npm install
npm run build
5. Restart the Services
# If using systemd
sudo systemctl restart dukaancloud
# If running manually, stop and restart
# Kill the old process, then:
./dukaancloud-api
6. Run Migrations
Uncloud auto-creates new tables on startup. If a schema change requires migration, it will be noted in the release notes.
7. Verify
# Check API health
curl http://localhost:8080/api/v1/admin/status
# Check component status
curl -X POST http://localhost:8080/api/v1/admin/setup/check
Rollback
If something goes wrong:
# Restore database
cp data/nebula.db.backup-YYYYMMDD data/nebula.db
# Restore config
cp config.yaml.backup config.yaml
# Checkout previous version
git checkout <previous-commit-hash>
# Rebuild and restart
cd backend && go build -o dukaancloud-api cmd/api/main.go
sudo systemctl restart dukaancloud
Zero-Downtime Upgrades
For production environments:
- Build the new binary separately
- Stop the old process
- Start the new process
- The SQLite database handles the transition seamlessly
- Kubernetes workloads continue running — the API server restart doesn’t affect running VMs or apps
The sync loop will resume reconciliation after the API server restarts. There may be a brief period (up to 15 seconds) where status updates are delayed.