Running on Galaxy Legacy? Visit the legacy docs.
Galaxy

Meteor Reference

Meteor settings, MongoDB configuration, build options, and deployment reference for Meteor apps on Galaxy.

Meteor Settings

Galaxy uses settings.json to configure your Meteor app. Paste your settings in the Galaxy deployment form or manage them in the Variables tab after deployment.

Your settings should follow this structure:

{
  "galaxy.meteor.com": {
    "env": {
      "MONGO_URL": "mongodb://user:password@host/db",
      "MAIL_URL": "smtp://user:password@smtp.example.com:587"
    }
  },
  "packages": {
    "mongo": {
      "options": {
        "tlsAllowInvalidCertificates": true
      }
    }
  },
  "private": {
    "stripeKey": "sk_live_xxx"
  },
  "public": {
    "appName": "My App"
  }
}

Keep Secrets Out of Git

Paste your settings directly in Galaxy instead of committing them to your repository. For advanced secrets management, see the Secrets Management guide.


Build Configuration

Root Directory

If your Meteor app lives in a subdirectory of your repository (like apps/web), set the root directory during deployment. Leave it empty if your app is at the repo root.

Install Command

Defaults to meteor npm install. Switch to meteor npm ci for reproducible builds if you commit package-lock.json to your repository.

Settings File Path

If your settings.json file is committed to your repository, enter the path here (like private/settings.json). Leave this empty if you paste your settings directly in Galaxy.

Non-Sensitive Config Only

Only use the Settings File Path for non-sensitive configuration. Never commit secrets like API keys, database passwords, or tokens to your repository. Use the Meteor Settings JSON field instead.

Pre-Deploy Command

Runs after the build completes, before the new containers go live. Use it for tasks like database migrations. Your command runs within your private network and has access to your environment variables. If the command fails, the deployment stops.

Paid Plans Only

Pre-deploy commands are only available on paid plans. Free plan apps can't use this field.

Environment Variables

For Meteor apps, most configuration goes in the Meteor Settings JSON. You can still add additional environment variables if needed. Galaxy pre-adds PORT (default 3000) and ROOT_URL (auto-calculated from your subdomain).


Free MongoDB

Toggle Add Free MongoDB during deployment to provision a shared cluster for testing and development.

When enabled, Galaxy sets MONGO_URL automatically. You'll also need to include this in your settings to handle SSL certificates:

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

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

Not for Production

The free MongoDB shared cluster doesn't include backups or restoration resources. For production apps, use a dedicated MongoDB instance.

Already Have a MONGO_URL?

If you've already set a MONGO_URL in your environment variables or Meteor Settings, the Add Free MongoDB option will be disabled. Galaxy detects the existing connection string and skips provisioning a new database.

When you enable this option, the free database is linked directly to your app: it appears in the Databases tab of your dashboard alongside paid instances, and it shares the app's lifecycle (if you delete the app, the database goes with it).


Managing Settings After Deployment

Open your app in the Galaxy dashboard and navigate to the Variables tab. For Meteor apps, you'll see a specialized JSON editor (marked with a "GALAXY MODE" badge) where you can edit your complete settings.json. Make changes, click Save, and Galaxy restarts your containers with the new configuration.

For the complete guide on editing settings, understanding hot-swappable vs rebuild-required changes, and troubleshooting configuration issues, see the Variables tab documentation.


Need Help?

Quick Help

Live chat is fastest for urgent issues. Available directly from your Galaxy dashboard.