Skip to content

Remote Management

Manage your cloud deployment with dango remote commands.


Quick Reference

Command Description
Deploy & Sync
dango remote push Push local config and dbt files to server
dango remote upload LOCAL_PATH [REMOTE_PATH] Upload one file under server data/
dango remote rollback Restore from a backup
dango remote sync SOURCE Trigger a data sync on the remote server
Monitoring
dango remote status Show server status, services, and resources
dango remote logs View service logs
dango remote history View deployment history
dango remote ssh Open interactive SSH session
dango remote query "SQL" Run a read-only SQL query on the warehouse
Server Operations
dango remote upgrade Upgrade Dango on the remote server
dango remote power-on Power on a DigitalOcean server left off by an interrupted resize and start services
dango remote isolation status Inspect cloud script and notebook isolation (on, disabled, missing, unsupported, unknown)
dango remote isolation disable / enable Audited administrator opt-out from, and restore of, script and notebook isolation
dango remote resize Resize the server (change CPU/RAM)
dango remote migrate Switched off in 1.0.14: refuses and prints the manual steps (details)
dango remote repair Diagnose and fix common deployment issues
dango remote reset-metabase Reset Metabase to fresh state (SSO/H2 corruption)
Firewall
dango remote firewall list Show current firewall rules
dango remote firewall allow-ip IP Restrict ports 80/443 to a specific IP
dango remote firewall allow-all Revert ports 80/443 to public
Domain
dango remote domain set DOMAIN Configure HTTPS with Let's Encrypt
dango remote domain remove Revert to IP-only HTTP
Environment Variables
dango remote env set K=V Set an environment variable
dango remote env get K Display a variable (value masked)
dango remote env list List all variables (values masked)
dango remote env delete K Remove a variable
Backups
dango remote backup Create an on-demand backup
dango remote backup list List local and Spaces backups
dango remote backup enable Enable daily scheduled backups
dango remote backup disable Disable daily scheduled backups
dango remote backup download Download a backup from Spaces
dango remote backup restore Restore from a Spaces backup
User Management
dango remote auth add-user Create a new user on the remote server
dango remote auth list-users List all users
dango remote auth remove-user Remove a user
dango remote auth reset-password Reset a user's password

Remote commands require an active deployment (.dango/cloud.yml must exist). Most management commands use SSH. Provider-specific operations, including DigitalOcean power control and firewall changes, use the provider API.

dango remote power-on is DigitalOcean-only: it uses the provider API while SSH is unavailable, then starts services after the server is reachable. dango remote resize refuses a powered-off server, and dango remote status reports when the server is off. For BYOS power control, use your hosting provider.


Pushing Changes

After making local changes to configuration or dbt models, push them to the server:

dango remote push

What Gets Synced

Config files (uploaded via SFTP):

Local Path Remote Path
.dango/sources.yml /srv/dango/project/.dango/sources.yml
.dango/schedules.yml /srv/dango/project/.dango/schedules.yml
.dango/monitors.yml /srv/dango/project/.dango/monitors.yml
.dango/project.yml /srv/dango/project/.dango/project.yml
.dango/scripts.yml /srv/dango/project/.dango/scripts.yml
dbt/dbt_project.yml /srv/dango/project/dbt/dbt_project.yml
dbt/packages.yml /srv/dango/project/dbt/packages.yml
docker-compose.yml /srv/dango/project/docker-compose.yml
Dockerfile.metabase /srv/dango/project/Dockerfile.metabase
entrypoint.sh /srv/dango/project/entrypoint.sh
metabase-plugins/ /srv/dango/project/metabase-plugins/

dbt directories (synced via rsync with --delete):

  • dbt/models/ — all model SQL files
  • dbt/macros/ — all macro SQL files
  • dbt/seeds/ — Git-tracked seed files, loaded by dbt build

Files that don't exist locally are skipped.

Keep seed files in dbt/seeds/ and commit them to Git before pushing. The entire data/ directory is Git-ignored and is never sent by dango remote push. Put files there with the web UI CSV upload or dango remote upload.

Upload one data file

dango remote upload data/uploads/orders.csv
dango remote upload ~/Downloads/orders.csv data/uploads/orders.csv

REMOTE_PATH is relative to the project root and must be under data/. If omitted, the local file must already be inside the project and its relative path is used. Uploads accept single regular files up to 2 GiB; they refuse data/warehouse.duckdb* and data/.tmp.

