Skip to content

DanubeData CLI

The DanubeData CLI (danube) lets you manage your entire DanubeData infrastructure from the terminal — VPS instances, object storage, static sites, and serverless containers. Built with Node.js, it provides interactive prompts, real-time build tracking, and CI/CD-friendly configuration.

Installation

Requires Node.js 18 or later.

Bash
npm install -g @danubedata/cli

Verify the installation:

Bash
danube --version

Authentication

Bash
danube auth

Opens your browser to log in and authorize the CLI automatically — no manual token copying. Authorizing creates an API token for the CLI, so the browser asks you to confirm it's you first (your password, a passkey, an authenticator code, or an emailed code), and we email you that the CLI was signed in.

Interactive login

Bash
danube login

You will be prompted to enter your API token. To create a token:

  1. Log in to the DanubeData dashboard
  2. Go to Security > API tokens
  3. Click Create token and copy the token

Token flag

Bash
danube login --token YOUR_API_TOKEN

Environment variable

Set the DANUBE_TOKEN environment variable to skip the login step entirely. This is the recommended method for CI/CD pipelines.

Bash
export DANUBE_TOKEN="your-api-token"

Check your identity

Bash
danube whoami

Shows your name, email, and team memberships.

Log out

Bash
danube logout

Removes stored credentials from ~/.danube/config.json.

Configuration

Credentials

Stored at ~/.danube/config.json with 0600 permissions:

JSON
{
  "token": "your-api-token"
}

Project configuration

Created by danube pages link, stored at .danube/project.json:

JSON
{
  "siteId": 42,
  "teamId": 1,
  "siteName": "my-portfolio",
  "defaultDomain": "my-portfolio-abc.pages.danubedata.ro"
}

Build configuration

Optional danube.json in your project root:

JSON
{
  "outputDir": "dist",
  "ignore": ["*.map", "test/**"]
}

  • outputDir — Directory to deploy (default: current directory)
  • ignore — Additional file patterns to exclude from the deployment

Environment variables

VariableDescription
DANUBE_TOKENAPI token (alternative to danube login)
DANUBE_API_BASEOverride API base URL (default: https://danubedata.ro)
DANUBE_SITE_IDStatic site ID for headless CI/CD — a UUID, the siteId in .danube/project.json (skips interactive linking)
DANUBE_TEAM_IDProject (team) ID the site belongs to — the teamId in .danube/project.json
DANUBE_SITE_NAMESite name for headless CI/CD
CISuppresses update notifications
DANUBE_NO_UPDATE_CHECKSuppresses update notifications

Commands overview

General

CommandDescription
danube authAuthenticate via browser (recommended)
danube loginAuthenticate with an API token
danube logoutRemove stored credentials
danube whoamiShow current user and teams

VPS Instances (danube vps)

CommandDescription
danube vps lsList all VPS instances
danube vps createCreate a new VPS (interactive or flags)
danube vps get <id>Show VPS details and connection info
danube vps update <id>Update VPS config (must be stopped)
danube vps delete <id>Delete a VPS instance
danube vps start <id>Start a stopped VPS
danube vps stop <id>Stop a running VPS
danube vps reboot <id>Reboot a running VPS
danube vps reinstall <id>Reinstall OS (destroys all data)
danube vps status <id>Show current status and capabilities
danube vps metrics <id>Show CPU/memory/storage/network usage
danube vps password <id>Show SSH password (with confirmation)
danube vps imagesList available OS images

Object Storage (danube storage)

CommandDescription
danube storage buckets lsList all buckets
danube storage buckets createCreate a new bucket
danube storage buckets get <id>Show bucket details
danube storage buckets update <id>Update bucket settings
danube storage buckets delete <id>Delete a bucket
danube storage buckets metrics <id>Show current bucket metrics snapshot
danube storage buckets metrics trend <id>Time-series trend (sparkline/table/csv/json)
danube storage buckets metrics top <id>Top objects by size/egress/requests
danube storage buckets metrics health <id>Pending multipart uploads, deleted versions, last check
danube storage keys lsList all access keys
danube storage keys createCreate a new access key
danube storage keys get <id>Show access key details
danube storage keys revoke <id>Revoke an access key
danube storage policy get <bucket>Show a bucket's policy status and its custom statements
danube storage policy set <bucket>Replace the custom statements
danube storage policy grant <bucket>Give a key access to a folder, or to the whole bucket

Static Sites (danube pages)

CommandDescription
danube pages linkLink current directory to a static site
danube pages deployDeploy static site files
danube pages deployments lsList deployments
danube pages deployments rollback <rev>Roll back to a previous deployment
danube pages domains lsList custom domains
danube pages domains add <domain>Add a custom domain
danube pages domains remove <domain>Remove a custom domain
danube pages domains verify <domain>Verify domain DNS

Serverless Containers (danube rapids)

CommandDescription
danube rapids lsList serverless containers
danube rapids createCreate a new container
danube rapids deploy <name>Deploy from local directory
danube rapids show <name>Show container details
danube rapids update <name>Update container configuration
danube rapids rm <name>Delete a container
danube rapids deployments <name>List container deployments
danube rapids usage <name>Show usage and billing

File exclusion

When packaging files for deployment, the CLI automatically excludes:

  1. .git, node_modules, .danube (always excluded)
  2. Patterns from .gitignore
  3. Patterns from .danubeignore (custom ignore file)
  4. Extra patterns from danube.json ignore field

CI/CD usage

For automated deployments without interactive prompts, set environment variables:

Bash
export DANUBE_TOKEN="your-api-token"
export DANUBE_SITE_ID="01a0d8fa-35fa-709d-b9d1-319c28ba28fa"
export DANUBE_TEAM_ID="4"

danube pages deploy --dir ./dist

The site ID is a UUID. Run danube pages link once on your machine: it prints both values, and saves them as siteId and teamId in .danube/project.json. Headless deploys need CLI 1.6.0 or newer — earlier versions misread the site ID and failed with Not Found.

GitHub Actions example

YAML
name: Deploy to DanubeData
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - run: npm ci && npm run build

      - run: npm install -g @danubedata/cli

      - run: danube pages deploy --dir ./dist
        env:
          DANUBE_TOKEN: ${{ secrets.DANUBE_TOKEN }}
          DANUBE_SITE_ID: ${{ secrets.DANUBE_SITE_ID }}
          DANUBE_TEAM_ID: ${{ secrets.DANUBE_TEAM_ID }}

Update notifications

When a newer version of the CLI is published, every interactive run tells you so — including a bare danube, --help and a failed command. The CLI asks npm at most every six hours. Run danube upgrade to install it; danube upgrade always checks npm directly.

Notifications are suppressed with --json, when output is not a terminal, in CI environments, or when DANUBE_NO_UPDATE_CHECK is set.

Exit codes

CodeMeaning
0Success
1Error: the command or the API call failed, or a diagnose found a fatal problem. Also a Rapids run that failed without a usable exit code
1–255rapids run --wait and rapids runs logs --follow: the run failed, and this is the run's own exit code
2Usage error: a required flag is missing and the CLI cannot prompt, the command is unknown, or the options conflict
3Not authenticated: run danube auth or danube login
4Resource not found
5Confirmation required: add --force
8Bucket metrics are stale or not available
75The CLI gave up waiting (rapids run --wait, rapids runs logs --follow, storage policy set or grant with --wait). The run or change has not failed
124A Rapids run timed out on the platform (rapids run --wait, rapids runs logs --follow)
130Cancelled with Ctrl+C, or a Rapids run that was cancelled

Next steps


Questions? Contact support at support@danubedata.ro