Dokku Has a Free API: Your Own Heroku on a $5 VPS

Heroku charges $25/mo for one hobby dyno. Dokku gives you unlimited apps on a $5 VPS with the same git push workflow.

What Is Dokku?

Dokku is the smallest PaaS implementation you’ve ever seen. It’s an open-source Heroku alternative that runs on any Linux server.

# Install on your VPS (Ubuntu)
wget -NP . https://dokku.com/install/v0.34.x/bootstrap.sh
sudo DOKKU_TAG=v0.34.8 bash bootstrap.sh

The Heroku Workflow

# On your server
dokku apps:create my-app

# On your local machine
git remote add dokku [email protected]:my-app
git push dokku main

That’s it. Dokku detects your language (Node, Python, Go, Ruby, etc.), builds it, and deploys it. Same buildpacks as Heroku.

Configuration

# Environment variables
dokku config:set my-app DATABASE_URL=postgres://...
dokku config:set my-app SECRET_KEY=my-secret

# Domains
dokku domains:add my-app myapp.com
dokku domains:add my-app www.myapp.com

# SSL (automatic Let's Encrypt)
dokku letsencrypt:enable my-app

# Scale
dokku ps:scale my-app web=2 worker=1

# Databases
dokku postgres:create mydb
dokku postgres:link mydb my-app
# DATABASE_URL is automatically set

Plugins for Everything

# PostgreSQL
dokku plugin:install https://github.com/dokku/dokku-postgres.git

# Redis
dokku plugin:install https://github.com/dokku/dokku-redis.git

# MySQL
dokku plugin:install https://github.com/dokku/dokku-mysql.git

# Let's Encrypt
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git

Cost Comparison

Setup Monthly Cost Apps
Heroku $25/app 1
Dokku on DigitalOcean $5 total Unlimited
Dokku on Hetzner $4 total Unlimited
Railway $5/app 1

A $5 VPS with 1GB RAM can run 3-5 small web apps with databases. A $12 VPS with 2GB handles 10+.

Why Dokku

  • git push deploy — same workflow as Heroku
  • $5/month — unlimited apps on one server
  • SSL — automatic Let’s Encrypt
  • Docker support — deploy Dockerfiles too
  • Zero lock-in — standard Linux server, standard Docker

Building deployment infrastructure? Check out my developer tools or email [email protected].