18 ms·
Dokku: My favorite personal serverless platform
- simplecto 2y agoGreat writeup -- I have a gist floating around somewhere with a similar workflow, but for bitbucket pipelines. Good solve!
- calyhre 2y agoI really like Dokku. I recently wrote a plugin to automatically expose the apps I add on it on my local network as subdomains of the host via MDNS (https://github.com/calyhre/dokku-mdns https://github.com/calyhre/dokku-mdns), perfect for hobbyists
- josegonzalez 2y agoI love this! Did you add this to our plugins page by any chance? I can't recall and not at my personal laptop to check. Disclaimer: I am the Dokku maintainer.
- calyhre 2y agoIt is yes. Thanks for such a nice tool
- cynicalsecurity 2y agoSelf-hosted solutions are the way. No one will be stealing your data as the big corps do. Less chances to overrun your budget because of how cloud platforms conveniently have no breaks on utilisation of resources.
- renegade-otter 2y agoOr you can use something with straight-forward pricing, like Digital Ocean. I don't understand why AWS is default for everything. People need to snap out of that racket.
- johntash 2y agoDigital Ocean is even on the expensive side these days. There are a lot of vps providers that offer decent pricing and include bundled bandwidth. Some of the hosts may not be good for business-use, but should be fine for personal stuff.
- turtlebits 2y agoBecause provisioning/configuring/monitoring/scanning/patching/grooming servers sucks.. and people are lazy.
- dewey 2y ago> No one will be stealing your data as the big corps do. We take care of that ourselves by self-hosting and having faulty or unmonitored backups :)
- spankalee 2y agoI must have missed the incident where a major cloud provider was stealing their customers' data. Do you have a link?
- pelagicAustral 2y agoIMHO Dokku still outperforms all other open-source alternatives for deploying Rails apps. There are a few proprietary alternatives that still manage the job with far more simplicity, but those are paid... I have tried to deploy with Kamal, DHHs Junta preferred way, but is still not better than Dokku in it's management and simplicity, and top of that, if follows the framework's latest trend of poor-to-no documentation.
- andrewmutz 2y agoI've been loving Kamal in production. What problems did you run into?
- pelagicAustral 2y agoThe documentation is a major turn-off. I havent revisited the situation in a few months, maybe things have changed, but could not deploy a single app to my traditional cloud vm's... I never struggled that much with Dokku, that's why the comparison...
- wg0 2y agoRuby. Only if it were a self contained binary in go or (or zig) it could go places.
- sigmonsays 2y agoto be honest, i just heard and i'm thinking twice because of ruby. I really don't long for a gem breaking when i go to update my system. self contained binaries ftw.
- tdeck 2y agoYes, this is what's holding Ruby back from the broad adoption that Zig enjoys.
- benbristow 2y agoI've been enjoying using Dokploy recently. https://github.com/Dokploy/dokploy https://github.com/Dokploy/dokploy It's similar to Dokku but has a nice web UI, makes it easier to deploy Docker/Compose solutions and auto LetsEncrypt functionality is built-in by design (not as a separate plugin). I've also built a GitHub Actions workflow to trigger off a deploy to apps hosted on it (basic cURL command but works well). https://github.com/benbristow/dokploy-deploy-action https://github.com/benbristow/dokploy-deploy-action And put together some pre-configured Compose files you can deploy for various apps. https://github.com/benbristow/dokploy-compose-templates https://github.com/benbristow/dokploy-compose-templates
- _d6rd 2y agoNice. Why not use a github merge webhook for triggering deploys?
- benbristow 2y agoI have actions on my projects to build & publish container images to GitHub's container registry. The deploy trigger from the workflow makes Dokploy get the latest image from the registry and run it.
- turblety 2y agoThanks for the recommendation. I've just given it a try and it looks great. I had tried coolify.io before, but the multi node/swarm support wasn't great, and the registry didn't work. Dokploy seemed to work straight out of the box. One thing I wish it had to preview deployments though. Coolify had that. But I can live without it.
- enumjorge 2y agoApologies for the very off-topic reply, but I can't help but find it a little funny that on a thread exalting a particular tool, the top comment at the time of this writing is a link to another, newer tool. Not that there's anything wrong with sharing the link, but it does seem like here at HN we have a bit of a grass-is-greener thing going on. I would understand it more if the discussion was around how bad a tool is and someone chimed in with an alternative. And it's not like I don't want people to share these other projects but personally on a thread about a particular topic, the comments I find the most useful are those from people with experience in that topic sharing their opinions, tips, etc. In this case, the comment our community found the most valuable on the topic of Dokku seems to be a link to Dokploy, a project that judging by the commit history is new as of this past April.
- oezi 2y agoMy major gripe with dokku is that there is no way to define the configuration in a file rather than executing the commands manually. Otherwise: totally agree, great tool for self hosting.
- JonAtkinson 2y agoYou can configure almost everything using an app.json file. https://dokku.com/docs/deployment/deployment-tasks/ https://dokku.com/docs/deployment/deployment-tasks/
- dewey 2y agoI believe they are talking about the Dokku commands that are needed to set up a new Dokku app. For example for a static site that would be the following: dokku apps:create dewey.at dokku domains:set dewey.at dewey.at www.dewey.at dokku letsencrypt:enable dewey.at That's also one of my wishes to get improved, currently I just have a long text file where I store them so that if I move servers I can just re-run them if needed.
- mdasen 2y agoCould you put them in a .sh file and then just run `sh setup_dewey.sh`? Maybe put `&&` between them so that if one fails, it won't keep running through the script?
- dewey 2y agoYep, in theory I think that should work nicely. So the recovery procedure after a server died would be to restore the dokku data directory from backup and then re-run all the commands. I haven't tested that but I think that should do the job. Right now I keep the list of commands more as a reference to look up things like how I mounted a volume or my naming scheme for data directories.
- chuckadams 2y ago> Maybe put `&&` between them so that if one fails, it won't keep running through the script? Or just add `set -o errexit` at the top of the script. Or use make.
- andrewmutz 2y agoI've been using a different tool that provides great developer UX for managing containerized web apps on your own servers. Its dead simple and does things like zero-downtime deploys and remote builds. https://kamal-deploy.org/ https://kamal-deploy.org/ I use it with rails but it works with any containerized web apps.
- dewey 2y agoI've looked into this too, but it always felt like it's best suited for a "one app per server" model, and not really like Dokku which makes it easy to run many workloads on a single server. Did I misunderstand something there?
- tebbers 2y agoI’m pretty sure multiple apps is on their public roadmap, I’m sure I read it somewhere.
- rtcoms 2y agoRecently DHH posted on twitter that Kama v2 will have support for multiple apps on a server.
- andrewmutz 2y agoI've never tried the many-apps-per-server use case and I don't think it's supported. We use it in production where its more common to have many-servers-per-app.
- adriand 2y agoI’ve got two apps running on two servers (ie both on both) using Kamal and Traefik and it works great. I didn’t set it up but I deploy with it almost every day.
- nasir 2y agoI already run multiple apps on a single server with Kamal and it works fairly good. Sometimes there are some issues especially if you use similar resources across system such as redis. But overall it is stable and works good.
- hobo_mark 2y agoCan I not do all of these things with docker-compose already?
- dewey 2y agoNo. With Dokku you can just push to git remote and it'll build, deploy the image, set up LE certificates, roll out the app with zero downtime (if you want). To get this running you'd have to do some manual stuff with git commit hooks, but that's just one small part of Dokku.
- hobo_mark 2y agoI have gitlab-runner on my VPS, all it does is `docker compose up`, that already includes a traefik setup with LE certificates. Zero-downtime does sound interesting though, and is probably better than `traefik.http.middlewares.test-retry.retry`.
- justinsaccount 2y agodokku does a lot of things that docker-compose does not. One of the bigger ones is zero downtime deploys: https://dokku.com/docs/deployment/zero-downtime-deploys/ https://dokku.com/docs/deployment/zero-downtime-deploys/ This has the added benefit of warming up the app before traffic ever hits it, something I was always surprised that even heroku didn't do (at least, the last time I used it ~6 years ago)
- josegonzalez 2y agoI see compose in production all the time - especially from folks that want compose support _in_ Dokku. I bought this up with the compose project manager a few months back. It seems like an interesting use case but it didn't seem like the Docker folks were... aware that this was how folks used docker compose? There is a project out there - Wowu/docker-rollout - that sort of provides this but it has some rough edges. Disclaimer: I am the Dokku maintainer.
- 2y ago
- amelius 2y agoLet me guess ... it's called serverless but it still has a server somewhere in the equation?
- efilife 2y ago> Dokku is an open-source Platform as a Service (PaaS) that runs on a single server of your choice Lol
- johntash 2y agoThis is the part that gets me every time. It sounds pretty neat, but.. if it only works on one server - what's the point? What about things like scaling, or even just what if your one server runs out of resources to fit more apps on?
- 3np 2y agoYou can still solve for that just fine in a multi-Dokku setup. It's just that Dokku won't do the coordination for you. Sometimes you do want something more integrated like k8s/openshift/nomad instead; sometimes not.
- josegonzalez 2y agoDokku's multi-server offering is based on k3s. We interact with k3s but offload any actual clustering to k3s itself as it does the job better than Dokku could :) You can also just tie Dokku into an existing K8s cluster on your favorite cloud provider instead. Disclaimer: I am the Dokku maintainer.
- 3np 2y agoThis sounds like a great approach! Thank you for keeping it up and on!
- dewey 2y ago> What about things like scaling Premature optimization for 99% of people's projects. Once you run into "scaling" issues you can always run it on a more powerful server. Related: https://twitter.com/dhh/status/1827322640685506895 https://twitter.com/dhh/status/1827322640685506895
- paxys 2y agoLooks neat, but what exactly makes it "serverless"? It's literally an application that you have to run on your server. Edit: turns out (thankfully) that it's only the author of the article using that term. The project site (https://dokku.com/ https://dokku.com/) is very descriptive.
- efilife 2y agoSame question > Dokku is an open-source Platform as a Service (PaaS) that runs on a single server of your choice This is the first paragraph in the article
- stavros 2y agoWhat makes anything "serverless", when it has to run on a server?
- SushiHippie 2y agoI always understood "serverless" as, your main application isn't running all the time, but once you make a request to it, another process starts your main application and then your request gets forwarded to the "main" application. But I never really got it, so I may be completely wrong.
- stavros 2y agoPractically, it's always running, as otherwise you'll get a cold start delay, but that's close enough. It doesn't mean there's no server, so the "lol how is it serverless if you have a server" meme is tiring.
- paxys 2y agoKinda, but you are describing an implementation detail. More broadly, here's how it works: Infrastructure as a Service (IaaS) - you rent a VM with a publicly accessible IP address. Everything else – patching/updating the OS, deploying your application code or binaries, process lifecycle management, logs, TLS certs, load balancing multiple servers and more – is your responsibility. Example: EC2. Platform as a Service (PaaS) - the provider also manages the OS for your VM, including deploying and running your code on it, restarts, a logging pipeline, providing a HTTPS URL, scaling to multiple servers and more. All you have to do is write your application code to start a web server and listen for web requests on a particular port. Example: Heroku. Functions as a Service (FaaS) - this goes one step further, and the concepts of web servers, ports and HTTP requests/responses are also abstracted out from your application code (hence "serverless"). You write a function with a set of inputs and outputs, and it's up to the platform to execute this function whenever demanded. The request can be sent via HTTP or a message queue or something else entirely. Your code itself doesn't have to care. Example: AWS Lambda
- dewey 2y agoI was looking at many of these "selfhosted Heroku" type of solutions recently and read many HN discussions about the different options (coolify.io, ploi, ...) as I migrated to a new server and always copying, adapting nginx configs got a bit old. I've landed on Dokku in the end as it's the one with the least amount of "magic" involved and even if I stopped using it I could just uninstall it and have everything still running. Can highly recommend it! The developer is also super responsive and I even managed to build a custom plugin without knowing too much about it with some assistance. Documented this on my blog too: https://blog.notmyhostna.me/posts/deploying-docker-images-with-dokku-and-a-custom-nginx-configuration https://blog.notmyhostna.me/posts/deploying-docker-images-wi...
- Balladeer 2y agoHow long did it take you to go from "making a new server / copying configs is fine" to "this is tedious enough I'd like to abstract it?" Like, was it a years-long journey or is this the type of thing that becomes immediately obvious once you start working w/ N servers or something? I'm trying to learn the space between "physical machines in my apartment" and "cloud-native everything" and that's led me to the point where I'm happily using cloud-init to configure servers and running fun little docker compose systems on them.
- abra0 2y agoThat's where I am too right now for personal projects, and I ended up reimplementing parts of Dokuploy for that, but I don't feel much of a need to move from "fun little docker compose" for some reason
- duckmysick 2y agoFor homelab (but not only) you can install Proxmox Virtual Environment on your physical machine. You end up with a way to create VMs and containers with a web UI. It supports cloud-init too. If you have a spare machine it's excellent for experimenting and learning. https://www.proxmox.com/en/proxmox-virtual-environment/overview https://www.proxmox.com/en/proxmox-virtual-environment/overv... https://proxmox-helper-scripts.vercel.app/ https://proxmox-helper-scripts.vercel.app/
- notpushkin 2y agoDokku is really neat! I've been using it before moving to building my own Docker images and deploying with Swarm. It was also (partly) the motivation behind my own take on self-hosted PaaS, Lunni (shameless plug): https://lunni.dev/ https://lunni.dev/ In general, I really love the idea of running all your stuff on a server you own as opposed to e.g. Heroku or AWS. Simple predictable monthly bill really gives you peace of mind.
- mdasen 2y agoDo you mind if I ask why you chose Docker Swarm? I don't know that much about Swarm and I'd love to know what you think about it compared to K8s (in terms of ease, nice things, things missing, etc.)
- notpushkin 2y agoThe main reason probably was the fact that I was already familiar with Docker and Docker Compose. Kubernetes introduces a whole lot of concepts that I didn't feel like studying up, plus there was a 3-node minimum requirement. I just wanted to be able to start with a single node and be able to scale up if needed, so Swarm just felt like a natural match here. I'm looking into K8s and other orchestrators like Nomad and perhaps will add support in Lunni at some point, but for now I believe Swarm is the sweet spot for smaller deployments (from single server up to maybe a couple hundred nodes).
- raphinou 2y agoHow's Lunni going? Is swarm working well? I remember an announcement of it some time ago :-)
- notpushkin 2y agoNot too bad, except I have no idea how many users we have :') Swarm still works pretty smoothly for me, although I'm worried about the Mirantis situation, too. I'm currently working on a new backend, which will also enable us to plug in other orchestrators if need arises.
- realty_geek 2y agoDelighted to see dokku on here. It's an amazing product and the founder is super humble and helpful. I can't afford to throw much money at it now but it would be great if more people supported it financially
- conradludgate 2y agoMy experience with dokku was pretty poor. It was quick to start with but on my VPS crashing and restarting, my apps would not relaunch. I'd have to re-run the dokku commands again. Perhaps I did something wrong but I inevitably switched to a single-node k8s setup as it ended up being more reliable
- josegonzalez 2y agoDokku maintainer here. If you have more detailed feedback, I'd love to hear it! Happy you've found something that works for you though :)
- goodbytes 2y agoThis comment to me is another upvote to use dokku. Been a happy user for years myself. If you do need help, the discord is pretty responsive and always helpful.
- mixmastamyk 2y agosystemctl enable foo
- throwaway77385 2y agoOne more upvote for Dokku. Been using it for as long as I can remember hosting things on servers. It is such an incredible piece of software. And open source to boot. If any of my projects ever make money, Dokku will be the first project I'm funding.
- daitangio 2y agoIf you search a simpler solution I suggest https://github.com/daitangio/misterio https://github.com/daitangio/misterio I created it for managing my homelab, it works great and it is a thin layer over docker compose
- dewey 2y agoSometimes the slighly more complicated (Dokku is still a very thing bash wrapper around running git, ssh and docker commands) is simpler just because they have a great documentation and other people using it.
- pawurb 2y agoI love dokku! I've been running my SAAS seamlessly with it for 5+ years now. It's awesome to see it actively maintained.
- mdasen 2y agoDokku is great, but historically it didn't really handle resilience. It looks like there's now a K3s scheduler (added earlier this year) which would mean I could have use a Kubernetes operator for a replicated database as well as have the app running on multiple boxes (in case one fails). It looks like it'll even setup K3s for you. The docs don't seem to go into it, but hopefully the ingress can also be setup on multiple boxes (I wonder if it uses a NodePort or the host network). I was sad when Flynn died (https://github.com/flynn/flynn https://github.com/flynn/flynn), but it's great to see Dokku doing well.
- davidsgk 2y ago> Dokku is great, but historically it didn't really handle resilience. Would you mind elaborating a bit on this? I'm exploring some serverless options right now and this would be useful info. Do you mean it's not really designed out of the box for resilience, or that it fails certain assumptions?
- ffsm8 2y agoI'm not the person you're responding to, but I believe I can answer that question as well. Dokku essentially just started a container. If your server goes down, so did this container because it's just a single process, basically. Other PaaS providers usually combine it with some sort of clustering like k3s or docker-swarm, this provides them with fail over and scaling capabilities (which dokku historically lacked). Haven't tried this k3s integration either myself, so can't talk about how it is nowadays.
- davidsgk 2y agoAh gotcha, thanks for the insight!
- mdasen 2y agoYea, this. Dokku was basically a single-server thing. If that box dies, your site goes down until you launch it on a new box. That might not be a huge deal for smaller sites. If my blog is down for a day, it's not a big deal. With a cluster, if a server goes down, it can reschedule your apps on one of the other servers in the cluster (assuming that there's RAM/CPU available on another server). If you have a cluster of 3 or 5 boxes, maybe you lose one and your capacity is slightly diminished, but your apps still run. If your database is replicated between servers, another box in the cluster can be promoted to the primary and another box can spin up a new replica instance. Dokku without a cluster makes deploys easy, but it doesn't help you handle the failure of a box.
- mentalgear 2y agoHas anyone a made or has a link to a recent, detailed comparison between all these self-host-platform projects?
- slig 2y agoAny suggestion for a simple FaaS platform that isn't OpenFaaS? Fn Project looked promising, but their repo looks abandoned (more than one year without commits).
- eeue56 2y agoCurrently using Convox a lot, but miss the simplicity of Heroku. Anyone know if there's a good comparison breakdown of all the PaaS options out there?
- ksajadi 2y agoThis is not fully up to date but is a good start https://www.herokualternatives.com/ https://www.herokualternatives.com/
- zoomzoom 2y agoWe wrote up this guide (withcoherence.com, we're somewhere in the PaaS space and I'm a cofounder) https://www.withcoherence.com/post/the-2024-web-hosting-report https://www.withcoherence.com/post/the-2024-web-hosting-repo.... Hope it's helpful!
- Animats 2y ago"Serverless platform" is an oxymoron. But it worked for Salesforce, which is a software company whose slogan is "no software".
- paxys 2y agoSalesforce's "no software" slogan dates back to a time when software was sold in boxes on store shelves. They were one of the first (possibly the first) cloud-based business app. The slogan only looks weird in hindsight because the term "software" now includes SaaS apps.
- deleted 2y ago[deleted]
- password4321 2y agoHow well does Dokku support running on ARM?
- josegonzalez 2y agoI dropped armhf (32 bit arm) a few releases ago. It was painful to maintain and the few users of that were older Raspberry PI installs. I think there are other tools out there that better support low-powered platforms (piku comes to mind). ARM64 should be fine, with some caveats: - Dockerfile/nixpacks support is great! Just make sure your base images and your Dockerfile supports ARM64 building - Herokuish _works_ but not really. Most Heroku v2a buildpacks target AMD64. This is slowly changing, but out of the box it probably won't build as you expect. - CNB Buildpacks largely don't support ARM64 yet. Heroku _just_ added ARM64 support in heroku-24 (our next release switches to this) but again, there is work on the buildpacks to get things running. I run Dokku on ARM64 locally (a few raspberry pis running things under k3s) and develop Dokku on my M1 Macbook, so I think if there are any issues, I'd love to hear about them. Disclaimer: I am the Dokku maintainer.
- password4321 2y agoThank you for taking the time to provide this summary, and thanks for all your work on Dokku!
- Svoka 2y agoWhile ago I couldn't get LetsEncrypt working properly, was very frustrating. I think I just gave up at some point
- bjornsing 2y agoWhy does the title say “serverless” though? AFAIK Dokku is very much a “server platform”.
- chuckadams 2y agoIt’s the backend that implements serverless architecture. A serverless server, I guess. Roll your eyes if you like, but “serverless” is still a snappier term than “declarative on-demand server provisioning, configuration, and scaling” and most people are into that whole brevity thing.
- Terretta 2y ago> snappier term than “declarative on-demand server provisioning, configuration, and scaling” Quoth the raven, “servermore”…
- tdeck 2y agoExcept Dokku doesn't do those things. Dokku doesn't scale your app automatically and it doesn't shut it off when it's not being used. It runs your web server process continuously, handles some 12 factor config, and does some nginx stuff for you. Until this year it didn't support managing a cluster at all and was entirely focused on single box deploys. The scale command just runs more processes on the same machine which if you're not using Node is probably not even a good idea to do.
- AtlasBarfed 2y agoHere's a better question. For people that roll their eyes at the mere mention of "serverless" (like me), what is the value proposition of Dokku over VMs and your own dockers? Don't convince me it is like AWS serverless. Convince me to give up VMs and docker images.
- cheema33 2y ago> Convince me to give up VMs and docker images. I am in the same boat. Using VMs and docker images and not sure how this would benefit me. I have looked AWS serverless stuff. They appears to solve problems I don't have.
- HL33tibCe7 2y ago> It’s often desirable to have HTTPS for your site. Dokku makes this easy with the Let’s Encrypt Plugin, which will even auto-renew for you. I don’t use this, because I’m letting Cloudflare handle this with its proxy. Hopefully you do use TLS between Cloudflare and your Dokku (even with a self-signed cert or something), otherwise your personal sites (which are apparently sensitive enough to put behind basic auth) are being transited over the internet in plaintext.
- drpossum 2y agoFrom my understanding Cloudflare can generate origin certs for exactly this purpose and you can add certs to dokku with `dokku certs:add myapp`
- throwitaway1123 2y agoAgreed. It also can't hurt to setup a firewall or EC2 Security Group that only allows ingress from Cloudflare IPs: https://www.cloudflare.com/ips/ https://www.cloudflare.com/ips/ Alternatively, you can use Cloudflare Tunnel, and then block all incoming connections.
- fideloper 2y agothey also provide certs for mTLS between cloudflare and your origin, which you can layer in along with IP restrictions (the term they use is “authenticated origin pull”)
- viraptor 2y agoYou have to limit the traffic to that pool to prevent people accessing your server directly. But that's not enough on its own, because other people can use CloudFlare's IPs to scan you too, so you need some kind of auth on top or use the tunnel.
- chazeon 2y agoTypically my servers is behind NAT and it has no public address, one can only reached the service through the CF tunnel and my access is through VPN, this should be safe, right?
- password4321 2y agoRelated discussion on the front page today: "Coolify’s rise to fame, and why it could be a big deal" https://news.ycombinator.com/item?id=41356239 https://news.ycombinator.com/item?id=41356239 > Coolify can enable organizations of any size to host an arbitrary number of free, self-hosted software easier than ever. https://github.com/coollabsio/coolify https://github.com/coollabsio/coolify > An open-source & self-hostable Heroku / Netlify / Vercel alternative.
- wirelesspotat 2y agoDoes anyone have experience using dokku-postgres? The GitHub readme is well documented but hard to know how that translates into the dev exp, like with scaling or upgrades and if its features are comparable to managed Postgres providers (I'd assume no but happy to be proven wrong!) [0] https://github.com/dokku/dokku-postgres https://github.com/dokku/dokku-postgres
- IgorPartola 2y agoI used to use it but what got me was letting my Dokku install get stale and then upgrading a whole bunch of versions in a row. The old plugin broke, the new one wasn’t compatible, there were version issues. Nowadays I just run Postgres directly on my Debian box and just create a new user/DB for ever application, then set an env variable for the Dokku app to connect. Postgres is so solid to begin with that it requires no babysitting unless you have very intense workloads (at which point either use a hosted solution or start thinking about how you’ll do your own DBA).
- hmaxdml 2y agoI liked Dokku when I was still happy using docker, but since I started working on https://www.dbos.dev/ https://www.dbos.dev/, I value microVMs way more. The problem with Dokku is that, while its easy to use if you have experience in devops, well.. you still need to know devops! That's not what I call serverless...
- heofizzy 2y agoDon't you need to run everything in bare metal to effectively leverage microVMs? AFAIK, unlike containers, you can't efficiently run microVMs on cloud VM instances.
- hmaxdml 2y agoYou need nested virtualization, which many VMs support -- it is architecture dependent. But, yes, to maximize the benefits you'll want to run on baremetal. From the standpoint of a cloud user, the kind that likes Dokku, the experience is cheaper/faster/more secure if the infra uses uVMs vs containers.
- canadiantim 2y agoWill it ever be possible to use DBOS with other providers asides from aws? Some part of me concerned about the vendor lock-in
- hmaxdml 2y agoThe SDKs -- which do most of the heavy lifting of managing state for you -- are open source. For example the TS SDK (https://github.com/dbos-inc/dbos-transact https://github.com/dbos-inc/dbos-transact) runs on node and you can run node anywhere (k8s, VMs, etc.) With respect to AWS, where we currently host DBOS Cloud, we rent baremetal machines and built the entire hosting layer using Firecracker, Postgres, and other well known frameworks that we can bring to other metal providers (https://www.dbos.dev/blog/anatomy-of-dbos-cloud https://www.dbos.dev/blog/anatomy-of-dbos-cloud).
- shepherdjerred 2y agoIs there any advantage of Dokku over using Kubernetes (I already have a person single-node cluster). I initially setup Dokku on K8s, but since it would just deploy to that same server it makes more sense IMO to just use K8s
- davepeck 2y agoIf you've already got k8s set up and you're comfortable with it, I'm not sure that Dokku offers much? But... wow. For my single non-k8s server at home, Dokku makes getting stuff running behind HTTPS about as simple as I could hope for!
- andybak 2y agoI mean "not having to learn Kubernetes" is surely a factor?
- 0xblinq 2y agoIt’s like two orders of magnitude easier to setup and use.
- shepherdjerred 2y agoSome took my comment to mean "why would anyone use Dokku"? This project looks great, and is obviously far less complex than Kubernetes. I was asking for advice about my particular situation. I wasn't saying that someone should choose Kubernetes over Dokku. Though, I do see many advantages of Kubernetes for a homelab environment, mainly that you get experience using K8s which can transfer to a professional context.
- windowshopping 2y agoI have a heroku app that I'd love to try migrating. It's a pretty simple express.js single page app running on heroku's lowest level, uses firebase and has no database or other backend dependencies. The domain is on godaddy and it uses Cloudflare for DNS. Heroku's "Automated Certificate Management" takes care of the SSL cert. The main issue is that it's for playing a game, and the game is held in-memory, and once a day heroku restarts their servers, so everyone gets kicked out of the game they're in when it restarts with cleared process memory. I need to fix this by migrating and I don't have time. If anyone feels like this migration would be something that they have relevant experience for and which they could do confidently, please get in touch. Email in profile.
- jamil7 2y agoYour server will likely occasionally have to restart regardless of whether you migrate or not. Maybe you could look at using Redis to store your game state. I think Heroku has a free add on.
- fpauser 2y agoOr simply use traefik + app containers via standard podman + systemd integration: https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html https://docs.podman.io/en/latest/markdown/podman-systemd.uni... https://traefik.io/traefik/ https://traefik.io/traefik/
- simonw 2y agoThe word "simply" is doing a bit too much heavy lifting there - I'd love to see an article about that solution that's as detailed as Hamel's Dokku one https://hamel.dev/blog/posts/dokku/ https://hamel.dev/blog/posts/dokku/
- Kiro 2y agoThat's the opposite of simple.
- ledgerdev 2y agoI love this idea, simple reliable pieces. edit: looking into traefik docs and perhaps not what I would call simple, probably would use caddy as reverse proxy instead.
- coreyburnsdev 2y agothat's what I do and its easier to setup and understand than dokku that's for sure. tried using dokku multiple times and ran into so many issues with it. with traefik you literally just have to copy and past few lines in a compose file and push to docker hub and traefik will pick it up.
- yunohn 2y agoDokku handles a significantly larger scope than the setup you describe, including a plugin ecosystem: https://dokku.com/docs/community/plugins/ https://dokku.com/docs/community/plugins/
- trallnag 2y agoFor personal stuff I always come back to Ansible and, if I want it containerized, Kubernetes
- aledalgrande 2y agoCurious: for this type of infra, what do people use for file/object storage? Using something like AWS would negate all the savings with egress costs.
- tdeck 2y agoIf your capacity needs aren't very high you can just store data on your web server in a directory https://dokku.com/docs/advanced-usage/persistent-storage/ https://dokku.com/docs/advanced-usage/persistent-storage/
- ilovebabyyoda 2y agominIO can also be self hosted as an s3 alternative. Or host a database. Likely just depends on the type of storage you are looking for
- deleted 2y ago[deleted]
- apitman 2y agoIf you want hosted S3-compatible storage, you should be able to combine Backblaze B2, Wasabi, or Cloudflare R2 with any VPS provider from the bandwidth alliance: https://www.cloudflare.com/bandwidth-alliance/ https://www.cloudflare.com/bandwidth-alliance/ That should alleviate egress costs. Bonus that storage is also way cheaper.
- throwaway77385 2y agoPocketbase (also in a Dokku-powered container) on a Hetzner Cloud VPS with attached storage. Stupidly cheap, very reliable.
- chasd00 2y agoA linode vm + dokku has supported my personal projects (for profit and otherwise) for years.
- b_shulha 2y agoDokku is great, but have you tried https://ptah.sh https://ptah.sh ? ;) (sorry) This is the service I have been working for the lasts months alongside my 9-5. Heavily inspired by Coolify, but it is based solely on Docker Swarm to save the development efforts on other features. Also, it is a bit opinionated to adjust the UX to what I need myself, so there are slight deviations from the way how others work with Swarm. I have a short vid which I have recorded today on how one could easily deploy WordPress to any VPS: https://youtu.be/k34Zdwcsm6I https://youtu.be/k34Zdwcsm6I It covers usage of the 1-Click apps templates which speed up everything "a little bit".
- xrd 2y agoI love dokku. And josegonzalez is always a huge help. I pay a monthly support to dokku. You should too. Jose will help you either way, but I feel slightly less guilty when I ask questions and he immediately resolves them for me in the slack channel. Don't you want to use this incredible piece of software guilt free?
- Pxtl 2y agoI'm going to confess something: I still do it oldschool. A single box with a SQL server and a webserver running on it. I've taken courses in Docker and whatnot but never applied them. When you're hosting a single-node cluster, what value do these docker-based tools offer? Is it the fact that you can use a dockerfile to declare your OS-level dependencies consistently?
- mixmastamyk 2y agoYes, cattle not pets, and portability.
- Pxtl 2y agoBut does the underlying server itself that's hosting the docker node not become a "pet", even if it hosts the "cow"?
- mixmastamyk 2y agoThere are specialized container OS hosts or ansible type updaters for wrangling traditional servers.
- ThinkBeat 2y agoLooking at the examples in the post above, and looking at the Dokku site and documentation Is it the case that there is no visual in the free version? Just hacking around some files? That is not that user friendly and certainly does not really remind me of Heroku. The GUI you get with the Pro version looks good. and only a bit more than $800 for life.
- LAC-Tech 2y agoI'm outing myself as a bit ignorant here, but the author: - used a VPS - made a docker file So what does doku actually do?
- ttarr 2y agoSame here, All I do on top of what you said is use Traefik for reverse proxy and let's encrypt.
- scottydelta 2y agoLooks promising, I have been self hosting a lot of apps, this can make things easier.
- ravxx 2y agojust get good with docker and make a shell script to instantly create/update pre-existing docker images. you wont regret it.
- mike31fr 2y agoHow does it compare to Coolify? https://coolify.io https://coolify.io
- cdubzzz 2y agoI started out with Dokku and it was fine, but ultimately switched to Coolify solely because it has a web UI. Dokku Pro has one as well, but my use case was primarily just for hosting a demo and spinning up instances from GitHub PRs so didn’t feel worth spending money on.
- wtcactus 2y agoI do have a hard time understanding how is this different from setting up a VM with docker running on it. I don't see any added benefits in therms of the extent of configuration I need to deploy. What is the new thing Dokku and other similar services bring to the table? What is the extra configuration I don't have to do if I go with it?
- interstice 2y agoI have found over the years that trying new software risks immediately running into a road block in real use. There will be some detail or complexity or bug on a semi-basic requirement that goes directly to an issue in github. Dokku is not one of those, it does what it does well and aside from a couple of cli argument ordering quirks it's been great for my light usage. If I was using it more I'd probably want to configure entire architectures with declarative config files, I have no idea if it can do that though.
- Lord_Zero 2y agoAnd then those GitHub issues get closed by stalebot a month later and the repo looks like it doesn't have many issues.
- kmarc 2y agoWhenever a new tool / library / plugin / whatever is evaluated by myself or my team, I spend some time on gathering some github issue / PR stats. I think this is now part of my "software engineering toolset" / best practices. If there are too many open PRs, or unresolved tickets, OR there are too many _new_ ones, I would rather start searching for something else
- klabb3 2y agoSame. I do a lot of research and try to get a sense of the person/team behind it and their values, vision, dedication, if they accept outside contributions, etc. A few years ago it became popular to document the project processes, but it all turned into generic code of conduct garbage and abstract governance pillars, as if they were writing a constitution. So looking at GitHub issues and commit history is still the best way. And very well invested time.
- dewey 2y agoDokku is actually the opposite of that. Super responsive, helpful and nice maintainer (Already mentioned by a few other people in this thread). I was so positively surprised that I got help so quickly after asking that I started to sponsor it via GitHub immediately.
- 0xblinq 2y agoDokku is AMAZING. I’ve been using it for about 6 years, never had a single problem with it and I host a lot of apps on a single instance server. Can’t recommend it enough
- gvkhna 2y agoIs anyone running truenas scale for this kind of purpose. I haven’t used it but its architecture around k8s seems extremely promising. For most use cases a simple docker container is all you need but sometimes running other apps like grafana with a k8 manifest is easier to manage in one vps and gives you the flexibility of a cluster. Just curious.
- timetraveller26 2y agoI feel like a caveman doing this with a git bare repository and a hook, one of this days I am going to give Dokku a try!
- deleted 2y ago[deleted]
- hedgehog 2y agoAre there plugins or anything that will allow Dokku to run queues of batch jobs? Skimming the docs there is clear support for Heroku-style apps and one-offs that can be launched via cron, not so much for batch although it would be quite useful.
- josegonzalez 2y agoDokku maintainer here. You may wish to look into a message processing system in your language of choice and run that as a daemon in Dokku. We have plugins for various datastores, and commonly I see folks just connect their worker processes to that. It's much lighter weight than spawning new containers for each workload.
- hedgehog 2y agoIn my case spawn overhead is negligible relative to the jobs themselves, my existing experience with AWS Batch has been pretty good. I took another look at the Dokku documentation and extending `run:detached` would work well enough, though maybe it's time for me to revisit Airflow or something in that direction.
- gslepak 2y agoCan someone explain what this is for someone who doesn't know what Heroku is, and why it's called serverless when it clearly requires a server?
- notatoad 2y agoheroku is (was?) a platform for hosting web apps with a lot of nice ergonomics, to let you run commands like "heroku up" to get your app running on the web with minimal fuss. this appears to be a project to give you the niceities of a PAAS, without actually providing the platform.
- dangus 2y agoHeroku still exists, it just sucks. Owned by Salesforce.
- mega-tux 2y agoHeroku is still good for tons of stuff. After Salesforce bought it, it stopped getting much better, they removed part of free quota, some add-ons disappeared, and the like. For example, http2 support just went beta on may. It's a shame.
- bulatb 2y ago"Serverless" means there's no stateful application server in your architecture. No instance, just callable code. Shell script, not daemon. You write narrow business-level functions that take inputs, do their business, and give you the output. They're called, they run, they terminate and carry nothing forward. You deploy them to a hosting platform which will handle making them available, routing requests, and all the other stuff that's incidental to doing the work. The only thing that's your concern is the logic that turns inputs into outputs. At least that's the pitch. Technically a PHP script that you run as CGI through Nginx is "serverless" that way, though of course it's hosted with a software server running on a hardware server. It's serverless because you write a PHP script and it doesn't care what runs it or what's going on around it. It doesn't need to work within the context of an application server like an endpoint in a Django or a Rails app would. Someone else could own a bunch of servers running Nginx, you'd give them prettyprint.php, and it would pretty-print your JSON or whatever at the URL they'd give you. Services that do this are called serverless platforms. The hosting model is called "functions as a service" (FaaS). If you like the architecture but you don't want FaaS from Amazon, Heroku, or some other third party, you can host yourself a mini FaaS with something like Dokku.
- progrium 2y agoDamn, who wrote this amazing piece of software
- josegonzalez 2y agoWhat a genius the original maintainer of this software is
- est 2y agoI am wondering why php wasn't more popular? Think php as a serverless platform: 1. 10 minute to learn, simple syntax, rich functions 2. deploy with standard tools like ftp 3. easy scaling with php-fpm. 4. not exactly docker, but vhost works in most cases. And vhost can be containerized. 5. insta hot-reload 6. dirt cheap cost. Hi dreamhost 7. no vendor lock-in bullshit, supported by everyone everywhere well, at least it was the case used to be
- fastball 2y agoDoes PHP run your database? Your caching layer? Handle SSL? Can you run a queue with PHP? Would you? If your answer to any of those things is "no", then PHP isn't a serverless platform. It is a language that you use to build web applications. That makes it very different from Dokku, Kubernetes, etc. But yes, you're right that PHP is still a great choice for building the "web application" portion of your infrastructure.
- est 2y agoTo be fair, serverless platforms doesn't always provide queue or database. Usually they come alone with some sqlite or KV store for the convenience. SSL was provided by the php-fpm part, with either Apache or nginx, like most "platforms" do. Modern platforms may choose less-popular fronts like Caddy, and Caddy does support php_fastcgi.
- fastball 2y agoThe purpose of serverless is easily deploy applications without worrying about / managing infra at all. The only reason you don't need to run your own infra with PHP is because it doesn't do anything except the web application. As you noted, it doesn't even do the web-serving. Most serverless application platforms are then paired with hosted databases, hosted queues, etc, so that you don't need to manage those either. But yes, only some of those additional pieces can be described as "serverless", e.g. AWS Aurora is an actual serverless database, vs DigitalOcean's hosted Postgres, which does not scale in a "serverless" way. Regardless, minimal management of the database is required on these platforms. Dokku in turn is a replacement for those platforms and makes it easy to host your own [insert some part of your platform stack here]. That is the purpose of a PaaS, which is what Dokku is and what PHP certainly is not. Yes, the OP maybe should've said "My favorite personal PaaS", but that is less catchy, and I think calling it a "serverless platform" is close enough to the truth and gets the point across.
- dangus 2y agoWhat’s funny is before I read this I thought Dokku was just used as a convenient driver for kitchen testing and stuff like that. I never really thought of it as a PaaS!
- deleted 2y ago[deleted]
- pollux01 2y agoI have a video on how to setup Dokku via Docker, so you can launch it in any server like aws or digital ocean without paying extra for other services. https://youtu.be/O_-KxC9FjuA https://youtu.be/O_-KxC9FjuA
- rcarmo 2y agoObligatory mention of Piku as a Dockerless alternative: http://piku.github.io/ http://piku.github.io/
- mjcurl 2y agoI've been using dokku for years. Constant useful updates over time and the developer was super helpful with a niche case using old documentation.
- Mackser 2y agoI've been using Dokku for many years. It's remarkably stable and easy to use. I wrote an extensive tutorial on how to deploy various apps and websites with Dokku in 2018 [1] and I'm sure that following the same steps still works 6 years later. 1: https://maxschmitt.me/posts/tutorial-deploy-apps-websites-dokku https://maxschmitt.me/posts/tutorial-deploy-apps-websites-do...
- byrnedo 2y agoStriking while the iron is hot: I love dokku and I've used it for many years. That said, I thought I'd do something similar but with the goal of supporting k8s manifests https://github.com/skateco/skate https://github.com/skateco/skate It's daemonless, multi-host with multi-host networking, service discovery and like I said, allows you to create deployments, cronjobs, and route traffic via ingress resources. Comes with letsencrypt out of the box.
- progforlyfe 2y agoDokku looks great, I have not tried it yet myself. I've been using CapRover (similar thing) for years and have no complaints! LetsEncrypt support built in, has a web interface and CLI utility to deploy (can also use github triggers).
- m3kw9 2y agoI feel like this is similar to trying out Docker to use for small side projects for the first time, lots of gotchas that is hidden
- marko-djuric 2y agoLast time i tried to use Dokku as Docker container it was unusable, Nginx, Traefik, Mongo, https all plugins with bugs, 2 weeks wasted on debugging without result.