Heroku was the gold standard for developer experience. Push your code, get a URL, move on. For years, it was the fastest path from idea to production. But the landscape has shifted. Heroku removed its free tier in November 2022, prices have climbed steadily since, and developers who once loved the platform are looking for alternatives that offer the same workflow without the escalating costs and opaque infrastructure limitations.

Coolify is an open-source, self-hosted Platform as a Service that replicates the Heroku experience on infrastructure you control. Git push deploys, managed databases, automatic SSL, environment variable management — it is all there. The difference is that you run it on your own VPS, so you set the price, choose the data center, and own the entire stack.

This guide walks through the complete migration process: from provisioning a server and installing Coolify to moving your applications, databases, environment variables, and CI/CD pipelines. Every step includes the specific commands and configurations you need.

Why Developers Are Leaving Heroku

The exodus from Heroku is not driven by a single issue. It is the accumulation of several changes that collectively erode the value proposition for indie developers, startups, and growing teams.

The Free Tier Is Gone

For over a decade, Heroku's free tier was the on-ramp for millions of developers. Side projects, prototypes, hackathon demos, learning exercises — they all lived on free dynos. When Salesforce (Heroku's parent company) eliminated the free tier in November 2022, it did not just affect hobby projects. It removed the single biggest reason developers chose Heroku in the first place: the ability to go from zero to deployed without thinking about cost.

The cheapest Heroku option is now the Eco plan at $5/month for 1000 dyno hours shared across all apps. For a single app running 24/7, that is roughly 720 hours per month — meaning one always-on app consumes most of your Eco allocation. A Basic dyno is $7/month per app. For teams running three or four services, you are looking at $28–$35/month before adding any databases or add-ons.

Costs Escalate Quickly

Heroku's pricing is structured around dynos (compute) and add-ons (databases, caches, monitoring). Each is billed separately, and costs compound fast:

A typical production web application with a web dyno, a worker dyno, a PostgreSQL database, and a Redis cache runs $115–$165/month on Heroku. The equivalent resources on a self-hosted VPS with Coolify cost a fraction of that.

Limited Control Over Infrastructure

Heroku's managed approach means you cannot choose your server location beyond the US and EU regions. You cannot tune kernel parameters, install custom system packages, or adjust Docker configurations. You cannot run background processes outside of Heroku's worker dyno model. You cannot access the filesystem persistently. For many production workloads, these constraints become blockers.

Coolify as a Heroku Replacement

Coolify is designed explicitly to replace platforms like Heroku, Netlify, and Vercel with a self-hosted solution. If you have used Heroku, Coolify's workflow will feel immediately familiar.

What Coolify Shares with Heroku

What Coolify Adds Beyond Heroku

Step-by-Step Migration Guide

This section covers the complete migration process from Heroku to Coolify. Each step builds on the previous one. If you already have Coolify installed, skip to Step 3.

Step 1: Provision a VPS

Coolify runs on any Linux VPS with at least 2 vCPUs, 2 GB RAM, and 30 GB SSD storage. For production workloads migrating from Heroku, we recommend starting with 4 vCPUs, 8 GB RAM, and 80 GB SSD — this provides comfortable headroom for multiple applications and databases.

Choose a Cloud VPS or Dedicated VPS in the data center region closest to your users. If your Heroku app was in the US region, a New York or East Coast VPS gives you equivalent latency. For EU region apps, Frankfurt or London are good matches.

Once your VPS is provisioned, SSH in and update the system:

# Update system packages
sudo apt update && sudo apt upgrade -y

# Verify system resources
free -h
df -h
nproc

Step 2: Install Coolify

Coolify's installation is a single command. It installs Docker, configures the reverse proxy (Traefik), sets up the Coolify application, and starts all required services:

# Install Coolify
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

The installation takes 2–5 minutes depending on your server's specs. Once complete, access the Coolify dashboard at http://your-server-ip:8000. Create your admin account, then configure your domain so you can access the dashboard over HTTPS. For a detailed walkthrough, see our Coolify installation guide.

Step 3: Configure DNS

Before migrating your application, set up the DNS records that Coolify will use. You need two things: a domain for the Coolify dashboard itself, and domains for each application you will migrate.

For the Coolify dashboard, create an A record pointing to your server:

# DNS A record for Coolify dashboard
coolify.yourdomain.com  →  YOUR_SERVER_IP

# DNS A record for your application
app.yourdomain.com      →  YOUR_SERVER_IP

