Hangar vs Heroku

How Hangar compares with Heroku for deploying apps and databases, including the pricing model, builds, add-ons and how to migrate a Heroku app.

Updated

Heroku defined the push-to-deploy workflow, and Hangar keeps what made it good: connect a repository, push, and the platform builds and runs your app. The differences are in how you pay and in what is included.

Facts about Heroku below come from its public pricing page as of October 2026. Check heroku.com/pricing for the current state.

At a glance

HangarHeroku
Deploy on git pushYes, from GitHub, GitLab, Bitbucket or GiteaYes, from Heroku Git or GitHub
BuildsAutomatic (Railpack), Dockerfile, Heroku and Paketo buildpacksBuildpacks, container images
Pricing modelUsage: CPU, memory, storage and egress, metered by the secondFixed monthly price per dyno
Idle appsPay for what they usePay the full dyno price; Eco dynos sleep after 30 minutes
Managed databasesPostgreSQL, MySQL, MariaDB, MongoDB, Redis, libSQLHeroku Postgres and Key-Value Store, more through add-ons
Preview per pull requestYesReview Apps, on Pipelines
Custom domains with TLSIncludedIncluded on paid dynos

Pricing

This is the largest difference.

Heroku charges per dyno. In October 2026 an Eco dyno is $5 a month and sleeps when idle, Basic is $7, Standard-1X is $25 and Standard-2X is $50, each with a fixed amount of memory. A second process, such as a worker, is a second dyno at the same price. Heroku Postgres starts at $5 a month. The bill is the sum of the sizes you picked, whether the app is busy or idle.

Hangar charges for use. Your plan's subscription becomes usage credit, and CPU, memory, storage and egress are metered by the second on what your services actually consume. An API that idles most of the day costs what it used. A worker is another service billed the same way, not another fixed fee. Current plans and rates, and an estimator, are on the pricing page.

For small and medium apps with uneven traffic, usage-based billing is usually cheaper. For an app that keeps a dyno busy all day the two models come closer, and the comparison depends on the size.

Builds

Heroku builds with buildpacks. Hangar has a Heroku buildpacks builder, so an app with a Procfile builds as it does today. From there you can stay on buildpacks or move to the automatic builder, which is faster and produces smaller images, or to a Dockerfile.

Databases and add-ons

Heroku's strength is its add-on marketplace: many third-party services attach to an app with one command and bill through Heroku.

Hangar has no marketplace. It runs the common databases itself, as services in your project on a private network, with scheduled backups. For anything else, such as search or email, you use the provider directly and set its credentials as environment variables.

When Heroku is the better choice

  • You depend on several add-ons and value having them on one bill.
  • Your team's workflow is built around the Heroku CLI and Pipelines.
  • You need the compliance certifications of Heroku Shield.

When Hangar is the better choice

  • You want to pay for usage, not for dyno sizes.
  • You run several small services or workers and do not want a fixed fee for each.
  • Your code is on GitLab, Bitbucket or Gitea.
  • You want spend limits that can pause services before a bill grows.
  • You want Dockerfile builds and buildpacks on the same platform.

Migrating from Heroku

  1. Create the service. Add a service from your repository and choose the Heroku buildpacks builder to keep the build identical, or try the automatic builder.
  2. Set the start command. Copy the web line of your Procfile into the service's start command. Each other process type becomes its own service with its own command.
  3. Copy config vars. Export them with heroku config --shell and paste them into the service's environment.
  4. Move the database. Create a PostgreSQL database on Hangar and enable its external connection for the migration. Then dump and restore, with HANGAR_DATABASE_URL set to that external connection URL:
heroku pg:backups:capture --app your-app
heroku pg:backups:download --app your-app
pg_restore --no-owner --no-acl -d "$HANGAR_DATABASE_URL" latest.dump
  1. Switch the domain. Add your domain on Hangar, confirm the deploy is healthy on a generated domain and then update your DNS record.

Like Heroku, Hangar sets PORT for you: it is the domain's container port, 3000 unless you change it. An app that already listens on PORT works as it is. See Domains and HTTPS.

Frequently asked questions

Is Hangar a Heroku alternative?
Yes. Hangar gives you the same push-to-deploy workflow as Heroku, with builds, HTTPS, managed databases and rollbacks, and bills for the CPU and memory your services actually use instead of a fixed price per dyno.
Can Hangar build an app that uses Heroku buildpacks or a Procfile?
Yes. Hangar has a Heroku buildpacks builder, so an app that builds on Heroku can build without changes. The automatic builder and Dockerfile builds are also available.
How do I move a Heroku Postgres database to Hangar?
Create a PostgreSQL database on Hangar, take a dump of the Heroku database with pg_dump or heroku pg:backups, restore it into the new database and point your app's DATABASE_URL at the new internal connection URL.

Deploy your app on Hangar

Connect a repository and it is live in minutes.

Start deploying