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
| Capability | Heroku | Grid |
|---|---|---|
| Dyno Model | Sleeps after 30min inactivity (free tier) | Always-on containers, no sleeping |
| Memory Limit | 512MB (Hobby) / 2.5GB (Standard) | As much as your server has |
| Build System | Buildpacks (proprietary) | Docker / Nixpacks (open) |
| Container Restarts | Every 24h (forced) | Only on deploy or failure |
| Pricing | $7/dyno + $15/mo Postgres + $50/mo Redis | Server 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.txt2. 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
- Push your repo to GitHub (if not already there)
- Connect GitHub to Grid via OAuth
- Create a new service and select your repository
- Add your environment variables from
heroku-config.txt - 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 Addon | Cost | Grid Equivalent |
|---|---|---|
| Heroku Postgres | $15/mo (Hobby) | Included (Patroni HA) |
| Heroku Redis | $50/mo (Premium) | Included |
| Heroku Connect | $100/mo | Direct Postgres connection |
| Heroku Scheduler | Free | Celery Beat / Cron |
| SSL Certificate | Automated | Automated (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