Skip to content
yisusvii Blog
Go back

Dokku: The Smallest PaaS Implementation You'll Ever See

Suggest Changes

Before there was Coolify, before CapRover, before any of the modern self-hosted PaaS solutions — there was Dokku. Created in 2013, Dokku is a ~200-line Bash script that implements a Heroku-like workflow on a single server. It is the OG of self-hosted PaaS, and in 2026, it remains one of the most efficient ways to deploy web applications.

Dokku’s philosophy is simple: git push your code, and Dokku handles the rest.

Table of Contents

Open Table of Contents

What Is Dokku?

Dokku is a Docker-powered, open-source PaaS that implements the Heroku Buildpack specification. You deploy applications by pushing code via Git, and Dokku builds a container, configures Nginx as a reverse proxy, and manages SSL certificates — all automatically.

It is designed for a single server (unlike Docker Swarm-based tools) and embraces the Unix philosophy: do one thing well, and extend via plugins.

Official page: https://dokku.com

GitHub: https://github.com/dokku/dokku

Key Features

Getting Started — How to Install

Prerequisites

Installation

# Download and install Dokku
wget -NP . https://dokku.com/install/v0.35.x/bootstrap.sh
sudo DOKKU_TAG=v0.35.15 bash bootstrap.sh

Post-Installation Setup

# Set your domain
dokku domains:set-global yourdomain.com

# Add your SSH public key for Git access
cat ~/.ssh/id_rsa.pub | dokku ssh-keys:add admin

Install Essential Plugins

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

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

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

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

# MongoDB
dokku plugin:install https://github.com/dokku/dokku-mongo.git

Deploying Your First App

Step 1: Create the App on the Server

# SSH into your server
ssh root@yourdomain.com

# Create the app
dokku apps:create my-api

# Create and link a database
dokku postgres:create my-db
dokku postgres:link my-db my-api
# This sets DATABASE_URL automatically

Step 2: Push Your Code

# On your local machine
cd my-api

# Add Dokku as a remote
git remote add dokku dokku@yourdomain.com:my-api

# Deploy
git push dokku main

That is it. Dokku detects your language (via Buildpack), builds the container, starts it, and configures Nginx to route traffic to it.

Step 3: Enable SSL

# On the server
dokku letsencrypt:enable my-api
dokku letsencrypt:cron-job --add  # Auto-renew

Step 4: Set Environment Variables

dokku config:set my-api JWT_SECRET=your-secret REDIS_URL=redis://...

Example: Procfile for Multiple Processes

web: node server.js
worker: node worker.js
clock: node scheduler.js

Dokku runs each process type as a separate container:

# Scale processes
dokku ps:scale my-api web=2 worker=1 clock=1

Adoption Level (2025–2026)

Dokku is the longest-running open-source PaaS and has a dedicated, loyal community:

MetricValue (as of early 2026)
GitHub Stars~29,000+
First release2013
Age13 years
Plugins100+ (official + community)
Buildpack supportAll Heroku buildpacks
Active maintenanceYes (regular releases)

Why Dokku endures after 13 years:

Where Dokku falls short:

Best Examples for Implementing

1. Node.js API with PostgreSQL

# Server-side
dokku apps:create my-api
dokku postgres:create my-db
dokku postgres:link my-db my-api
dokku config:set my-api NODE_ENV=production
dokku letsencrypt:enable my-api

# Local
git push dokku main

2. Python Django App

# Procfile
web: gunicorn myproject.wsgi --bind 0.0.0.0:$PORT

# requirements.txt
Django==5.0
gunicorn==22.0
psycopg2-binary==2.9
dokku apps:create django-app
dokku postgres:create django-db
dokku postgres:link django-db django-app
dokku config:set django-app DJANGO_SETTINGS_MODULE=myproject.settings.production
git push dokku main
dokku run django-app python manage.py migrate

3. Ruby on Rails Application

# Procfile
web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq
dokku apps:create rails-app
dokku postgres:create rails-db
dokku redis:create rails-redis
dokku postgres:link rails-db rails-app
dokku redis:link rails-redis rails-app
git push dokku main
dokku run rails-app bundle exec rake db:migrate

4. Static Site (React / Vue / Astro)

# Use the heroku/heroku-buildpack-static
dokku apps:create my-site
dokku buildpacks:set my-site https://github.com/dokku/heroku-buildpack-nginx.git
git push dokku main

5. Multiple Apps on One Server

# Each app gets its own subdomain
dokku apps:create api          # api.yourdomain.com
dokku apps:create dashboard    # dashboard.yourdomain.com
dokku apps:create blog         # blog.yourdomain.com
dokku apps:create admin        # admin.yourdomain.com

# They all share the same server but are isolated in containers

Cost Analysis

Dokku is completely free — open-source with no premium tiers.

Server Costs

Provider1 vCPU / 1 GB2 vCPU / 2 GB2 vCPU / 4 GB
Hetzner€3.50/month€4.00/month€4.50/month
DigitalOcean$6/month$12/month$12/month
Vultr$5/month$10/month$12/month
Linode$5/month$10/month$12/month

Real-World Estimate for a Startup

A basic stack on the cheapest possible server (Hetzner CX22, 2 vCPU / 4 GB):

Total: ~$6/month — the cheapest complete deployment option available.

Dokku’s Cost Efficiency Compared

PlatformTypical Monthly Cost (API + DB + Redis)
Dokku (Hetzner)~$5–10
CapRover (Hetzner)~$5–10
Coolify (Hetzner)~$5–10
Railway~$20–30
Render~$28
Fly.io~$10–20
Heroku~$50+

Dokku vs. Coolify vs. CapRover

FeatureDokkuCoolifyCapRover
Web UI❌ CLI only✅ Modern✅ Functional
Clustering❌ Single server✅ Multi-server✅ Docker Swarm
Heroku compat✅ Full⚠️ Partial⚠️ Partial
Resource usageUltra-lowMediumLow
One-click appsVia plugins✅ Built-in✅ 100+
Learning curveCLI knowledge neededLowLow
Maturity13 years3 years8 years

Verdict

Dokku is the ultimate minimalist’s deployment tool. If you are comfortable with the terminal and want the most efficient way to deploy web apps on a single server, Dokku is unbeatable. It has survived 13 years of PaaS evolution because its core workflow — git push dokku main — is simply the best developer experience for single-server deployments.

TL;DR: Dokku is the command-line purist’s dream PaaS. Zero UI, zero fluff — just git push and your app is live. If you want maximum efficiency with minimum overhead, Dokku is the way.


Follow my blog for more reviews of modern deployment platforms for startups.


Suggest Changes
Share this post on:

Previous Post
Kamal: Deploy Web Apps Anywhere with Zero Downtime
Next Post
CapRover: The Free, Self-Hosted PaaS with a Proven Track Record