Galaxy
Meteor

Deploy Meteor Apps Using the CLI

Deploy with complete control using just your terminal and a few commands.

The magic command

This guide focuses specifically on deploying your Meteor apps to Galaxy using the command line. If you're looking for general Meteor CLI information, check the official Meteor documentation.

Deploying a Web App?

If you're deploying a Web App (Node.js, Next.js, AdonisJS, or Python) instead of a Meteor app, use the Galaxy CLI guide instead.

The meteor deploy command handles everything: building your app, uploading it to Galaxy, and getting it live. All from your keyboard.

Prerequisites

Before you deploy to Galaxy, make sure you have these in place:

  • Meteor CLI installed on your machine (install from meteor.com)
  • A Galaxy account (create one free at galaxycloud.app)
  • Your Meteor app ready to go (tested locally, code committed to Git)

To deploy any application on Galaxy, you must add a valid payment method for identity verification. We'll place a small temporary hold on your card to verify it, then automatically refund it. You'll only be charged if you deploy a paid app.

Verify your Galaxy access is set up by running:

meteor whoami

You'll see your username if you're logged in. If not, log in with:

meteor login

Then verify your Galaxy account is connected by checking the Galaxy dashboard.

If you want to use deployment tokens for CI/CD automation, skip ahead to the Deployment Tokens section.

Your First Deployment

Ready to get your app live? The basic syntax is simple:

meteor deploy yourapp.meteorapp.com

Hostname format: yourapp.meteorapp.com

DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com

Hostname format: yourapp.eu.galaxy.meteorapp.com

DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com

Hostname format: yourapp.au.galaxy.meteorapp.com

Replace yourapp with whatever name you want. Galaxy will create your app with that hostname and deploy it using sensible defaults (Free plan, Tiny container).

Done. Your app is live.

That's the bare minimum. Everything else in this guide is optional customization based on what you actually need.

Customizing Your Deployment

The basic command gets you up and running, but meteor deploy has tons of options if you need more control. Let's walk through the most useful ones.

Choosing Your Region

Galaxy runs in three regions. By default, you're deploying to US East, but you can pick the region closest to your users for better performance.

Region Selection by Plan

Free plan apps are restricted to us-east-1 (US East). To deploy to EU West or Asia Pacific, use a paid plan (Essentials or Professional).

meteor deploy yourapp.meteorapp.com
# or explicitly
DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy yourapp.meteorapp.com

Hostname format: yourapp.meteorapp.com

DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com

Hostname format: yourapp.eu.galaxy.meteorapp.com

DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com

Hostname format: yourapp.au.galaxy.meteorapp.com

If you're on Windows, set the environment variable first: SET DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com before running meteor deploy.

Selecting Your Plan and Container Size

By default, you deploy on the Free plan with a Tiny container. Want to change that? Use these flags:

meteor deploy yourapp.meteorapp.com --plan professional --container-size standard
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --plan professional --container-size standard
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --plan professional --container-size standard

The --plan flag accepts: free, essentials, or professional.

Container sizes available: tiny, compact, standard, double, quad, octa, or dozen.

Pick a container size that matches your app's actual needs. You can scale up or down later from the Galaxy dashboard if your performance changes.

Deploying with a Database

Want to add MongoDB to your deployment? Use the --mongo flag:

meteor deploy yourapp.meteorapp.com --mongo
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --mongo
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --mongo

Galaxy automatically provisions a MongoDB database for your app in a shared cluster and sets up the connection. For the free plan, include both flags:

meteor deploy yourapp.meteorapp.com --plan free --mongo
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --plan free --mongo
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --plan free --mongo

Free MongoDB Limitations: The shared MongoDB cluster is not recommended for production. It doesn't include backups or restoration resources. You'll need to create at least one document to fully instantiate the database.

If you're connecting to Galaxy's free MongoDB shared cluster, include this in your settings file:

{
  "packages": {
    "mongo": {
      "options": {
        "tlsAllowInvalidCertificates": true
      }
    }
  }
}

This setting is necessary because the database provider doesn't have certificates installed on every machine. If you're using your own external MongoDB database with a custom connection string, you won't need this setting.

