Galaxy CLI
Deploy and manage your Web Apps from the terminal with four commands.
Deploying a Meteor App?
This guide is for Web Apps. For Meteor, use the Meteor CLI instead.
Prerequisites
- Node.js 18 or higher
- A Galaxy account
- A payment method added for identity verification
Quick Start
npm install -g @galaxy-cloud/cli
galaxy login
galaxy init
galaxy deployInstall
npm install -g @galaxy-cloud/clinpx @galaxy-cloud/cli login
npx @galaxy-cloud/cli init
npx @galaxy-cloud/cli deployDeploy
Initialize your project
galaxy initThe CLI walks you through setup: app name, app type (Node.js, Next.js, AdonisJS, or Python), runtime version, plan, region, container size, and build commands.
Next.js Apps Need Standalone Mode
Next.js apps require output: 'standalone' in your next.config.ts. The CLI validates this and shows an error if it's missing.
Deploy
galaxy deployThe CLI packages your code, builds a Docker image, and deploys. Logs stream in real-time. Each deployment creates a new version with zero downtime.
Every future deploy is just galaxy deploy from your project directory.
Configuration Files
.galaxy/config.json (private): Links your directory to a Galaxy app. Created during galaxy init or galaxy link. Never commit this to Git.
galaxy.json (shareable): Your deployment configuration. Safe to commit so your team shares the same settings.
{
"commands": {
"install": "npm install",
"build": "npm run build",
"start": "npm start"
},
"health": {
"path": "/health"
},
"deploy": {
"rootDirectory": "./"
}
}.galaxyignore (optional): Exclude files from deployments, like .gitignore. Default patterns (.git/, node_modules/, *.log, .env) apply automatically. Maximum archive size is 100MB.
Command Reference
Authentication
| Command | Description |
|---|---|
galaxy login | Authenticate via browser |
galaxy logout | Clear local credentials |
galaxy whoami | Show current user and organizations |
Project Setup
| Command | Description |
|---|---|
galaxy init | Create a new app and link your directory |
galaxy link <app-id> | Link to an existing app |
galaxy link <app-id> --with-config | Link and pull config from backend |
galaxy unlink | Disconnect directory from app |
galaxy config | Show and validate current configuration |
Finding Your App ID
Grab it from your dashboard URL: https://my.galaxycloud.app/{account}/{region}/apps/{appId}/overview
Deployment
| Command | Description |
|---|---|
galaxy deploy | Deploy with real-time log streaming |
galaxy deploy --path <dir> | Deploy from a specific directory |
galaxy deploy --env <file> | Deploy with env vars from a file |
galaxy deploy --detach | Fire-and-forget (skip log streaming) |
Logs
| Command | Description |
|---|---|
galaxy logs --deployment <id> | View build and deploy logs |
Environment Variables
Galaxy uses a staging workflow: make changes, then deploy them.
| Command | Description |
|---|---|
galaxy variables | List all variables (values masked) |
galaxy variables --env <file> | Import variables from a .env file |
galaxy variables:set KEY VALUE | Stage a variable change |
galaxy variables:unset KEY | Stage a variable deletion |
galaxy variables:deploy | Apply all pending changes |
galaxy variables:status | Check for pending changes |
galaxy variables:diff <id> | See what changed in a deployment |
Changes Require Deployment
variables:set and variables:unset only stage changes. Run galaxy variables:deploy to apply them.
Use variables:deploy for config-only changes (fast, no build). Use galaxy deploy when your code changed. To do both at once: galaxy deploy --env .env.production.
Team Collaboration
When teammates clone your repo, they run galaxy link <app-id> to connect their local directory, then deploy normally. The galaxy.json file is safe to commit. The .galaxy/config.json file is gitignored and machine-specific.
Want automatic deployments? Connect any CLI-created app to GitHub or Bitbucket from the Galaxy dashboard. See the Push to Deploy guide. Switching to Git doesn't disable the CLI.

