Migration Guides
Guide

Migrating from Heroku

Move your Heroku apps to Grid. No more dyno sleeping, no more 512MB memory ceiling, no more 24h restarts.

Before you start: Ensure Grid is installed and running. See the Installation Guide if you haven't set it up yet.

Key Differences

CapabilityHerokuGrid
Dyno ModelSleeps after 30min inactivity (free tier)Always-on containers, no sleeping
Memory Limit512MB (Hobby) / 2.5GB (Standard)As much as your server has
Build SystemBuildpacks (proprietary)Docker / Nixpacks (open)
Container RestartsEvery 24h (forced)Only on deploy or failure
Pricing$7/dyno + $15/mo Postgres + $50/mo RedisServer cost only (often $4-8/mo)

Migration Steps

1. Export Heroku data

# Export Heroku Postgres
heroku pg:backups:capture --app your-app
heroku pg:backups:download --app your-app

# Export Redis
heroku redis:cli --app your-app
# Then use SAVE/redis-dump

# Save environment variables
heroku config --app your-app > heroku-config.txt

2. Create a Dockerfile

Heroku buildpacks are proprietary. Convert your app to a Dockerfile:

# Example for a Node.js app
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE $PORT
CMD ["npm", "start"]

Or let Grid auto-detect with Nixpacks — no Dockerfile needed for most languages.

3. Deploy to Grid

  1. Push your repo to GitHub (if not already there)
  2. Connect GitHub to Grid via OAuth
  3. Create a new service and select your repository
  4. Add your environment variables from heroku-config.txt
  5. Deploy

4. Migrate Heroku Postgres to Grid

# Import your Heroku backup into Grid's managed Postgres
pg_restore --no-owner -d postgresql://grid:...@... latest.dump

# Or direct transfer
heroku pg:psql --app your-app -c "COPY ... TO STDOUT" | \
  psql postgresql://grid:...@... -c "COPY ... FROM STDIN"

5. Point your domain

  • Update your DNS A record to your Grid server IP
  • Caddy automatically handles SSL certificates (Let's Encrypt)
  • Remove Heroku's DNS target — you own the domain directly

Heroku addon equivalents on Grid

Heroku AddonCostGrid Equivalent
Heroku Postgres$15/mo (Hobby)Included (Patroni HA)
Heroku Redis$50/mo (Premium)Included
Heroku Connect$100/moDirect Postgres connection
Heroku SchedulerFreeCelery Beat / Cron
SSL CertificateAutomatedAutomated (Let's Encrypt via Caddy)

What you gain

  • No dyno sleeping — apps are always-on, no cold starts
  • No 24h forced restarts — containers run until you update them
  • No memory ceilings — use your full server's resources
  • Docker freedom — any runtime, any dependency, no buildpack limits
  • 90%+ cost reduction — Heroku's markup is extreme for what you get