Understanding Free Plan Limitations

If you're deploying with --plan free, here's what you need to know:

Hostname Requirements: Free apps must use a Meteor domain (.meteorapp.com, .au.meteorapp.com, or .eu.meteorapp.com). Custom domains aren't allowed on the free plan.

Cold Start: Your app stops running after 30 minutes of inactivity. When someone accesses it, Galaxy starts it back up (this takes a moment).

Resource Limits: You're limited to one Tiny container. This isn't recommended for production use.

Shared Infrastructure: Free apps run on shared hardware. Don't use for sensitive data or production workloads.

The free plan is great for learning, testing, and staging. For anything production-bound, upgrade to the Essentials or Professional plan.

Passing Settings and Environment Variables

Your app needs configuration data (API keys, database URLs, etc.). Pass a settings JSON file to your deployment:

meteor deploy yourapp.meteorapp.com --settings settings.json
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --settings settings.json
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --settings settings.json

Your settings file should look like this:

{
  "public": {
    "apiUrl": "https://api.example.com"
  },
  "private": {
    "apiKey": "your-secret-key",
    "stripeSecret": "stripe-sk-live-..."
  }
}

On your server, access all settings via Meteor.settings. On your client, you can only access values under the public key via Meteor.settings.public. Private settings (outside of public) are server-only and won't be available on the client.

Never commit secrets to Git. Use settings files or environment variables for sensitive data.

Important: Settings persist across deployments until you explicitly specify a new settings file. If you deploy once with settings, they'll remain in place on your next deploy even if you don't pass --settings again. To unset Meteor.settings, deploy with an empty settings file.

Quick Settings Updates

Already deployed your app? You can update just the settings file without respecifying other deployment options:

meteor deploy yourapp.meteorapp.com --settings settings.json
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --settings settings.json
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --settings settings.json

Your plan, container size, and other configurations remain unchanged. This is particularly useful when you need to frequently update environment-specific settings.

Advanced Deployment Options

These flags give you even more control for special situations.

Speeding Up Builds with Caching

If you're deploying frequently from the same git commit, cache the build:

meteor deploy yourapp.meteorapp.com --cache-build
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --cache-build
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --cache-build

This requires Meteor 1.11+ and your app must be in a Git repository. Galaxy checks the git commit hash, and if it hasn't changed since the last deploy, it skips the build step and reuses the previous bundle. This is much faster than rebuilding everything.

How it works: Galaxy uses the git commit hash to track whether your code has actually changed. If the hash is the same, your last build is reused. If the hash is different, a fresh build runs automatically.

Debug Mode Deployments

Need to debug production issues? Deploy without minifying:

meteor deploy yourapp.meteorapp.com --debug
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --debug
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --debug

Your code stays readable (but your bundle is larger). Use this sparingly.

Not Waiting for Deployment

By default, meteor deploy waits until your app is live before returning. If you want to exit immediately after uploading:

meteor deploy yourapp.meteorapp.com --no-wait
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --no-wait
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --no-wait

This is useful for CI/CD pipelines where you're monitoring deployment status separately.

Custom Deployment Timeout

The default timeout for waiting on deployment success or failure is 15 minutes. Change it if you need:

meteor deploy yourapp.meteorapp.com --deploy-polling-timeout 30000
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com --deploy-polling-timeout 30000
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com --deploy-polling-timeout 30000

Time is in milliseconds, so 30000 = 30 seconds. Set it higher for large apps that take longer to build.

Deployment Tokens for CI/CD

If you're automating deployments (GitHub Actions, GitLab CI, Jenkins, etc.), use a deployment token instead of personal credentials.

A deployment token is a session token valid for 90 days, making it perfect for CI/CD automation without sharing your actual password.

Generate a Token

Create a deployment token on your machine:

METEOR_SESSION_FILE=token.json meteor login

This generates a token.json file with your session token. The token is valid for 90 days from when it was created.

Use the Token in Your Pipeline

In your CI/CD workflow, set the environment variable before deploying:

