Server Operations¶
Upgrade, resize, and migrate your cloud server.
Quick Reference¶
| Command | Description |
|---|---|
dango remote upgrade | Upgrade Dango to a newer version |
dango remote resize | Resize the server (DigitalOcean only) |
dango remote migrate | Migrate to a new server (DigitalOcean only) |
Upgrading Dango¶
Upgrade the Dango installation on your server to a newer version:
This upgrades to the latest version on PyPI. To install a specific version:
Upgrade Workflow¶
- Version check — compares installed version with target version
- Pre-upgrade backup — creates a full backup (unless
--skip-backup) - Stop services — stops dango-web and Metabase
- Install — runs
pip install getdango==<version>in the server's venv - Migrations — applies any database migrations for the new version
- Docker rebuild — rebuilds Metabase container if needed
- Start services — restarts dango-web and Metabase
- Health check — verifies the server is responding
If the installed version already matches the target, the upgrade is a no-op.
Options¶
| Option | Description |
|---|---|
--version | Specific version to install (e.g., 1.2.3). Must match semantic versioning. Default: latest on PyPI |
--yes, -y | Skip confirmation prompt |
--skip-backup | Skip the pre-upgrade backup |
Failed Upgrade¶
If the health check fails after an upgrade:
# Roll back to the pre-upgrade backup
dango remote rollback
# Check what went wrong
dango remote logs
Installing from Git¶
For pre-release testing, install directly from a Git branch via SSH:
Then on the server:
Warning
Installing from Git bypasses the normal upgrade workflow (no backup, no migrations, no health check). Only use this for testing. Run dango remote upgrade to return to a stable release.
Resizing the Server¶
Change the server's CPU, RAM, and disk allocation.
View Current Size and Available Tiers¶
Run without arguments to see your current tier and available options:
Current: Standard (s-2vcpu-4gb) — 2 vCPU, 4 GB RAM, 80 GB disk, $24/mo
Available tiers:
Tier Slug vCPUs RAM Disk Price
Standard s-2vcpu-4gb 2 4 GB 80 GB $24/mo
Performance s-4vcpu-8gb 4 8 GB 160 GB $48/mo
Run: dango remote resize <SIZE_SLUG>
Resize¶
Resize plan:
Current: Standard (s-2vcpu-4gb) — $24/mo
New: Performance (s-4vcpu-8gb) — $48/mo
Proceed? [y/N]: y
Resizing...
✓ Pre-resize backup created
✓ Powered off droplet
✓ Resize complete
✓ Powered on droplet
✓ dbt profiles.yml regenerated (threads=4, memory_limit=2GB)
✓ Health check passed
Resize complete. New size: s-4vcpu-8gb
What happens:
- Creates a pre-resize backup
- Powers off the droplet (1–3 minutes downtime)
- Resizes the droplet via the DigitalOcean API
- Powers on the droplet
- Regenerates
dbt/profiles.ymlto match the new hardware:threads= number of vCPUsmemory_limit= RAM ÷ 4 (e.g., 8 GB RAM →2GBmemory limit)
- Verifies health
Disk Never Shrinks
DigitalOcean does not support reducing disk size. If you resize from Performance (160 GB) to Standard, the disk stays at 160 GB. Only CPU and RAM change.
| Option | Description |
|---|---|
size | Size slug (optional — omit to view current info) |
--yes, -y | Skip confirmation prompt |
Resize is not available for BYOS deployments. To change your server's resources, resize through your hosting provider's console, then update the dbt profile via SSH:
Then edit /srv/dango/project/dbt/profiles.yml to match your new hardware:
- Set
threadsto the number of vCPUs - Set
memory_limitto RAM ÷ 4 (e.g., 8 GB RAM →2GB)
Migrating to a New Server¶
Move your deployment to a new server with a different size or region.
Optionally change region:
Migration Workflow¶
- Backup — creates a backup of the current server
- Upload — uploads backup to DigitalOcean Spaces
- Provision — creates a new droplet with the specified size and region
- Setup — installs Dango on the new server
- Copy secrets — transfers
.envand credentials to the new server - Download — downloads backup from Spaces to the new server
- Restore — restores data on the new server
- Domain — configures domain on the new server (if set)
- Firewall — sets up firewall rules on the new server
- Health check — verifies the new server is responding
- Destroy old — removes the old server after verification
Downtime: 5–15 minutes depending on data size and network speed.
Prerequisites¶
- DigitalOcean Spaces must be configured (used for data transfer between servers)
- Spaces credentials must be set in the remote
.env(see Environment Variables)
DNS Update Required
If you have a custom domain configured, you must update the DNS A record to point to the new server's IP address after migration completes. Dango will remind you of this.
| Option | Description |
|---|---|
--size | Size slug for the new server (required) |
--region | Region slug for the new server (default: same as current) |
--yes, -y | Skip confirmation prompt |
Migration is not available for BYOS deployments. To migrate manually:
- Download a backup:
dango remote backup download <NAME> - Set up Dango on the new server following the BYOS guide
- Copy the backup to the new server and restore
Troubleshooting¶
Upgrade health check failed¶
After a failed upgrade, the server may not be responding:
# Check logs for errors
dango remote logs
# Roll back to pre-upgrade state
dango remote rollback
# If rollback also fails, SSH in directly
dango remote ssh
sudo systemctl restart dango-web
sudo docker compose -f /srv/dango/project/docker-compose.yml up -d
Resize timeout¶
If the droplet takes too long to power back on after resize:
- Check the DigitalOcean console for droplet status
- Try powering on manually from the DO console
- Once running, verify health:
dango remote status
Migration Spaces error¶
Migration requires DigitalOcean Spaces for data transfer. Set up credentials:
dango remote env set SPACES_ACCESS_KEY=DO00EXAMPLE123
dango remote env set SPACES_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLE
dango remote env set SPACES_REGION=nyc3
dango remote env set SPACES_BUCKET=my-dango-backups
Disk space warning¶
If dango remote status shows high disk usage:
- Remove old dlt pipeline state:
dango remote ssh→rm -rf /srv/dango/project/.dlt/pipelines/*/ - Consider resizing to a larger disk
- Download and remove old backups:
dango remote ssh→ check/srv/dango/backups/deploy/
pip install failed on server¶
If pip install fails during upgrade (e.g., dependency conflict):
dango remote ssh
cd /srv/dango && source venv/bin/activate
pip install getdango==<version> --force-reinstall
If the venv is corrupted, recreate it:
rm -rf /srv/dango/venv
python3 -m venv /srv/dango/venv
source /srv/dango/venv/bin/activate
pip install getdango==<version>
Then restart services:
Next Steps¶
- Backups — configure automated backups
- Remote Management — push changes and manage the server
- Destroy & Cleanup — tear down a deployment