Dokku: Self-hosted Heroku

Like many other developers, I tried to deploy Heroku, and the whole process from setting up the database to push to deploy was a real wow moment. The only negative and quite crucial is the price, which is several times higher than the comparably powerful VPS servers at DigitalOcean, Vultr, Linode and others.

Fortunately, there is a solution called Dokku that provides UX of Heroku on its own server in docker containers.

Main features

  • Apps and addons concept same as Heroku
  • Support for Buildpacks from Heroku
  • Easy to use CLI interface mirroring Heroku CLI
  • Set of first party plugins/addons mantained by creators of Dokku
  • Support for multi server deployment with Kubernetes or Nomad plugins
  • And of course price, which comes in form of a bill from your favorite VPS provider


Apps can be configured throw CLI interface and deployed on git push to server. The build of the app is managed by Heroku Buildpacks and configuration files stored inside of your git repository like app.json and Procfile.

You can also deploy any docker image additionally to Heroku Buildpacks. This can be quite useful in combination with plugins, where you can link your custom docker container with the database plugin, expose it to a specific domain and protect it with Let's Encrypt HTTPS certificate. All manages by Dokku runtime.


Dokku comes with a set of ready-to-use addons with can be linked or modify apps in some sanse. Plugins I use are:

  • PostgreSQL
  • Redis
  • Mongo
  • Elasticsearch
  • Let's Encrypt
  • And more

All database plugins come with the ability to backup themselves periodically to your AWS S3 bucket.


Dokku is a great money saver. You can have the identical environment and CLI UI as Heroku with a radically lower price just with a little bit of Linux knowledge.

Copyright © 2010 - 2024 Jan Lavička