# Or use a wildcard for all subdomains
*.yourdomain.com        →  YOUR_SERVER_IP

A wildcard DNS record is convenient if you plan to run multiple applications, as Coolify can assign subdomains automatically without additional DNS changes. After setting the DNS records, configure the Coolify dashboard to use your domain under Settings > General > Instance's Domain. Coolify will automatically issue an SSL certificate via Let's Encrypt.

Step 4: Migrate Your Application

Coolify supports three methods for building and deploying applications, and all three map well to common Heroku setups:

Option A: Nixpacks (Heroku Buildpack Equivalent)

Nixpacks is Coolify's default build system. It auto-detects your application's language and framework, then builds a container image — very similar to how Heroku buildpacks work. If your app runs on Heroku without a Dockerfile, Nixpacks will likely work out of the box.

In the Coolify dashboard:

  1. Click + Add New Resource > Application
  2. Select your Git provider (GitHub, GitLab, or Bitbucket) and authorize access
  3. Choose the repository and branch
  4. Set the build method to Nixpacks
  5. Configure the domain (e.g., app.yourdomain.com)
  6. Click Deploy

Nixpacks supports Node.js, Python, Ruby, Go, PHP, Rust, Java, and most other common languages. If your Heroku app uses a Procfile, Coolify reads it automatically to determine the start command.

Option B: Dockerfile

If you already have a Dockerfile in your repository (or want more control over the build), select Dockerfile as the build method. Coolify builds the image directly from your Dockerfile and deploys the resulting container.

# Example Dockerfile for a Node.js application
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]

Option C: Docker Compose

For applications with multiple services (web server, background worker, database, cache), Docker Compose is the cleanest migration path. Create a docker-compose.yml in your repository that defines all your services:

# docker-compose.yml
services:
  web:
    build: .
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=${DATABASE_URL}
      - REDIS_URL=${REDIS_URL}
    depends_on:
      - db
      - redis

  worker:
    build: .
    command: node worker.js
    environment:
      - DATABASE_URL=${DATABASE_URL}
      - REDIS_URL=${REDIS_URL}
    depends_on:
      - db
      - redis

  db:
    image: postgres:16-alpine
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=myapp
      - POSTGRES_USER=myapp
      - POSTGRES_PASSWORD=${DB_PASSWORD}

  redis:
    image: redis:7-alpine

volumes:
  pgdata:

Step 5: Migrate Databases

Database migration is the most critical step. A botched database migration means data loss, so take your time and verify everything before cutting over.

PostgreSQL (Heroku Postgres to Coolify PostgreSQL)

First, create a PostgreSQL database in Coolify. In the dashboard, go to + Add New Resource > Database > PostgreSQL. Note the connection credentials Coolify provides.

Then export your data from Heroku and import it into Coolify:

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

# The download creates a latest.dump file
# Transfer it to your VPS
scp latest.dump user@your-server-ip:/tmp/

# SSH into your VPS
ssh user@your-server-ip

# Find the Coolify PostgreSQL container
docker ps | grep postgres

# Restore the dump into the Coolify database
docker exec -i CONTAINER_NAME pg_restore \
  --verbose --clean --no-acl --no-owner \
  -U myapp -d myapp < /tmp/latest.dump

For large databases, consider using pg_dump with custom format for faster transfers and the ability to restore individual tables:

# Alternative: direct pipe from Heroku to Coolify
heroku pg:pull DATABASE_URL local_db --app your-heroku-app
pg_dump -Fc local_db | docker exec -i CONTAINER_NAME pg_restore \
  --verbose --clean --no-acl --no-owner -U myapp -d myapp

Redis (Heroku Redis to Coolify Redis)

Redis data is typically ephemeral (caches, sessions), so a full data migration may not be necessary. If you do need to migrate Redis data, use the SAVE command on the Heroku Redis instance to create an RDB snapshot, then copy the dump file into the Coolify Redis container's data directory.

For most applications, it is simpler to let the caches rebuild naturally after migration and focus on ensuring the Redis connection string is updated in your environment variables.

Step 6: Set Up Environment Variables

Heroku stores configuration in environment variables (config vars). You need to transfer all of them to Coolify.

First, export your current Heroku config:

# List all config vars
heroku config --app your-heroku-app

# Export to a file
heroku config --app your-heroku-app --shell > heroku_env.txt

In the Coolify dashboard, navigate to your application and open the Environment Variables tab. Add each variable from your export. Pay special attention to these variables that need to be updated:

