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.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install ed054bbe-34d8-11f1-9bc6-00163e2b0d79 --target codex先 dry-run,确认写入项后再运行此命令。
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.
常见问题
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.
引用来源 (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…
讨论
相关资产
Piku — The Tiniest PaaS for Git-Push Deployments
Piku lets you deploy web apps to your own server with a simple git push, inspired by Dokku and Heroku. It runs on any Linux machine or Raspberry Pi with no containers or orchestrators required, using just SSH, Git hooks, and standard process managers like uwsgi and nginx.
Kubero — Self-Hosted PaaS for Kubernetes with Git Push Deployments
Deploy applications to Kubernetes with Heroku-style git push workflows. Kubero provides a web UI, automatic SSL, built-in CI/CD pipelines, and add-on marketplace without requiring deep Kubernetes expertise.
CapRover — Automated Docker Deployment PaaS with Web UI
CapRover is an open-source PaaS (Heroku on Steroids) with a beautiful web UI, one-click apps, automatic HTTPS, and Docker Swarm support. Deploy any app in seconds.
Dokploy — Self-Hosted Vercel and Heroku Alternative for Your Own Servers
Dokploy is an open-source deployment platform that brings PaaS-style developer experience to your own VPS. Deploy apps from Git with one click, manage databases, domains, and backups — all with a polished web UI.