Migrate from Heroku to Galaxy Cloud
Companies who've switched from Heroku to Galaxy report savings of 40–60% on compute and databases. This guide walks you through migrating your application.
Why migrate from Heroku to Galaxy?
Cut your infrastructure costs by 40–60%
A Heroku Standard-1X dyno costs $25/mo for 512MB. The same container on Galaxy is $6/mo. At the Standard-2X level, Heroku charges $50/mo for 1GB — Galaxy gives you 2GB for $24/mo. The savings compound with every container, database, and add-on you run.
Transparent pricing, no surprises
Galaxy charges per-minute for containers and a flat monthly rate for databases. No bandwidth fees, no egress charges, no hidden add-on costs. You see exactly what you'll pay before you deploy.
Managed databases included
Galaxy offers managed PostgreSQL, Redis, and MongoDB as first-party services. No third-party add-ons, no separate billing, no mandatory dyno fees to access your database. MongoDB is managed and integrated, something no other PaaS offers.
Bare metal performance on Kubernetes
Galaxy Metal runs your containers on dedicated bare metal servers with Kubernetes orchestration — not shared VMs. You get consistent performance without noisy neighbor issues.
"Switching to Galaxy was a game-changer. Everything just worked from day one."
Felix Ingla
Founder, Pedra.ai
Prerequisites
Before you start, make sure you have:
- Access to your Heroku dashboard and database credentials
- Your application code in a GitHub repository
- Database credentials for your Heroku Postgres, Redis, or MongoDB instance
- DNS management access for your custom domain
- A Galaxy Cloud account (sign up here)
Tip: Lower your DNS TTL to 300 seconds (5 minutes) at least 24 hours before migration for faster propagation when you switch over.
Heroku to Galaxy migration steps
Step 1: Create your Galaxy account
Sign up at galaxycloud.app and create your organization. From your Galaxy dashboard, click Deploy a new app.
Create your application
- Choose your App Type (Node.js, Python, Meteor.js, or AdonisJS).
- Connect your GitHub account and import your repository.
- Select Account, Plan & Container size.
- Select your branch and set your environment variables (copy from Heroku → Settings → Config Vars).
Don't deploy yet — set up your databases first.
Provision your databases
PostgreSQL
- Go to Databases → Create Database → PostgreSQL.
- Select a tier based on your data size (see pricing).
- Galaxy provides the connection string in the database dashboard. Add it to your app's environment variables.
Redis
- Go to Databases → Create Database → Redis.
- Galaxy Redis starts at $9.99/mo for 512MB (vs Heroku's $120/mo).
- Connection string is available in the database dashboard.
MongoDB (Galaxy exclusive)
- Go to Databases → Create Database → MongoDB.
- Galaxy is the only PaaS with managed MongoDB.
- If you're currently on MongoDB Atlas alongside Heroku, you can consolidate everything on Galaxy.
Step 2: Prepare to migrate
- Log into your Heroku dashboard.
- Get your database credentials:
- Heroku Dashboard → Your App → Resources → Database → Credentials
- Or run:
bashheroku config:get DATABASE_URL -a your-app-name - Export your environment variables:bash
heroku config -a your-app-nameCopy all values to Galaxy's environment variables panel.
Step 3: Migrate your database
PostgreSQL
Export from Heroku:
pg_dump \
-Fc \
-f "heroku-backup.bak" \
"$(heroku config:get DATABASE_URL -a your-app-name)"Import to Galaxy:
pg_restore \
--clean \
--no-owner \
--no-acl \
--if-exists \
--dbname="your-galaxy-postgresql-connection-string" \
"heroku-backup.bak"Find your Galaxy connection string in: Databases → Your Database → Connection Details.
Redis
Redis data is typically ephemeral (cache/sessions). In most cases, you don't need to migrate Redis data — just provision a Galaxy Redis instance and your app will repopulate it.
If you need to migrate persistent Redis data:
# Export from Heroku Redis
redis-cli -u "$(heroku config:get REDIS_URL -a your-app-name)" --rdb dump.rdb
# Import to Galaxy Redis
redis-cli -u "your-galaxy-redis-connection-string" --pipe < dump.rdbMongoDB
If you're on MongoDB Atlas (the common setup since Heroku dropped MongoDB):
# Export from Atlas
mongodump \
--uri="your-atlas-connection-string" \
--out=./mongo-backup
# Import to Galaxy MongoDB
mongorestore \
--uri="your-galaxydb-connection-string" \
./mongo-backupStep 4: Test your deployment
Before switching DNS:
- Deploy your app: Click Deploy in the Galaxy dashboard (or push to your connected branch).
- Check deploy logs: Verify the build completes without errors.
- Test with Galaxy URL: Every app gets a
*.galaxycloud.appURL for testing. - Run smoke tests: Verify login, payments, API endpoints, background jobs.
- Check database: Confirm your data migrated correctly.
Step 5: Switch DNS to Galaxy
Once everything looks good:
- In Galaxy, go to your app's Settings → Custom Domains.
- Add your domain — Galaxy provides the DNS records (A/CNAME).
- Update your DNS provider with the new records.
- SSL certificates are automatically provisioned and renewed.
Wait for DNS propagation (usually 5–30 minutes with low TTL). Keep Heroku running until you've confirmed traffic is hitting Galaxy.
Step 6: End your Heroku subscription
Once traffic is flowing through Galaxy and everything is stable:
- Remove Heroku add-ons (databases, Redis, etc.) to stop charges.
- Scale dynos to 0 or delete the Heroku app.
- Keep the app around for a few days as a safety net if you prefer.
Migrated successfully? Email us at support@galaxycloud.app with a screenshot of your Heroku cancellation, and we'll add an extra $50 credit to your account.
Common migration scenarios
Meteor.js app + MongoDB
Performance-M dyno + MongoDB Atlas
Medium container + Galaxy MongoDB
Node.js app + PostgreSQL
Standard-1X dyno + Heroku Postgres Standard-0
Micro container + Galaxy PostgreSQL Basic
Full-stack app + PostgreSQL + Redis
Standard-2X dyno + Postgres + Redis
Small container + Galaxy PostgreSQL + Galaxy Redis
Multi-dyno production setup
Multiple Standard/Performance dynos + Postgres Standard-4 + Redis Premium
Multiple containers + Galaxy PostgreSQL Ultra + Galaxy Redis
Complex / enterprise migration
Private Spaces, multiple apps, CI/CD pipelines
Galaxy Metal, dedicated infrastructure
Post-migration checklist
After you've migrated:
Monitor performance
Use Galaxy's built-in container metrics and Monti APM (for Meteor apps) to verify your app is performing well.
Right-size your containers
Start with the tier that matches your Heroku dyno, then adjust based on actual usage. Galaxy makes it easy to scale up or down without redeployment.
Set up push-to-deploy
Connect your production branch to Galaxy for automatic deploys on push. No more git push heroku main.
Review your bill after 30 days
Compare your first Galaxy invoice to your last Heroku bill. Most teams see 40–60% savings on compute and 50–70% on databases.
Tell us about it
We love hearing migration stories. If you want to share yours, we'll feature it on our blog and give you a credit.
Frequently asked questions
Ready to leave Heroku behind?
Start deploying in minutes. Use code GALAXY100 for $100 in migration credits.