Dokku
dokku · Deployment
GitHub stars
32,217Awaiting first sync
No measured star history yet
What is Dokku?
Dokku gives a single server the workflow people know from Heroku: push code, let the platform build it, and get a running app on a domain. Everything is driven from the command line over SSH, and each app runs in its own Docker container on hardware you choose.
Dokku is a small self-hosted platform as a service that runs on one Ubuntu or Debian server. You push code with git, and it builds the app from a Dockerfile or buildpacks, runs it in Docker containers and routes a domain to it. Plugins add databases such as Postgres and Redis, and free TLS certificates from Let's Encrypt.
Core capabilities
- Deploy with git push, a Docker image or an archive, built from a Dockerfile or buildpacks.
- Add Postgres, MySQL, Redis and other databases with official plugins, linked by one command.
- Move traffic to new containers after health checks, and add Let's Encrypt certificates via a plugin.
How apps get deployed
Apps arrive by git push, as a ready Docker image, or as a tar or zip archive. Dokku can build them from a Dockerfile, Heroku or Cloud Native buildpacks, Nixpacks or Railpack. On each deploy it starts the new containers, waits 10 seconds by default or runs the health checks defined in app.json, then moves traffic over and keeps the old containers for 60 more seconds so open connections can finish.
- Git push
- Buildpacks
- Dockerfile
- Zero downtime
Databases and extras through plugins
Features beyond the core come from plugins, which can be written in any language. Plugins kept by the Dokku maintainers cover datastores such as Postgres, MySQL, MariaDB, Redis, Mongo, ClickHouse and RabbitMQ, plus Let's Encrypt certificates, HTTP auth, maintenance mode, redirects and cron restarts. Each datastore plugin creates a service that can be linked to an app as environment variables.
- Plugins
- Postgres
- Redis
- Let's Encrypt
Self-hosting and licence
Dokku needs a fresh Ubuntu 22.04, 24.04 or 26.04, or Debian 11 or newer, on amd64 or arm64, with at least 1GB of RAM for the default Docker scheduler. A bootstrap script installs it through apt in about 5 to 10 minutes. Dokku is MIT licensed. Dokku Pro is a separate paid add-on from the same maintainers that adds a web interface, a JSON API and team management on top of a self-hosted install.
- Ubuntu
- Debian
- Docker
- MIT
Where it fits
Use cases
- 01
Move a Heroku app to your own server
Run the bootstrap script on a fresh Ubuntu or Debian VM, add your SSH key and set a global domain. Create the app with dokku apps:create, add a git remote and push your code, which builds with the same Heroku buildpacks.
- 02
Give an app a database
Install the official Postgres plugin, create a database with dokku postgres:create and link it to the app. Dokku sets DATABASE_URL in the app's environment, so the code connects without config changes.
- 03
Put an app on its own domain with HTTPS
Point the domain at the server and run dokku domains:set for the app. Install the Let's Encrypt plugin, enable it for the app and add its cron job so certificates renew on their own.