Coolify supports both build-time and runtime environment variables. Variables needed during the Docker build (like NODE_ENV=production or private package registry tokens) should be marked as build variables.

Step 7: Configure CI/CD

If you were using Heroku's GitHub integration for automatic deploys, Coolify provides the same functionality. Once your Git repository is connected, every push to the configured branch triggers an automatic build and deployment.

For more advanced pipelines, you can use Coolify's webhook URL in your existing CI/CD system:

# Trigger a Coolify deployment from GitHub Actions
- name: Deploy to Coolify
  run: |
    curl -X POST "${{ secrets.COOLIFY_WEBHOOK_URL }}" \
      -H "Authorization: Bearer ${{ secrets.COOLIFY_API_TOKEN }}"

Coolify also supports deployment previews for pull requests. Enable this in your application settings under Preview Deployments. Each PR gets a unique URL (e.g., pr-42.app.yourdomain.com) that is automatically deployed and cleaned up when the PR is merged or closed — identical to Heroku Review Apps.

Heroku vs Coolify: Cost Comparison

The most compelling reason to migrate is cost. Here is a realistic comparison for a typical production web application with a web process, a background worker, a PostgreSQL database, and a Redis cache:

Component Heroku Coolify on VPS
Web process $25/mo (Standard 1x) $4.99–$14.99/mo
Total VPS cost
(all services included)
Worker process $25/mo (Standard 1x)
PostgreSQL $50/mo (Standard 0)
Redis $15/mo (Premium 0)
SSL certificate Included
Monthly total $115/mo $4.99–$14.99/mo
Annual cost $1,380/yr $59.88–$179.88/yr

On a MassiveGRID Cloud VPS starting at $1.99/month, you get dedicated resources that run Coolify, your application, your database, and your cache — all on a single server. For applications that need more power, a Dedicated VPS starting at $4.99/month provides guaranteed CPU cores without noisy-neighbor performance variability.

The savings compound with scale. Each additional Heroku dyno adds $25–$50/month. On Coolify, adding another application to your server costs nothing beyond the resources it consumes — and you can scale your VPS incrementally as your needs grow.

Post-Migration Checklist

After your application is running on Coolify, work through this checklist before decommissioning your Heroku app:

  1. Verify application functionality: Test all critical user flows, API endpoints, and background jobs on the new deployment.
  2. Check database integrity: Compare row counts and recent records between Heroku and Coolify databases to confirm the migration is complete.
  3. Test SSL certificates: Confirm HTTPS is working correctly and certificates are auto-renewing.
  4. Update DNS records: Point your production domain to the new server. Use a short TTL (300 seconds) during the cutover so you can roll back quickly if needed.
  5. Monitor error rates: Watch application logs in the Coolify dashboard for the first 24–48 hours after cutover.
  6. Set up backups: Configure automated database backups. See our Coolify backup strategy guide for detailed instructions.
  7. Harden security: Follow our Coolify security hardening checklist to lock down your production server.
  8. Decommission Heroku: Once everything is stable (we recommend waiting at least one week), scale down your Heroku dynos and delete the app to stop billing.

When to Choose a Managed Coolify Deployment

Self-hosting Coolify gives you maximum control and the lowest cost, but it also means you are responsible for server maintenance, security updates, and uptime. If your team does not have a dedicated DevOps engineer, or if you need guaranteed high availability, consider MassiveGRID's managed Coolify hosting. You get the same Coolify interface and workflow, but on infrastructure that is monitored, patched, and backed up by our operations team.

Migrate from Heroku to Your Own Infrastructure

  • Cloud VPS — From $1.99/mo. Replace Heroku dynos with independently scalable resources.
  • Dedicated VPS — From $4.99/mo. Dedicated CPU cores for consistent build and runtime performance.
  • Coolify Hosting — One-click Coolify deployment on MassiveGRID's HA infrastructure.
Get Started with Coolify →

Conclusion

Migrating from Heroku to Coolify is not a lateral move — it is an upgrade. You get the same developer experience (git push deploys, managed databases, automatic SSL, environment variable management) on infrastructure you own and control. The cost savings alone justify the migration for most teams, but the real value is in the freedom: no per-dyno pricing, no add-on markups, no platform limitations on what you can run or how you can configure it.

The migration process is straightforward. Provision a VPS, install Coolify, move your code and data, update your DNS, and you are running. For most applications, the entire process takes an afternoon. And once you are on Coolify, every new project you deploy costs nothing beyond the server resources it uses — a fundamentally better economic model than per-app platform pricing.