METEOR_SESSION_FILE=token.json meteor deploy yourapp.meteorapp.com
METEOR_SESSION_FILE=token.json DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy yourapp.eu.galaxy.meteorapp.com
METEOR_SESSION_FILE=token.json DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy yourapp.au.galaxy.meteorapp.com

Keep your deployment token secure. Treat it like a password. Most CI/CD platforms have secure secret storage (GitHub Secrets, GitLab CI/CD Variables, etc.). Use those, don't hardcode it or commit it to version control.

Token Expiration

Deployment tokens expire 90 days after creation. If your token expires, generate a new one and update your CI/CD configuration.

Complete Flag Reference

Here's every flag available for meteor deploy (based on Meteor 3.3+):

FlagWhat It Does
--freeDeploy on the free plan with shared resources (must pair with --mongo for database)
--plan [plan]Set plan to professional, essentials, or free (overrides --free flag)
--mongoProvision a free shared MongoDB database for your app
--container-size [size]Set container size: tiny, compact, standard, double, quad, octa, or dozen
--settings [file]Pass a JSON settings file with configuration and secrets
--cache-buildReuse the build if git commit hash is unchanged (Meteor 1.11+, requires Git repo)
--debugDeploy without minifying code (larger bundle, useful for debugging)
--no-waitExit after code upload, don't wait for deployment to finish
--deploy-polling-timeout [ms]How long to wait for deployment (default 15 minutes = 900000ms)
--allow-incompatible-updateAllow package updates to incompatible versions if needed
--owner [username/org]Deploy under a specific username or organization
--delete, -DPermanently delete the app and all its data

The --delete flag permanently removes your app. Use with extreme caution, and only when you're absolutely sure.

Practical Examples

Here are some common scenarios and the commands you'd run:

Deploy a Free App with Database

meteor deploy myapp.meteorapp.com --free --mongo
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy myapp.eu.galaxy.meteorapp.com --free --mongo
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy myapp.au.galaxy.meteorapp.com --free --mongo

Your app runs on the free plan with Tiny container and shared MongoDB. Remember, it'll go dormant after 30 minutes of inactivity.

Production Deployment with Professional Plan and Standard Container

meteor deploy myapp.meteorapp.com --plan professional --container-size standard --settings prod-settings.json
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy myapp.eu.galaxy.meteorapp.com --plan professional --container-size standard --settings prod-settings.json
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy myapp.au.galaxy.meteorapp.com --plan professional --container-size standard --settings prod-settings.json

This gives you the resources for a real production app with monitoring and support.

Deploy with Deployment Token

METEOR_SESSION_FILE=token.json meteor deploy myapp.meteorapp.com --no-wait --settings prod-settings.json
METEOR_SESSION_FILE=token.json DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy myapp.eu.galaxy.meteorapp.com --no-wait --settings prod-settings.json
METEOR_SESSION_FILE=token.json DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy myapp.au.galaxy.meteorapp.com --no-wait --settings prod-settings.json

Exit immediately after uploading.

Deploy Multiple Instances Across Regions

Deploy the same app configuration to multiple regions:

meteor deploy myapp.meteorapp.com --plan essentials --container-size compact --settings settings.json
DEPLOY_HOSTNAME=eu-west-1.galaxy.meteor.com meteor deploy myapp.eu.galaxy.meteorapp.com --plan essentials --container-size compact --settings settings.json
DEPLOY_HOSTNAME=ap-southeast-2.galaxy.meteor.com meteor deploy myapp.au.galaxy.meteorapp.com --plan essentials --container-size compact --settings settings.json

Three separate apps in different regions, all with the same code and settings. Users get the lowest latency by connecting to their nearest region.

Troubleshooting

What's Next?

How Galaxy Billing Works

Quick heads-up on what you're paying for:

You only pay for what you use. Galaxy charges by the minute for each running container. Stop a container, and charges stop immediately. There are no additional charges for:

  • Deployments or Git pushes
  • Data transfer between your app and database
  • User connections or API calls
  • Scaling events

On the free plan, you pay nothing, but with the limitations we covered earlier.

For detailed pricing and plan comparisons, check out the billing documentation.