· Cloud Native Prague #9 · online

Save $$$ with Dokku

A lightning talk about the smallest PaaS you’ve ever seen. What Dokku is, when it’s all you need, and a real bill from a startup that paid for scale it never used.

Update, 2026Dokku is alive and well, but the GitLab CI setup below is the old way. Dokku now ships its own image for this, dokku/ci-docker-image, and the official GitLab CI docs use it instead of ilyasemenov/gitlab-ci-git-push.

What Dokku is

Dokku calls itself the smallest PaaS implementation you’ve ever seen. A PaaS, platform as a service, is the thing where you push code and the platform builds it, runs it and puts it on a URL. Dokku does that on your own server, with Docker underneath.

It works very much like Heroku: you git push to it and your app gets deployed. The difference is that it’s open source and you run it yourself, on a server you pay a flat price for.

Why I love Dokku

Deploying from CI is just another git push. This is the GitLab CI config I used, one job for production from master and one for staging:

deploy:production:
    image: ilyasemenov/gitlab-ci-git-push
    stage: deploy
    environment:
        name: production
        url: https://easy.entry.do/
    script:
        - git-push dokku@apps.entry.do:dq
    only:
        - master

deploy:staging:
    image: ilyasemenov/gitlab-ci-git-push
    stage: deploy
    environment:
        name: staging
        url: https://easy.entrydo-dev.com/
    script:
        - git-push dokku@apps.entry.do:dq-dev

The part after the colon, dq or dq-dev, is the name of the Dokku app. Two apps on the same server, two environments.

What it’s perfect for

That’s more than it sounds like. One server from the talk was running all of this at once:

The htop screenshot on the slide shows 4 CPU cores mostly idle, a load average of 0.10, 3.7 GB of 7.8 GB RAM in use, and 39 days of uptime.

A real example of wasting money

At Entrydo in 2018 and 2019 we ran 12 Node apps, one PHP app, one RabbitMQ server with 10 consumers, and one MariaDB server. Traffic was somewhere between 100 and 100,000 requests a day.

Startups live by “scale fast or die”, so we paid for hosting that was ready to grow. This is what it cost from September 2018 to October 2019:

Monthly invoices from September 2018 to October 2019: between $296 and $374 a month until July 2019, then $221, $205 and $28, adding up to $3,960.44.
Fourteen months of hosting invoices: $3,960.44 in total.

Most months were around $300. On a Dokku server at $40 a month, the same 13 months would have cost $520. The difference: $3,440.

All 17 slides
  1. Slide 1: Title: Save $$$ with Dokku, Cloud Native Prague e-meetup #9, 23 March 2020
  2. Slide 2: Today: what is Dokku, when to use it, a real-world $$$ wasting example
  3. Slide 3: Dokku: the smallest PaaS implementation you've ever seen
  4. Slide 4: The Docker whale logo
  5. Slide 5: Very much like Heroku, but open source: github.com/dokku/dokku
  6. Slide 6: Why I love Dokku: zero-downtime deploys, process scaling, log management, networking, community, buildpacks
  7. Slide 7: GitLab CI config deploying production and staging with git-push to Dokku
  8. Slide 8: Perfect for side and hobby projects, startups, anything under 200,000 requests a day
  9. Slide 9: One server: 40 Dokku apps, 4 MariaDB, 2 RabbitMQ servers, 30 consumers, a GitLab CI runner
  10. Slide 10: A SpaceX rocket launch
  11. Slide 11: Empty wallet
  12. Slide 12: Entrydo in 2018/19: 12 Node apps, 1 PHP app, RabbitMQ with 10 consumers, MariaDB, 100 to 100,000 requests a day
  13. Slide 13: Scale fast or die
  14. Slide 14: Hosting invoices September 2018 to October 2019, total $3,960.44
  15. Slide 15: The same months at $40 each: $520, difference $3,440
  16. Slide 16: A woman surrounded by dollar bills
  17. Slide 17: Thank you! Questions?

Related talks