Skip to content

Guide · Open source

How to use Dokku: install it on a VM and deploy apps

Updated · written with AI from the project's own documentation and checked against our catalogue data

Dokku is an open-source platform-as-a-service that you install on your own server. It is described as a Docker-powered mini-Heroku, and it lets you deploy web applications by pushing code to it. This guide explains what you need, how to run the installer, how to finish setup and where to go next, so you can host your own apps on a server you control.

Dokkudokku/dokku · ★ 32.2k · MIT

Quick start

  1. 1Prepare a fresh VM. Start with a fresh Ubuntu 22.04, 24.04 or 26.04, or Debian 11+ server with sudo access.
  2. 2Create or locate your SSH keypair. Make sure you have an SSH keypair for deployment. If it exists before installation, Dokku imports it automatically.
  3. 3Download the bootstrap script. Use wget to fetch bootstrap.sh for the latest release tag listed in the Dokku README.
  4. 4Run the installer. Run bootstrap.sh with sudo and set DOKKU_TAG to the same release tag.
  5. 5Set the domain and add keys. Run dokku domains:set-global with your domain and dokku ssh-keys:add for any keys not already imported.

What Dokku is and who it suits

Dokku runs each app in Docker containers and gives you Heroku-style deployment on a machine you manage yourself. The project calls itself a Docker-powered mini-Heroku and is released under the MIT licence. Its source is written in Go.

It fits developers who want deployment without a managed hosting service, small teams hosting a handful of web apps on one VM, and people comfortable administering a Linux server over SSH. It is not a good fit if you want no server administration at all, because you set up and maintain the server yourself. The README also does not describe large multi-server scaling, so do not plan around that.

What you need before you install Dokku

Dokku needs a fresh VM running one of the supported operating systems. The README lists Ubuntu 22.04, 24.04 or 26.04 (amd64 or arm64, any currently supported release) and Debian 11 or later (amd64 or arm64).

You also need an SSH keypair that can be used for application deployment, and an account with sudo access. If the keypair exists before installation, it is imported into Dokku automatically. Otherwise you import it after installation with the ssh-keys:add command.

  • A fresh Ubuntu 22.04, 24.04 or 26.04, or Debian 11+ VM
  • An SSH keypair for deployment
  • A user with sudo access

Install Dokku on your server

Log in to the VM as a user with sudo access. Download the bootstrap script with wget, then run it with sudo and the release tag. Use the latest tag shown in the installation section of the Dokku README, replacing the placeholder below.

The README describes this as installing the latest stable release. Installation is run from the VM itself, not from your local machine.

wget -NP . https://dokku.com/install/<release-tag>/bootstrap.sh sudo DOKKU_TAG=<release-tag> bash bootstrap.sh

Finish setup: set the domain and add SSH keys

The README says you complete the installation by configuring your server domain and user access. Set the global domain with dokku domains:set-global. Then add the SSH keys of the people who will deploy with dokku ssh-keys:add.

If your deployment keypair was already on the server during installation, it may already be imported, so check your keys before adding them again.

  • Set the server domain with dokku domains:set-global
  • Add deployer keys with dokku ssh-keys:add
dokku domains:set-global example.com dokku ssh-keys:add <key-name> /path/to/public-key.pub

Other ways to get Dokku and where to read more

The README lists community packages for Ubuntu and Arch Linux, so you may find a packaged install route on those systems. Check the official documentation at dokku.com for the current installation and configuration guides, and the project's Slack for community help.

The README is truncated in the source used for this guide, so for full command references, follow the links in the official docs rather than relying on this page.

What people use it for

  • Hosting several small web apps on one VM you administer
  • Giving a small team Heroku-style deployment on a server they control
  • Running self-hosted apps without paying for a managed hosting service

Frequently asked questions

Is Dokku free to use?

Dokku is released under the MIT licence, which is a permissive open-source licence. You install and run it on your own server, so the software itself costs nothing to use. Your server and any other infrastructure are your own costs.

What operating systems does Dokku support?

The README lists Ubuntu 22.04, 24.04 and 26.04 (amd64 and arm64) and Debian 11 and later (amd64 and arm64). It is meant to be installed on a fresh VM running one of these systems.

Do I need to know Linux to use Dokku?

Yes, in practice. Dokku is for people comfortable administering a Linux server over SSH. You run the installer with sudo and manage keys and domains from the command line.

How do I add SSH keys to Dokku?

Use dokku ssh-keys:add to import a keypair after installation. If a deployment keypair already existed on the server before installation, it is imported automatically.

What are alternatives to Dokku?

Projects comparable to Dokku include Coolify, CapRover and Piku. Choose based on how much you want to manage through a web interface versus the command line, and on the features you need.

Can Dokku scale across many servers?

The README does not describe multi-server scaling. If you need large multi-server scaling, check the official documentation or consider a different tool.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Dokku suits developers and small teams who want Heroku-style deployment on a single VM they control and are comfortable with Linux and SSH. If you want no server administration at all, or you need large multi-server scaling that the README does not cover, pick a managed platform or a different tool.

Install options & downloads