Dokku
A self-hosted Platform-as-a-Service that works like a private Heroku. You install it on any VPS, then deploy applications via Git. Handles routing, SSL certificates, and add-on services (databases, caches) with zero configuration. Perfect for developers who want Heroku's workflow without the vendor lock-in
yaml
docker-compose.yml
services:
dokku:
image: dokku/dokku:0.37.10
container_name: dokku
network_mode: bridge
ports:
- "3022:22"
- "8080:80"
- "8443:443"
volumes:
- /var/lib/dokku:/mnt/dokku
- /var/run/docker.sock:/var/run/docker.sock
environment:
DOKKU_HOSTNAME: ${DOKKU_HOSTNAME:-dokku.me}
DOKKU_HOST_ROOT: ${DOKKU_HOST_ROOT:-/var/lib/dokku/home/dokku}
DOKKU_LIB_HOST_ROOT: ${DOKKU_LIB_HOST_ROOT:-/var/lib/dokku/var/lib/dokku}
DOKKU_PLUGIN_LIST: ${DOKKU_PLUGIN_LIST:-}
restart: unless-stopped
volumes:
dokku-data:
driver: local
networks:
default:
driver: bridge
.ENV
.env example
# ─── Dokku Core ──────────────────────────────────────────────────────────────
# Hostname for your Dokku instance (change to your domain)
DOKKU_HOSTNAME=dokku.example.com
# Where app repositories and configs are stored on the host
DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku
# Where plugin data is stored on the host
DOKKU_LIB_HOST_ROOT=/var/lib/dokku/var/lib/dokku
# ─── Optional: Plugin List ───────────────────────────────────────────────────
# Auto-install plugins on boot. Format: plugin_name: repository_url
# DOKKU_PLUGIN_LIST=postgres: https://github.com/dokku/dokku-postgres.git
# DOKKU_PLUGIN_LIST=redis: https://github.com/dokku/dokku-redis.git
# DOKKU_PLUGIN_LIST=letsencrypt: https://github.com/dokku/dokku-letsencrypt.git
deployment
Quick Start
- Create a working directory named after the service.
- Copy the compose file and generated `.env` into that directory.
- Review the variables and replace placeholders with real values.
- Run `docker compose up -d`.
mkdir dokku
cd dokku
# create docker-compose.yml
# create .env
docker compose up -d