Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsApr 10, 2026·3 min de lectura

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.

Introducción

Dokku is the smallest PaaS implementation you've ever seen. Powered by Docker, it provides a Heroku-like experience on your own server — git push deployment, automatic HTTPS via Let's Encrypt, buildpack and Dockerfile support, and a rich plugin ecosystem for databases, caching, and more.

With 31.9K+ GitHub stars and MIT license, Dokku is the most popular self-hosted PaaS, perfect for indie developers, small teams, and anyone who wants Heroku simplicity without Heroku pricing.

What Dokku Does

  • Git Push Deploy: Push code, Dokku builds and deploys automatically
  • Buildpacks: Auto-detect language and build (Node.js, Python, Ruby, Go, PHP, Java, etc.)
  • Dockerfile: Deploy any Dockerfile-based application
  • Docker Image: Deploy pre-built Docker images directly
  • Automatic HTTPS: Let's Encrypt certificates provisioned and renewed automatically
  • Zero Downtime: Zero-downtime deploys with health checks
  • Scaling: Scale app processes horizontally
  • Plugins: PostgreSQL, MySQL, Redis, MongoDB, RabbitMQ, and 100+ community plugins
  • Domains: Custom domain management with automatic routing
  • Environment Variables: Secure config management

Architecture

Developer
    │
    │ git push dokku main
    │
┌───┴───────────────────────────────────┐
│  Dokku Server                         │
│  ┌─────────┐  ┌────────────────────┐  │
│  │ Git     │──│ Builder            │  │
│  │ Receive │  │ (Buildpack/Docker) │  │
│  └─────────┘  └────────┬───────────┘  │
│                         │              │
│  ┌──────────────────────┴───────────┐ │
│  │  Docker Container (your app)     │ │
│  └──────────────────────────────────┘ │
│  ┌──────────────────────────────────┐ │
│  │  Nginx (reverse proxy + SSL)    │ │
│  └──────────────────────────────────┘ │
└───────────────────────────────────────┘

Getting Started

1. Install Dokku

# On a fresh Ubuntu 22.04+ server
wget -NP . https://dokku.com/install/v0.34.8/bootstrap.sh
sudo DOKKU_TAG=v0.34.8 bash bootstrap.sh

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

# Add your SSH key
echo "your-public-key" | dokku ssh-keys:add admin

2. Create App

dokku apps:create my-node-app

3. Add Database

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

# Create database and link to app
dokku postgres:create my-db
dokku postgres:link my-db my-node-app
# DATABASE_URL is automatically set in app environment

4. Deploy

# On your local machine
git remote add dokku dokku@your-server.com:my-node-app
git push dokku main

5. Enable HTTPS

dokku letsencrypt:enable my-node-app
# Auto-renews via cron

Common Commands

# App management
dokku apps:list                          # List all apps
dokku apps:create my-app                 # Create app
dokku apps:destroy my-app                # Delete app

# Configuration
dokku config:set my-app KEY=value        # Set env var
dokku config:show my-app                 # Show all env vars

# Domains & SSL
dokku domains:add my-app example.com     # Add custom domain
dokku letsencrypt:enable my-app          # Enable HTTPS

# Scaling
dokku ps:scale my-app web=3 worker=2     # Scale processes

# Databases (plugins)
dokku postgres:create db1                # Create PostgreSQL
dokku redis:create cache1                # Create Redis
dokku postgres:link db1 my-app           # Link to app

# Logs & debugging
dokku logs my-app -t                     # Tail logs
dokku enter my-app web                   # Shell into container
dokku run my-app npm run migrate         # Run one-off command

Supported Languages

Language Detection Build Method
Node.js package.json Buildpack
Python requirements.txt / Pipfile Buildpack
Ruby Gemfile Buildpack
Go go.mod Buildpack
PHP composer.json Buildpack
Java pom.xml / build.gradle Buildpack
Static index.html Buildpack (nginx)
Any Dockerfile Docker build

Dokku vs Alternatives

Feature Dokku Heroku CapRover Coolify
Open Source Yes (MIT) No Yes Yes
Git push deploy Yes Yes Yes Yes
Auto HTTPS Let's Encrypt Built-in Let's Encrypt Let's Encrypt
Buildpacks Heroku compatible Native Dockerfile Nixpacks
Database plugins Official Add-ons One-click apps One-click
Multi-server Via plugins Built-in Docker Swarm Yes
Pricing Free (VPS cost) $5+/dyno/mo Free (VPS cost) Free (VPS cost)
Best for Single server SaaS Web UI fans Modern UI fans

FAQ

Q: Should I pick Dokku or CapRover? A: Dokku is closer to the Heroku experience, CLI-first with a mature buildpack ecosystem. CapRover has a nice web UI and suits users who prefer avoiding the command line. Feature-wise they're comparable — it's personal preference.

Q: How many apps can one server run? A: It depends on per-app resource usage. A 4 GB RAM VPS typically runs 5–10 small Node.js/Python web apps plus their databases. Set memory limits on each app.

Q: Does it support multi-server clusters? A: Dokku defaults to a single-server architecture. The dokku-scheduler-k3s plugin extends it to a K3s cluster. For multi-server needs, Coolify or CapRover are also worth considering.

Sources & Credits

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados