ScriptsApr 10, 2026·3 min read

Dokku — The Smallest PaaS Implementation You've Ever Seen

Dokku is a Docker-powered PaaS that helps you build and manage app lifecycles. git push to deploy, automatic SSL, plugin ecosystem — your own Heroku on a single server.

TL;DR
Dokku is a self-hosted, Docker-powered PaaS that lets you git push to deploy apps with automatic SSL and a plugin ecosystem.
§01

What it is

Dokku is a Docker-powered Platform as a Service (PaaS) that runs on a single server. It provides Heroku-style git push deployments, automatic SSL certificates via Let's Encrypt, a plugin ecosystem for databases and services, and support for Buildpacks, Dockerfiles, and Docker images. It is the smallest PaaS implementation you can deploy on a single VPS.

It targets individual developers, small teams, and side projects that need simple deployment without managing Kubernetes or complex CI/CD pipelines. A $5/month VPS with Dokku can host multiple applications.

§02

How it saves time or tokens

Dokku eliminates the need for manual deployment scripts, Nginx configuration, and SSL certificate management. Push your code with git push dokku main and Dokku builds a container, routes traffic, and provisions an SSL certificate automatically. Adding a database is one command: dokku postgres:create mydb.

For small projects, Dokku replaces the entire DevOps pipeline. There is no CI/CD system to configure, no container registry to manage, and no orchestrator to learn. The operational overhead is minimal.

§03

How to use

  1. Install Dokku on a fresh Ubuntu server with the bootstrap script. Point your domain's DNS to the server.
  2. Create an app: dokku apps:create myapp. Add a Git remote: git remote add dokku dokku@server:myapp.
  3. Push your code: git push dokku main. Dokku detects the language, builds the container, and routes traffic to it.
§04

Example

# Install Dokku on Ubuntu
wget -NP . https://dokku.com/bootstrap.sh
sudo DOKKU_TAG=v0.34.0 bash bootstrap.sh

# Create an app and deploy
dokku apps:create my-api
git remote add dokku dokku@your-server.com:my-api
git push dokku main

# Add a PostgreSQL database
dokku plugin:install https://github.com/dokku/dokku-postgres.git
dokku postgres:create my-db
dokku postgres:link my-db my-api

# Enable automatic HTTPS
dokku letsencrypt:enable my-api

# Set environment variables
dokku config:set my-api API_KEY=secret123
§05

Related on TokRepo

§06

Common pitfalls

  • Running Dokku on a server with less than 1 GB of RAM. Docker builds consume significant memory. Applications plus databases on a 512 MB server will run into OOM kills. Use at least 1 GB RAM with swap configured.
  • Not setting up persistent storage for databases. Dokku database plugins store data in Docker volumes by default. If you reinstall Dokku or remove a plugin without exporting data first, database contents are lost. Set up regular backups with dokku postgres:export.
  • Deploying stateful applications that write to the local filesystem. Dokku containers are ephemeral and rebuilt on every deploy. Files written inside the container are lost. Use Dokku's persistent storage plugin to mount host directories for file uploads.

Frequently Asked Questions

How does Dokku compare to Heroku?+

Dokku provides a similar developer experience to Heroku: git push deployment, buildpack support, add-on plugins, and environment variable management. The difference is that Dokku runs on your own server. You pay for server costs instead of per-dyno pricing. Dokku lacks Heroku's managed scaling and marketplace but covers most deployment needs.

What languages and frameworks does Dokku support?+

Dokku supports any language that has a Buildpack or Dockerfile. This includes Node.js, Python, Ruby, Go, Java, PHP, Clojure, Scala, and more through Heroku buildpacks. You can also deploy pre-built Docker images directly.

How do I add databases to Dokku?+

Dokku has official plugins for PostgreSQL, MySQL, Redis, MongoDB, Elasticsearch, and RabbitMQ. Install a plugin and create a database with two commands. Linking a database to an app automatically sets the DATABASE_URL environment variable.

Can Dokku handle multiple apps on one server?+

Yes. Dokku routes traffic to different apps based on domain names using Nginx. A single server can host dozens of small applications. Each app runs in its own Docker container with isolated resources. Configure memory and CPU limits per app to prevent resource contention.

Does Dokku support zero-downtime deployments?+

Yes. Dokku performs zero-downtime deployments by default. It starts the new container, waits for health checks to pass, then switches traffic from the old container to the new one. If the new container fails health checks, the deployment is rolled back automatically.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets