Skip to content
NewHost
Menu

Heroku Alternative in South Africa - Moving Your App Locally

A practical Heroku alternative guide for South Africa - how to move a Procfile app, replace add-ons with managed databases and pay in rand with VAT invoices.

By NewHost team · · 5 min read

A Heroku alternative in South Africa should let you keep the workflow you like (push code, it deploys) while running your app closer to local users and billing you in rand. Most Heroku apps move without a rewrite: you translate the Procfile into build and start commands, swap add-ons for managed services, and copy your config vars. This guide walks through each step.

Why teams look for a Heroku alternative

Heroku made "git push to deploy" mainstream, and it is still a mature, well-documented platform with a large add-on marketplace. Teams in South Africa usually start looking elsewhere for practical reasons rather than technical ones:

  • Dollar billing. Heroku bills in US dollars, so costs move with the exchange rate. Some local cards decline foreign recurring charges.
  • Regions. Heroku runs in a small number of regions outside South Africa. If your users and your database are local, every request travels overseas and back.
  • Add-on sprawl. Databases, schedulers, logging and caching are often separate add-ons, each with its own plan and price. Check their current pricing for the combination you use.
  • Local invoices and support. A South African VAT invoice and support in your time zone make life easier for smaller teams.

None of these mean Heroku is wrong. They mean it is worth comparing.

What a Heroku app actually depends on

Before you move, list what your app uses. A typical Heroku app has:

Heroku concept What it does Equivalent elsewhere
Procfile web: process Starts your web server Start command
Buildpack Detects the language and runs the build Install and build commands
Config vars Environment variables Environment variables
PORT variable Port your app must listen on Same idea, usually also PORT
Heroku Postgres / MySQL add-on Managed database Managed database
Heroku Scheduler Runs commands on a schedule Scheduled tasks (cron)
worker: process Background jobs Separate app or scheduled task
Release phase Runs migrations before release Build step or deploy hook

Moving a Procfile app step by step

1. Read your Procfile

A Node.js Procfile often looks like this:

web: node server.js
release: npx prisma migrate deploy

The web line becomes your start command. The release line needs a new home: many teams run migrations as part of the build, or trigger them from a deploy step.

2. Make sure your app listens on PORT

Heroku assigns a port through the PORT environment variable. Keep that pattern, because most platforms do the same (our guide on how to host a Node.js app explains why):

const express = require("express");
const app = express();

app.get("/health", (req, res) => res.send("ok"));

const port = process.env.PORT || 3000;
app.listen(port, () => console.log(`Listening on ${port}`));

3. Set install, build and start commands

On NewHost you configure these per app. A typical Node.js setup:

# install
npm ci
# build
npm run build
# start
npm start

Make sure package.json has an engines field or a documented Node.js version, so you build with the same version you tested.

4. Copy your config vars

Export them from Heroku with the CLI (heroku config -s -a your-app) and recreate them as encrypted environment variables. Leave out DATABASE_URL for now; you will get a new one from your new database.

5. Replace add-ons

  • Database: create a managed database, export your data from Heroku, import it into the new one, and set the new connection string.
  • Scheduler: recreate each job as a scheduled task. On NewHost these are cron-style with a minimum interval of every 5 minutes.
  • Logging, caching, email: decide which you still need. Many small apps can drop an add-on once they see the built-in logs.

Note that Heroku Postgres is PostgreSQL. NewHost includes MySQL by default and offers PostgreSQL on request, so contact us before migrating if you want to stay on PostgreSQL and avoid a schema conversion.

6. Deploy, test, then switch DNS

Deploy to the platform URL first and test logins, forms, background jobs and anything that writes to the database. When you are happy, lower your DNS TTL, put Heroku into maintenance mode, do a final data sync, and point your domain at the new host.

Types of Heroku alternatives

  • Other global PaaS platforms such as Render or Railway feel very similar to Heroku and are quick to adopt. They bill in dollars and run in their own regions. We compare them in Render and Railway vs local hosting.
  • A VPS gives you full control for a low price, but you manage the operating system, Node.js, process restarts, SSL and backups yourself.
  • Managed app hosting in South Africa, such as NewHost, keeps the Heroku-style workflow and adds local servers and rand billing.

What NewHost offers Heroku users

NewHost Node.js hosting covers the parts of Heroku most apps use:

  • Deploy from GitHub or GitLab; a push to your chosen branch deploys automatically.
  • Configurable install, build and start commands, and encrypted environment variables.
  • Managed databases: MySQL on every plan, with PostgreSQL or MS SQL on request.
  • Scheduled tasks for Heroku Scheduler-style jobs.
  • Free Let's Encrypt SSL and automatic backups, plus on-demand backups.
  • Servers in Johannesburg, prices in rand excluding VAT, and VAT invoices. Plans start at R99/month.

When Heroku is still the better choice

Stay on Heroku if you depend on specific marketplace add-ons that have no easy replacement, if you run many process types and dynos that you scale up and down through the Heroku CLI, or if your users are mostly in Europe or the US. Heroku's ecosystem and documentation are genuine strengths.

Frequently asked questions

Do I need to change my code to leave Heroku?

Usually very little. If your app reads its port from PORT and its settings from environment variables, it will run elsewhere. The changes are mostly configuration: start commands, a new database connection string and scheduled jobs.

What replaces the Procfile?

The web line becomes the start command in your app settings. Other process types become separate apps or scheduled tasks, and release commands move into the build or a deploy step.

How do I move my Heroku Postgres database?

Take a backup with pg_dump, then restore it into the new database. If you are moving to MySQL you will need to convert the schema, which is easier with an ORM such as Prisma. The Prisma docs explain switching providers.

Can I run background workers?

Short, repeatable jobs work well as scheduled tasks. A long-running worker can run as its own app with a start command such as node worker.js.

Plan your move

If you want Heroku-style deploys on South African servers with rand billing, see NewHost Node.js hosting. For a larger migration, contact us and we will help you map every add-on.

Related guides

Ready to launch on NewHost?

Choose a plan and go live today, or tell us what you need and we'll recommend the right setup.