Ports, session limits, and server-only files

dango remote push uploads the standard server ports (web 8800, Metabase 3000, dbt docs 8081, Marimo 7805) regardless of any custom ports in your local .dango/project.yml; your local file is not changed. For the session limits, keys your local file does not set get the cloud values (30 days, 60 minutes idle); an explicit local value is uploaded as is.

Push also mirrors dbt/models, dbt/macros, dbt/seeds, metabase/, custom_sources/ and scripts/ with --delete, for each of those directories that exists locally, so files that exist only on the server are removed. Auto-generated staging models are regenerated by the next dango remote sync; hand-written server-only files are not.

What Is NOT Synced

These files are managed separately and never overwritten by push:

  • .env — environment variables (see Environment Variables)
  • .dlt/secrets.toml — API credentials
  • warehouse.duckdb — the DuckDB database
  • Metabase H2 database — Metabase configuration and saved questions
  • dbt/profiles.yml — auto-generated for server hardware

Git Guardrails

By default, dango remote push checks your git state before deploying:

  • Branch check — warns if you're not on the expected branch (e.g., main)
  • Dirty check — warns if you have uncommitted changes

Override with flags:

# Allow uncommitted changes
dango remote push --allow-dirty

# Allow deployment from any branch
dango remote push --allow-branch

# Both
dango remote push --allow-dirty --allow-branch

Pre-Deploy Backup

Every push automatically creates a backup on the server before applying changes. This backup is used by dango remote rollback if something goes wrong.

Deploy Lock

Only one push can run at a time. The lock is a root-owned directory, /srv/dango/deploy.lock, created on the server when a push starts and removed when it ends. A lock that has passed its 30-minute expiry is treated as stale and replaced by the next push. If another push is in progress, or a killed push left a lock that has not expired, you'll see an error. Use --force to override it:

dango remote push --force

Anything at that path that is not a lock written by this Dango counts as a held lock: for example the lock file an older Dango (1.0.13 or earlier) left behind after a killed push, or a lock that cannot be read. The push stops with "Deploy lock ... is unreadable or was not created by this Dango" and needs --force, or removal of the path on the server (see Deploy lock stuck).

Warning

Only use --force if you are certain no other push is in progress. Forcing during an active push could leave the server in an inconsistent state.

Dry Run

Preview what would be synced without making changes:

dango remote push --dry-run

This shows which files changed, which dbt models were added/modified/removed, and whether macros or packages changed — without uploading anything.

Push Options

Option Description
--dry-run Show changes without applying
--force Override an existing deploy lock
--yes, -y Skip confirmation prompt
--allow-dirty Allow deployment with uncommitted changes
--allow-branch Allow deployment from any branch
--allow-empty Allow an empty local mirrored directory to erase its non-empty server copy

Push normally refuses to mirror an empty local directory over a non-empty server directory. Restore the local files or use --allow-empty if you intend to erase the server copy.

Change Detection

