11 ms·
Dokku – Free Heroku Alternative
- vanilla 4y agoWe have been using it for our internal dev and test environment. I was very disappointed that it did not have tcp/udp proxy support. Fortunately the plug-in system allowed us to extend this functionality in a day. Dokku is very nice for this use-case. No need to have a complicated kubernetes setup.
- sameOld88 4y ago> No need to have a complicated kubernetes setup. I’ll never understand why one stacks config syntax and semantics is seen as complicated while another stack of gigs and gigs of state is not. A Linux host that pulls down a web server via its package manager is gigs of special state too. Where’s the simplicity? It’s no less complicated, maybe more familiar. There’s way too much romantic and poetic day dreaming about what it is we do in IT.
- sureglymop 4y agoYou're right. But it is a little harder to get kubernetes up and running with a load balancer and your own domain. Obviously not for people who are already familiar with it..
- VWWHFSfQ 4y agoDid they ever figure out the scaling problem or is it still just "one web dyno and that's it"?
- freen 4y agoYou can put dokku in front of different schedulers, kubernetes being one of them.
- bigfudge 4y agoIt’s still single machine l, but afaik you can run multiple dynos, and can certainly let run multiple apps and separate web/worker dynos.
- sscarduzio 4y agoAny pointers to documentation on this topic?
- bigfudge 4y agohttps://dokku.com/docs/processes/process-management/ https://dokku.com/docs/processes/process-management/
- chasd00 4y agoCan’t you just put a load balancer in front of N vps running dokku? Although, I haven’t done infrastructure since before docker was invented so a little behind the times.
- josegonzalez 4y agoDokku maintainer here: There are both Kubernetes[1] and Nomad[2] plugins. I'm also building schedulers for AWS Lambda, Compose (which I guess also sorta provides Azure ACI and AWS ECS support), and Swarm. You can also scale individual process types (so anything in your Procfile) via our `ps` plugin[3]. All plugins should support this, so you don't need to learn a new set of commands for alternative schedulers. - [1] Kubernetes Scheduler Plugin: https://github.com/dokku/dokku-scheduler-kubernetes https://github.com/dokku/dokku-scheduler-kubernetes - [2] NomadScheduler Plugin: https://github.com/dokku/dokku-scheduler-nomad https://github.com/dokku/dokku-scheduler-nomad - [3] Process Management: https://dokku.com/docs/processes/process-management/ https://dokku.com/docs/processes/process-management/
- VWWHFSfQ 4y agoThank you! This is great
- AndrewOMartin 4y agoI came to the comments first to answer "what's the catch?". There were no comments at the time so I went to the website. This line near the top seems particularly fair and believable. > Own your own PAAS. Infrastructure at a fraction of the cost. Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.
- viraptor 4y agoI've used it on and off. It's ok and I was happy. But it's a fairly thin layer and a leaky abstraction, so I ended up looking at docker logs and firewall rules more times than needed. Unfortunately when things were down, noting the context was not a priority, so I don't have specific issues raised to show.
- josegonzalez 4y agoDokku Maintainer here: While in some cases it is a quite thin layer - some commands just proxy along to the underlying Docker command + some flags - I'd love to hear more about places where Dokku itself wasn't useful for debugging your deployed system. Please feel more than free to reach out via Discord/IRC/Slack[1] (all three are synced) with more info if filing an issue is a big reach. I'm more than happy to help folks debug live/file issues as a result, as it makes the project much better. [1] https://dokku.com/docs/getting-started/where-to-get-help/ https://dokku.com/docs/getting-started/where-to-get-help/
- mdasen 4y agoFor me, one of the big catches is that you have a single point of failure. Dokku doesn't run over multiple VMs you have. It's on a VM. If that VM goes down, you're down. I think one of the selling points of Heroku is that if the box you're running on goes down, your service will just be started on another box and traffic will be routed there and you don't need to do anything.
- jeremyjh 4y ago
- Gys 4y agoYes, I love Dokku and like to use it as an alternative for some of my Heroku apps. However, the thing I miss most is Heroku including a nice dashboard showing several metrics for my Golang apps (memory usage, go-routines, etc) over time. Heroku has that out of the box and that makes it very convenient.
- sureglymop 4y agoI just deployed netdata also in Dokku.
- claudiug 4y agohow difficult will be to build a basic tool for this case?
- viraptor 4y agoNot connected to dokku, but you can construct this from: telegraf - report the host / process metrics opentracing - instrument the application itself with tracing, with some pre-built libs like https://github.com/opentracing-contrib/go-stdlib https://github.com/opentracing-contrib/go-stdlib tempo - collect the traces Loki - collect the logs influxdb - collect the metrics grafana - display it all It's not too hard once you set it up... but as you see there's a lot of elements to it.
- yebyen 4y agoCongratulations, you all just suggested re-inventing Deis workflow (with a few additional pieces) :) There are a lot of elements indeed, https://docs.teamhephy.com/understanding-workflow/components/ https://docs.teamhephy.com/understanding-workflow/components... This is classic literature: https://docs.teamhephy.com/understanding-workflow/architecture/ https://docs.teamhephy.com/understanding-workflow/architectu... It is much easier to just use it than to try and re-invent your own: https://docs.teamhephy.com/quickstart/ https://docs.teamhephy.com/quickstart/ I cannot guarantee the cloud provider bits all work, I don't use them so I don't maintain them, but if you have Kubernetes with persistent disk provided, which any managed Kubernetes can most certainly do, it's easy enough to hook up generic Minio (which has the added benefit of working just as well on bare metal hosts), and I'm certain that does work as I use it.
- emehex 4y agoI’ve been running https://scrape.world https://scrape.world on dokku + DigitalOcean for two years, zero issues!
- block_dagger 4y agoI’ve run high-ish traffic production sites on Dokku for years. If you need just one server, it’s a dream for Rails/PG/Redis setup. Amazing what reliability it provides. Almost completely written in bash!
- juanse 4y agoCould you share more, please? I use the very same stack and I think with the biggest VPS available right now I will have more than enough. It is basically a simple CRUD application. Could you share how big the VPS yo used is (cores/Ram) and what traffic you got to manage with that? Thanks.
- your_username 4y ago
- chasd00 4y agoNot the parent but to me dokku shines when putting multiple apps on a single server and the fact that deploying is a git push. Letsencrypt and other plugins are icing on the cake. If you have one app then dedicate a server to it and run it right on the operating system. Maybe have 2 and a load balancer so you can do prod deployments with no downtime. The point is get dokku, docker, and all that abstraction between the network card and your app out of the way.
- RileyJames 4y agoAwesome. I’ve always worried what it can handle, and therefore only run projects on it until they were more serious. But in that context, I’ve never had a problem (and run them longer than that anyway). To around the 50-100k user per month. Mostly reads tho. Keen to hear what you’re running.
- bullen 4y agoThe smallest PaaS you have ever seen is one order of magnitude larger than mine: https://github.com/tinspin/rupy https://github.com/tinspin/rupy And I bet you the same goes for performance, mine can share data between cores atomically.
- yebyen 4y agoThere's also Deis Workflow (Hephy Workflow) https://web.teamhephy.com https://web.teamhephy.com For those worried about a Single Point of Failure, you can't have your cake and eat it too. Docker and Dokku is a single point of failure when you build directly on it, I guess. Kubernetes mitigates that. We're still here, keeping the tires on. I haven't personally tested K8s 1.24 with Workflow yet, but we are actively seeking maintainers on all of the cloud vendors. If you find that something is broken and want to see it fixed, talk to me on Slack. I'm aware of at least Azure that has broken their Bucket Storage API since Workflow was originally published by Deis, and it hasn't been quite fixed yet. Documented support for Google Cloud and AWS are both extant as well, although I've heard one person call into question whether Google Cloud storage will work out of the box, or if it still needs upgrades. We'd like to add DigitalOcean support as well, I already know it basically works, we just need to add documentation and probably also give it a quick spit-shine and polish. Dokku on the other hand is less heavyweight and does not require as much work for maintenance, since it does not have to be decentralized or protect against any SPOF. It's a wonder that more people do not want to use this. I've heard of at least one more Deis Workflow fork in the wild, possibly in better or worse states of maintenance than Team Hephy, but if you are looking to get off of Heroku then you could certainly do much worse. We do need volunteers as we do not have time to maintain everything by ourselves, (come talk to us on the Slack if you're interested in joining the fun!)
- You-Are-Right 4y ago404 on docs: monitoring and auto failover might be something you should look into.
- yebyen 4y agoThank you. The docs all work, but some paths through the docs do not work on certain form factors (I think this is a mobile issue) Well, the docs did work, (they're 100% down now...)
- RileyJames 4y agoBeen using it a year or so now. As my B server. $40~ on DO, that I ram all my side projects onto. From a dev perspective, it’s been awesome. I have zero monitoring on it, so I have no idea if users love it. But analytics look good. Either way. Impressed. And appreciate all the efforts behind the project. Edit: Rails, pg, sidekiq, etc.
- greysonp 4y agoCan't recommend Dokku enough. I've been using it for years on a $20 DigitalOcean box. I have a lot of random web projects/tools, most of which I'm the only user, and it's great to have a super simple way to get them online. Enabling HTTPS and assigning a domain are each just a single command.
- thebiglebrewski 4y agolol are you me?! exactly the same setup over here
- zwarag 4y agoHow does it differ from portainer?
- wilsonfiifi 4y agoPortainer is more of a UI for docker and docker containers. But dokku is and actual platform similar to heroku that helps you deploy your apps.
- dopamean 4y agoLast I used dokku my understanding was that it used Heroku's open source build packs. So it was very much your own hosted heroku. This was at least 7 years ago though.
- Nextgrid 4y agoThat's correct and it is still the case.
- josegonzalez 4y agoDokku maintainer here: Dokku supports a number of methods to deploy apps: - Docker images [1]: via `git:from-image` - Tarballs [2] (extracting into a heroku-like env): via `git:from-archive` - Dockerfile [3]: autodetected using our builder-dockerfile plugin (or selectable via builder:set) - Heroku Buildpacks [4]: autodetected using our builder-herokuish plugin (or selectable via builder:set) - Cloud Native Buildpacks [5]: autodetected using our builder-nix plugin (or selectable via builder:set) Someone in the community hated these options and wrote one for nix[6]. Others are free to do so as well (or even customize our built-in ones through settings or forks). Finally, I've also got two builders in the works: - lambda: builds a lambda-compatible docker image (and an optional zipball of the code in case you want to deploy that on their official runtimes) - compose: builds using docker-compose (for usage with a compose scheduler) Dokku has been built with extensibility in mind, so if it doesn't do what you think it should do out of the box, overriding that functionality is fairly straightforward (plugins can be in any language, so feel free to drop golang/shell and use something else if that floats your boat). - [1] Build from a docker image: https://dokku.com/docs/deployment/methods/git/#initializing-an-app-repository-from-a-docker-image - [2] Build from a tarball or zipball: https://dokku.com/docs/deployment/methods/git/#initializing-an-app-repository-from-an-archive-file - [3] Dockerfile support: https://dokku.com/docs/deployment/builders/dockerfiles/ - [4] Heroku buildpack support: https://dokku.com/docs/deployment/builders/herokuish-buildpacks/ - [5] Cloud Native Buildpacks support: https://dokku.com/docs/deployment/builders/cloud-native-buildpacks/ - [6] Build via nix-build: https://github.com/jameysharp/dokku-builder-nix
- nasmorn 4y agoI have used it quite a bit. What I hate about it is that it runs on my single machine and the underlying system updates feel a bit dangerous to do. Also at one point it would endlessly crash after adding another worker to a project and there is no way to debug it easily. I moved almost all the projects to DO Kubernetes now. I had written my own dockerfiles anyways since it means faster deploys. The fact that deployment goes through CI is more of a bonus. The Setup is more involved though
- josegonzalez 4y agoDokku maintainer here: Docker updates are usually the stressful ones, not Dokku (I try to call out all deprecations/changes in our Migration guides[1]). You can turn on Docker live-restore[1] to make Docker upgrades safer. I'd imagine the reason you have crashes is due to not having enough system resources (usually memory) to run your workloads. There isn't too much Dokku can do about that, though I would have loved to see a ticket or something on our chat venues to help debug. Dokku also supports kubernetes[3] if you still want the Dokku experience, and you can deploy images built in CI[4]. Glad to hear you have a setup that works for you though :) [1] Upgrading Dokku through different versions: https://dokku.com/docs/getting-started/upgrading/#migration-guides https://dokku.com/docs/getting-started/upgrading/#migration-... [2] Docker live-restore: https://docs.docker.com/config/containers/live-restore/ https://docs.docker.com/config/containers/live-restore/ [3] Kubernetes scheduler plugin: https://github.com/dokku/dokku-scheduler-kubernetes https://github.com/dokku/dokku-scheduler-kubernetes [4] Build from a docker image: https://dokku.com/docs/deployment/methods/git/#initializing-an-app-repository-from-a-docker-image https://dokku.com/docs/deployment/methods/git/#initializing-...
- juanse 4y agoI think with moderns and dedicated VPsS this can work for a very long way. Hetzner offers 48 dedicated vcores/192 GB RAM in a single machine for less than 500€/month. I can totally see many business working for years within these boundaries. Also, not every company need Google-grade high availability.
- pixelmonkey 4y agoAlso check out piku, especially if you are hosting Python or Node apps: https://github.com/piku/webapp-tutorial/blob/master/README.md https://github.com/piku/webapp-tutorial/blob/master/README.m... It is a way to get the same sort of developer experience benefit as dokku, but without dockers and containers, using plain UNIXy tools on a single Linux node. The above link explains how it works.
- dgb23 4y agoWhen it says free heroku alternative that runs on a single host/vps, then I assume the file system stays durable (as opposed to ephemeral). Is that correct?
- dzogchen 4y agoYes that is correct. You can mount directories like normal Docker.
- joshstrange 4y agoDokku is nice and I used it for a while but recently I've been using CapRover [0] and been pretty happy with it. I only use it on 1 host but it supports multiple. It also has 1-click installs for the usual suspects (drupal/wordpress/etc) and things like spinning up a DB is easy. You can also define a docker file in your repo that you instruct it to build and use. HTTPS is a button click and it automatically sets up virtual hosts for you `<your app name>.<base url you configured>`. It's great for quick prototyping and to get a personal project online. [0] https://caprover.com/ https://caprover.com/
- sbecker 4y agoCaprover is nice and convenient but security wise, only a single password field is required on the admin console. (See demo here: https://captain.server.demo.caprover.com/#/login https://captain.server.demo.caprover.com/#/login) Given this it would be nice to at least make the web admin console only accessible via an IP whitelist, but last time I used it I did not find an easy way to do that.
- indigodaddy 4y agoCan you not firewall the relevant admin webui port?
- wilsonfiifi 4y agoThe admin webui runs on the captain sub-domain so i'm not too sure if that can be firewalled.
- indigodaddy 4y agoHow does any of that matter? Firewall the relevant port so that it only allows your connecting IP.
- paulgb 4y agoI haven’t used it but it appears to serve everything over the same port. You could block it with a reverse proxy but not with a firewall or layer 4 proxy.
- wilsonfiifi 4y agoDokku is an excellent Heroku alternative. If you have the means, please support the project by paying for Dokku Pro [0] [0] https://pro.dokku.com/ https://pro.dokku.com/
- chasd00 4y agoI didn’t know this existed (probably because my dokku setip had been running for years and I haven’t been back to the website). I will be throwing some bread your way:)
- chasd00 4y agoI’ve been dokku for a long time. I think before there were any plugins. Works just fine for me, but I’m not doing anything out of the ordinary. I run all my hobby and side projects with it on linode.
- pvsukale3 4y agoSelf plug. Some other open source/ proprietary projects like Heroku https://ossdatabase.com/projects/heroku https://ossdatabase.com/projects/heroku
- evoxmusic 4y agoDoes dokku supports preview environments like Qovery?
- cfu28 4y agoNot familiar with Qovery, but yes you can create preview envs. They’re called “review apps” for Dokku and it’s super neat. It ties in really nicely with GitHub actions so you can spawn and tear down preview environments with each pull request: https://github.com/dokku/github-action/blob/master/example-workflows/review-app.yml https://github.com/dokku/github-action/blob/master/example-w....
- josegonzalez 4y agoYeah you can use preview/review apps via the `apps:clone` command[1]. It can be used in a pipeline to setup custom apps for code branches, allowing folks to stand up custom versions in CI for merge/pull requests[2]. If your deployment platform doesn't support this in some way, I would definitely recommend investigating it, as there is a _ton_ of stuff you can do with this. - [1] Cloning existing apps: https://dokku.com/docs/deployment/application-management/#cloning-an-existing-app - [2] Github actions review app support: https://github.com/dokku/github-action/blob/master/example-workflows/review-app.yml
- tomatowurst 4y agoIs there proper tutorial for people who have never used heroku? I just don't know how to use this because i dont have any experience with heroku. I'm interesting in self-hosted AWS api compatible solutions. Parse is also interesting. In fact I discovered that there is a whole new world outside AWS and DO. It no longer makes sense for me to run weekend projects on AWS outright, thats really for large enterprise applications. What I would love is to be able to deploy my docker images on my "own"cloud running on a dozen droplets/VPS around the world and bill my users at the same rate that AWS is charging. I figure I would be able to undercut AWS significantly with this method. Storing 2TB on AWS was price shock for me, makes no sense when there are dedicated servers with a ton of storage and bandwidth that I could just use instead of being "serverless". However, I find it to be a hall of mirrors, wondering if anybody on HN has been in my shoes and how they are handling it. I guess my biggest concerns: - uptime availability (can I promise close to AWS?) - security (how do i harden my box/selfcloud and have peace of mind?) - IAM type of roles/permissions (how do i emulate something like IAM for my team?) Like the billing from AWS is getting to a point where I feel like we can use bunch of droplets behind some "selfcloud" that manages all these things for me. I'm sure a solution exists, I just often have trouble recalling their names. Dokku makes it easy to remember because it sorta rhymes with Heroku.
- nickstinemates 4y agoJust use railway.app - free tier just works and you can deploy a sample app on a free account in seconds. It will give you a general idea of how Heroku works. > It no longer makes sense for me to run weekend projects on AWS outright, thats really for large enterprise applications. depending on the type of site, cf workers is ridiculous value. single button availability of your content in every corner of the world and you wont pay a dime
- tomatowurst 4y agonot sure I quite understand railway, what are they offering? Another AWS on Digitalocean? Would be nice to see exactly what the cpu core/memory/price is. aren't cf workers very constrained? like your call has to finish within a second or two for it to make sense and I think AWS Lambda matched their price? I could be confused here.
- nanope 4y agoWhy would I use this over say minikube + ingress or just plain Docker + Caddy?
- josegonzalez 4y agoDokku Maintainer here: You can certainly roll your own setup and get the minimal functionality _you_ need. Thats the general "build vs buy" question. Dokku itself comes with a ton of functionality and is actively developed separate from your app. It's been built for thoughtful extensibility (one person in this story mentioned adding TCP/UDP support in a day, as an example) so if it doesn't do what you want, you can add it. We also provide a "curated" experience that handles things based on years of working on other deployment tools (and not just simply cloning the Heroku CLI and experience, though it has had a very deep influence). If our workflow and experience are what you want, its there today. With something you build/maintain, the system is often simpler. Maybe one or two tools with a couple hundred lines of code, all fairly grokable. If you need to extend it, you know exactly where and can do so. In fact, thats how a lot of Dokku alternatives come out - someone didn't like our codebase or setup and decided to write something else[1]. Building your own deployment stack is often how most companies start - roll your own against tooling that is close-by or familiar. The unfortunate thing is you now own that experience, so if you need functionality, you need to build it, which can be distracting from your actual business goals (unless you're a deployment tooling company, in which case this totally makes sense!). Would you rather spend 10 hours working on a feature for your customers or hacking together a version of review apps? If this is for your own home cluster, maybe that makes sense, but even then, I'd assume most people _should_ just want to deploy their app and move on vs work on that tooling. All that said, if Minikube + Ingress and a few yaml templates work for you, go to town. Feel free to try us out if you want a more curated experience :) - [1] Piku is an example where they wanted ARM support and we didn't have it yet, while the Caprover developer wanted something that works with Swarm.
- mardix 4y agoSimilar to Heroku deploy flow, checkout Sailor, a tiny PaaS to install on your servers/VPS that uses git push to deploy micro-apps, micro-services, sites with SSL, on your own servers or VPS. https://github.com/mardix/sailor https://github.com/mardix/sailor
- skyfaller 4y agoI see it's a fork of piku, but I don't see an explanation of why they bothered to fork. Do you know what the difference is? https://github.com/piku/piku https://github.com/piku/piku
- thomasfedb 4y agoHave been using Dokku in (small scale) production for years and absolutely love it. Was also recently pleasantly surprised to see that Dokku supports ARM... so looking forward to trying it out on my RPi4 next week.
- squiffsquiff 4y agoThey're just begging for it to be called 'Dooku' when it breaks, aren't they?
- josegonzalez 4y agoDokku maintainer here: About 5-6 years ago I found out that "Dokku" means something like "crappy" in Telugu (I think). Lots of people seem to refer to it when talking about politics, theaters, and methods of transportation on twitter. It's also the name of some famous Korean actor's Dog (I think they got the name from a Naruto character named Dokku). The dog is fairly new, and lots of folks stanning particular actors or actresses on twitter use the word `dokku` in their username. Dokku Umarov was also a Chechen mujahid in both Chechen wars. References to him pop up every so often (he died in 2013, _just_ after the Dokku project started). IIRC the name "Dokku" is a portmanteau of `Docker` and `Heroku`. How you pronounce it is up to you, though it seems I pronounce it very differently from others (I use "dough" instead of "dah"). Finally, "Dooku" is not how it's spelled, though lots of people seem to refer to Count Dokku of Star Wars fame :D
- eric4smith 4y agoDokku is amazing. The single point of failure though, is something people worry too much about. If you are serious about what you host, you do need to have another host ready to go. Majority of workloads can be down for a few hours without customers worrying anyway. We actually use it for hosting quite large workloads, but we do have a few bar e metal hosts we manually provision different services across. At a moment's notice we can quickly push the app to a different server and would be down for a few tens of minutes at most, minutes normally. I just don't get the expense of Heroku just because your (in reality) non-essential workload can't be down for a few seconds.
- You-Are-Right 4y ago