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.
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.
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.
How to use
- Install Dokku on a fresh Ubuntu server with the bootstrap script. Point your domain's DNS to the server.
- Create an app:
dokku apps:create myapp. Add a Git remote:git remote add dokku dokku@server:myapp. - Push your code:
git push dokku main. Dokku detects the language, builds the container, and routes traffic to it.
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
Related on TokRepo
- AI tools for DevOps — Deployment and infrastructure tools
- AI tools for self-hosted — Self-hosted platform alternatives
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
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.
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.
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.
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.
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)
- Dokku GitHub Repository— Dokku is a Docker-powered PaaS with git push deployment and plugin ecosystem
- Dokku Deployment Documentation— Dokku supports Buildpacks, Dockerfiles, and Docker image deployments
- Dokku Zero-Downtime Documentation— Dokku performs zero-downtime deployments with health checks and automatic rollba…
Related on TokRepo
Discussion
Related Assets
Moodle — Open-Source Learning Management System
The most widely used open-source learning platform, providing course management, assessments, and collaboration tools for educators and organizations worldwide.
Sylius — Headless E-Commerce Framework on Symfony
An open-source headless e-commerce platform built on Symfony and API Platform, designed for developers who need a customizable and API-first commerce solution.
Akaunting — Free Self-Hosted Accounting Software
A free, open-source online accounting application built on Laravel for small businesses and freelancers to manage invoices, expenses, and financial reports.