Push uses MD5 hashing to detect changes:

  • Model changes — individual *.sql files in dbt/models/ are compared. Changed models trigger selective dbt run --select
  • Macro changes — any change in dbt/macros/ triggers a full dbt run (macros aren't individually selectable)
  • Package changes — if dbt/packages.yml changed, dbt deps runs before dbt run
  • Retry after a failed build: a push records a pending-build marker on the server (/srv/dango/.deploy-build-pending) before it copies files and clears it only after the build succeeds. If an earlier push copied files but failed before the build finished (including when dbt deps failed), the next push sees no file differences but still runs dbt deps and a full dbt run, and prints a warning saying so
  • First deploy — all local models are treated as "added" and a full dbt run executes

Example Output

Syncing project files...
  ✓ .dango/sources.yml (changed)
  ✓ .dango/schedules.yml (unchanged, skipped)
  ✓ dbt/models/staging/stg_stripe_charges.sql (new)
  ✓ dbt/models/marts/mrr.sql (changed)

Changes detected:
  Added models: stg_stripe_charges
  Changed models: mrr
  Packages: unchanged

Creating pre-deploy backup...
  ✓ Backup: backup-20260515-143000.tar.gz

Running dbt...
  ✓ dbt run --select stg_stripe_charges mrr
  ✓ 2 models completed

Deploy complete.

Rolling Back

Restore the server to its state before the last push:

dango remote rollback

This uses the most recent pre-deploy backup. To restore from a specific backup:

dango remote rollback --backup /srv/dango/backups/deploy/backup-20260515-143000.tar.gz

Paths are passed to the server literally: ~, $VAR and wildcards are not expanded, and a path containing spaces works as typed. If the archive extracts but does not look like a Dango backup, the restore fails with "unexpected layout ... nothing was restored". Services are stopped while the archive is checked and are started again afterwards, even when the restore fails.

Rollback workflow:

  1. Stop services (dango-web, Metabase)
  2. Extract backup archive
  3. Restore all files (config, database, Metabase data)
  4. Restart services
  5. Verify health
Option Description
--backup Path to a specific backup archive on the server (default: most recent)
--yes, -y Skip confirmation prompt

Triggering a Sync

dango remote sync SOURCE [--full-refresh] [--backfill 7d] [--wait]

Without --wait, the command launches the sync in the background on the server and checks only the first 2 seconds: it reports a failed start (for example the project directory cannot be entered, or the command exits with an error within that time). A sync that fails later is not reported by this command; check dango remote status.


Checking Status

View a comprehensive overview of your deployment:

dango remote status

Output panels:

Panel Information
Server IP address, region, size (tier + price/mo), domain; "HTTP only (unencrypted)" when no domain is set
Services Status of dango-web, Caddy, Metabase
Resources CPU %, RAM usage/total (%), disk usage/total (%)
Data DuckDB database size, last sync timestamp per source
Backups The Off-site: line (yes (Spaces <bucket>), NO: ... with the reason, or unknown), the command to keep a local copy when it is not yes, and whether the daily timer is enabled
Backup Last backup timestamp (or a "No backups found" warning)
Versions Installed and recorded Dango version, Docker access state (helper or a warned group (fallback)), the Isolation: state, latest version on PyPI

On DigitalOcean deployments, dango remote status also warns when DigitalOcean has droplets tagged dango that your .dango/cloud.yml does not name (see Orphaned resources), and when the server cannot be reached it says "Server is powered off. Run: dango remote power-on" if the droplet is off.

Server
  IP: 143.198.xxx.xxx
  Region: nyc1
  Size: s-2vcpu-4gb (Standard, $24/mo)
  Domain: analytics.yourcompany.com

Services
  dango-web      active
  caddy          active
  metabase       running

Backups
  Off-site: yes (Spaces my-dango-backups)
  Scheduled backups: enabled (daily at 02:00 UTC)

Versions
  Installed: 1.0.14
  Recorded: 1.0.14
  Docker access: helper
  Isolation: on (loopback restricted)
  Latest (PyPI): 1.0.14

The panels are abbreviated here; Resources and Data follow the same layout.


Viewing Logs

View service logs from the server:

# Dango web server logs (default)
dango remote logs

# Specific service
dango remote logs --service caddy
dango remote logs --service metabase

# Last 100 lines
dango remote logs --tail 100

# Stream logs in real-time (Ctrl+C to stop)
dango remote logs --follow
Option Description
--service Service to view: dango, caddy, or metabase (default: dango)
--tail Number of log lines to show (default: 50)
--follow, -f Stream logs in real-time

Log sources by service:

Service Log Command
dango journalctl -u dango-web
caddy journalctl -u caddy
metabase docker logs on the project's Metabase container (found automatically)

Interactive SSH

Open an interactive SSH session to the server:

dango remote ssh

This connects as root with full shell access. The command replaces your current process — when you exit the SSH session, you're back in your local terminal.

Tip

Use SSH for tasks that aren't covered by the CLI, such as inspecting system logs, debugging services, or checking disk usage.


Querying Data

Run a read-only SQL query against the remote DuckDB warehouse:

dango remote query "SELECT count(*) FROM stripe.charges"
dango remote query "SELECT * FROM hubspot.contacts LIMIT 10" --timeout 120
Argument/Option Description
sql SQL query to execute (required)
--timeout Query timeout in seconds (default: 60)

The query runs in read-only mode — INSERT, UPDATE, DELETE, and other write operations are rejected by DuckDB's access_mode=read_only setting.


Deployment History

View a log of all deployments to the server:

dango remote history
# Show last 20 entries
dango remote history --limit 20
Option Description
--limit, -n Number of entries to show (default: 10)

Output columns:

Column Description
Time Deployment timestamp (ISO format)
Commit Git commit short SHA (8 chars)
Branch Git branch name
Deployer Who triggered the deploy
Duration How long the deploy took
Status OK (green) or FAIL (red)
Time                 Commit    Branch  Deployer       Duration  Status
2026-05-15 14:30:00  a1b2c3d4  main    deploy@local   45s       OK
2026-05-14 10:15:00  e5f6g7h8  main    deploy@local   1m 12s    OK
2026-05-13 16:45:00  i9j0k1l2  main    deploy@local   38s       FAIL

Recovery Commands

When things go wrong, these commands fix common issues without SSH access:

Repair

dango remote repair

Diagnoses and fixes common deployment issues: checks disk space, RAM, DNS resolution, restarts services, re-runs Metabase setup if metabase.yml is missing, and triggers a Metabase schema scan. Run this first when something isn't working.

Reset Metabase

dango remote reset-metabase

Resets Metabase to a fresh state when SSO breaks or the H2 database corrupts. Stops Metabase, removes its Docker volume, restarts it, and lets dango-web re-run Metabase setup on next startup. It asks you to type reset to confirm. It also removes .dango/metabase.yml and Dango's stored Metabase credential files for the project. If the project id cannot be read safely, the command stops before changing anything. If dango-web fails to start afterwards, the command tells you the reset is half-applied: run dango remote repair, then re-run reset-metabase if Metabase or SSO still does not work. Does not affect your warehouse data — only Metabase's internal state (saved questions, dashboards) is lost. Re-import with dango metabase load after reset.

Try repair first

dango remote repair fixes most issues. Only use dango remote reset-metabase if Metabase is completely broken (SSO loop, database corruption errors, blank screen after login).

Lost Metabase Admin Access

When dango serve prints "Metabase admin access needs repair" (see the journal with journalctl -u dango-web), Dango can no longer sign in to Metabase with its stored admin credential. Run from your computer:

dango remote metabase-repair-admin

Or run it on the server, as the dango user and not as root (root would leave root-owned files in the credential store):

cd /srv/dango/project && sudo -u dango -H env DANGO_CLOUD_MODE=true /srv/dango/venv/bin/dango metabase repair-admin

Metabase restarts for about a minute; no Metabase data (dashboards, questions) is changed. The remote command asks for confirmation unless you pass --yes/-y. dango remote reset-metabase is the destructive last resort.


Remote User Management

Manage web UI user accounts on the server. These commands run remotely — they modify the authentication database on the server, not locally.

Add a User

dango remote auth add-user

Prompts for email and password interactively.

List Users

dango remote auth list-users

Shows all registered users with their email, role, and creation date.

Remove a User

dango remote auth remove-user

Prompts to select a user for removal.

Reset Password

dango remote auth reset-password

Prompts to select a user and enter a new password.


Troubleshooting

Deploy lock stuck

Deploy lock held by <deployer> (started <time>). Use --force to override.

or

Deploy lock /srv/dango/deploy.lock is unreadable or was not created by this Dango ...

If no other push is running, the lock may be stale from a previous push that was interrupted, or may be a lock file left by an older Dango. The simplest fix is dango remote push --force. To clear it by hand:

Warning

Only delete the lock if you are certain no push is in progress.

dango remote ssh

Then on the server:

rm -rf /srv/dango/deploy.lock

SSH connection failed

Error: SSH connection failed
  • Verify the server is running: check your cloud provider's console
  • Check that port 22 is open in the firewall
  • Verify the SSH key exists locally: ls ~/.ssh/dango_*
  • Test connectivity manually: ssh -i ~/.ssh/dango_ed25519 root@<server-ip>

Push failed mid-deploy

If a push fails partway through (e.g., network interruption), the server may be in a partially updated state:

  1. Check server status: dango remote status
  2. If services are running, try pushing again: dango remote push --force
  3. If services are down, roll back: dango remote rollback
  4. Check logs for errors: dango remote logs

Query timeout

Error: Query timed out after 60 seconds

Increase the timeout for complex queries:

dango remote query "SELECT ..." --timeout 300

If queries consistently time out, consider resizing the server for more CPU and RAM.

Git guardrails blocking push

Warning: You have uncommitted changes

Either commit your changes or override:

# Commit first (recommended)
git add -A && git commit -m "Update models"
dango remote push

# Or override
dango remote push --allow-dirty --allow-branch

Next Steps