[HN Gopher] Dokku: My favorite personal serverless platform
___________________________________________________________________
Dokku: My favorite personal serverless platform
Author : tosh
Score : 507 points
Date : 2024-08-26 15:21 UTC (7 hours ago)
(HTM) web link (hamel.dev)
(TXT) w3m dump (hamel.dev)
| simplecto wrote:
| Great writeup -- I have a gist floating around somewhere with a
| similar workflow, but for bitbucket pipelines.
|
| Good solve!
| calyhre wrote:
| I 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),
| perfect for hobbyists
| josegonzalez wrote:
| I 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 wrote:
| It is yes. Thanks for such a nice tool
| cynicalsecurity wrote:
| Self-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 wrote:
| Or 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 wrote:
| Digital 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 wrote:
| Because provisioning/configuring/monitoring/scanning/patching
| /grooming servers sucks.. and people are lazy.
| dewey wrote:
| > 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 wrote:
| I must have missed the incident where a major cloud provider
| was stealing their customers' data. Do you have a link?
| pelagicAustral wrote:
| IMHO 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 wrote:
| I've been loving Kamal in production. What problems did you run
| into?
| pelagicAustral wrote:
| The 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 wrote:
| Ruby. Only if it were a self contained binary in go or (or
| zig) it could go places.
| tdeck wrote:
| Yes, this is what's holding Ruby back from the broad
| adoption that Zig enjoys.
| sigmonsays wrote:
| to 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.
| benbristow wrote:
| I've been enjoying using Dokploy recently.
|
| 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
|
| And put together some pre-configured Compose files you can deploy
| for various apps. https://github.com/benbristow/dokploy-compose-
| templates
| aayushdutt wrote:
| Nice. Why not use a github merge webhook for triggering
| deploys?
| benbristow wrote:
| I 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 wrote:
| Thanks 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 wrote:
| Apologies 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.
| rsyring wrote:
| I find it helpful to have other tools listed. I already know
| a decent amount about Dokku and clicked on these comments
| specifically to find out what other tools might be up and
| coming or otherwise mentioned in the space.
|
| I'm still waiting for something built on a rootless container
| solution and with everything defined in git (i.e. no or
| limited cli commands) so that exactly what is being deployed
| is, at all times, tracked in git.
| oezi wrote:
| My 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 wrote:
| You can configure almost everything using an app.json file.
|
| https://dokku.com/docs/deployment/deployment-tasks/
| dewey wrote:
| I 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 wrote:
| Could 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 wrote:
| Yep, 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 wrote:
| > 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.
| oezi wrote:
| Exactely, I was really surprised that dokku isn't all based
| on storing these commands in a config/script which gets
| executed every time you change something.
| imemyself wrote:
| It doesn't cover everything - but I've had great success with
| terraform and this module.
| https://github.com/aaronstillwell/terraform-provider-dokku
| josegonzalez wrote:
| We have ansible modules (https://github.com/dokku/ansible-
| dokku) that cover the majority of app management if thats what
| you want. The reason I am hesitant to do it in something like
| `app.json` is purely because one might expose Dokku to users
| who only have push access and some of those commands can be
| fairly destructive.
|
| Disclaimer: I am the Dokku maintainer.
| oezi wrote:
| Thank you! I was hoping for something less intimidating than
| going full ansible/terraform.
|
| Essentially something that captures all dokku invocations and
| could be transferred to another machine. Is app.json this?
| 0xblinq wrote:
| I'd love this feature too. Why not add it as an optional
| thing to enable and let users decide? Maybe just put a big
| warning in the docs and make it opt-in?
| andrewmutz wrote:
| I'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/
|
| I use it with rails but it works with any containerized web apps.
| dewey wrote:
| I'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 wrote:
| I'm pretty sure multiple apps is on their public roadmap, I'm
| sure I read it somewhere.
| andrewmutz wrote:
| I'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.
| hobo_mark wrote:
| Can I not do all of these things with docker-compose already?
| dewey wrote:
| No. 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 wrote:
| I 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 wrote:
| dokku 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/
|
| 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 wrote:
| I 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.
| hobo_mark wrote:
| Interesting, how is compose meant to be used then? Just for
| building images and running local dev environments?
| amelius wrote:
| Let me guess ... it's called serverless but it still has a server
| somewhere in the equation?
| efilife wrote:
| > Dokku is an open-source Platform as a Service (PaaS) that
| runs on a single server of your choice
|
| Lol
| johntash wrote:
| This 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 wrote:
| You 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 wrote:
| Dokku'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.
| dewey wrote:
| > 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
| mitjam wrote:
| It's a tradeoff: a real PaaS is more managed, fault
| tolerant, and scalable, Dokku is much less expensive,
| especially with multiple projects.
|
| One server scales vertically and can serve a good number of
| projects and users. Huge spikes eg. due to attacks, lead to
| outages instead of runaway bills.
| PKop wrote:
| >what's the point
|
| To get started in a simpler way, and in a way that solves
| 80% of use cases. Once you need to scale, then you can
| scale. Why worry about that upfront with all the complexity
| it entails?
|
| >what if your one server runs out of resources to fit more
| apps on
|
| There's vertical scaling. Rent a bigger server.
| josegonzalez wrote:
| We've supported multiple servers for a few years and have
| had official k3s support since the beginning of the year,
| so not just one server anymore. We even support managing
| the servers associated in a k3s-based cluster.
|
| Disclaimer: I am the Dokku maintainer.
| johntash wrote:
| Ohhh, I stand corrected. I don't think that was an option
| the last time I looked at Dokku. I see the schedulers
| section in the docs now, thanks for pointing it out!
|
| Does the k3s scheduler work with existing non-k3s k8s
| clusters as well?
| josegonzalez wrote:
| Yep, you can set a single property for the kubeconfig and
| it'll respect that.
| dewey wrote:
| Dokku doesn't mention "serverless" anywhere, it's just this
| persons blog post that uses this word wrongly.
| abadpoli wrote:
| Can we not do this? Everyone knows that "serverless" doesn't
| actually mean there are no servers. It's not productive to do
| this "haha gotcha!" trope every time someone uses the
| serverless term.
|
| Serverless refers to the fact that you can launch individual
| workloads on the platform while abstracting away the underlying
| infrastructure. Yes, to set up dokku you still need to
| provision a server. But to deploy an application onto dokku
| after it's been set up, you do that without worrying about
| provisioning new infra for your app. That's what is
| "serverless" about it, and it's a perfectly acceptable use of
| the term.
| turtlebits wrote:
| "Serverless" means 1- pay for what you use. 2- No infra
| setup, ever. Dokku requires a server that you have to manage.
| It is not serverless. You should never hit a scaling wall.
| rahkiin wrote:
| Azure Functions are serverless to us, but for the team
| developing and deploying that feature they are not
| serverless. Dokku provides a tool so that once you deploy
| projects they can be 'serverless'.
| joseda-hg wrote:
| 1- That would throw out serverless with (free) unlimited
| use (A la PocketHost)
|
| 2- Then getting a third party to set up Dokku and then
| using that would qualify (Because it'd be the same as
| getting AWS to setup their server abstraction) The platform
| is serverless, you hosting it probably not, maybe server-
| light, as you setup the abstraction and use that for many
| apps
| bigstrat2003 wrote:
| > Can we not do this? Everyone knows that "serverless"
| doesn't actually mean there are no servers.
|
| Then maybe people shouldn't use a term that means "there are
| no servers". One doesn't get to complain if they use a word
| to mean something the opposite of its _actual_ meaning, and
| then people don 't like it.
| IshKebab wrote:
| Are you the sort of person that says "ackshewelly people in
| orbit aren't weightless" or complains that wireless
| headphones technically contain wires, or that motionless
| rocks are actually moving really fast because the Earth is
| moving through space...
|
| It's just annoying.
| hashmush wrote:
| The actual meaning of words is defined by how people use
| them. Serverless has a very specific, well-defined meaning
| despite its seemingly contradictory etymology.
| viccis wrote:
| Most of the time I see "serverless" used these days, it's
| referring to the fact that server specifics are abstracted away
| from the application itself's deployment artifacts. Instead it
| just runs on a platform of some kind without worrying about
| having to be built for this version of this OS, etc.
|
| While it is being used a bit recklessly here, taking it
| literally is about as insightful and constructive to discussion
| as pointing out that "cloud" servers are located on the ground.
|
| I would even defend its usage here by pointing out that it's
| entirely possible to use this at a company in which the
| _servers_ are managed by one person or team, and the developers
| building applications simply interact with the _service_ and
| never touch a server themselves. Neither team has to touch each
| others scope, making it indistinguishable from conventional
| "serverless" approaches in which the decoupling occurs across
| company rather than across team within one company.
| amelius wrote:
| > without worrying about having to be built for this version
| of this OS, etc.
|
| Maybe call it "server-agnostic" or "OS-agnostic" then.
| viccis wrote:
| I honestly don't see the need to change it. The first use
| of "serverless" is from this article:
|
| https://readwrite.com/why-the-future-of-software-and-apps-
| is...
|
| In it, he points out:
|
| >The phrase "serverless" doesn't mean servers are no longer
| involved. It simply means that developers no longer have to
| think that much about them.
|
| I don't know how anyone could interpret "serverless" as
| meaning there's no server involved at any point in the
| application's execution, and if they did, I'm not sure what
| harm it causes? It seems like the only objection here is a
| pedantic urge to be more correct.
| wnolens wrote:
| Feel free to point us to the computing paradigm that doesn't
| require execution on _some_ host
| ebiester wrote:
| It is, but "We provide a programmatic interface for deployment
| that allows deploying docker containers on a VPS or server that
| you control" doesn't have a good buzzword.
| paxys wrote:
| Looks 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/) is
| very descriptive.
| efilife wrote:
| Same 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 wrote:
| What makes anything "serverless", when it has to run on a
| server?
| SushiHippie wrote:
| I 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 wrote:
| Practically, 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 wrote:
| Kinda, 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
| IshKebab wrote:
| It means it doesn't run on specific servers that you manage.
| efilife wrote:
| So every website I do not own is serverless?
| dewey wrote:
| I 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-wi...
| Balladeer wrote:
| How 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.
| notpushkin wrote:
| Dokku 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/
|
| 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 wrote:
| Do 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 wrote:
| The 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 wrote:
| How's Lunni going? Is swarm working well? I remember an
| announcement of it some time ago :-)
| notpushkin wrote:
| Not 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.
| ownagefool wrote:
| There isn't actually ( nor was there ever ) a 3 node
| requirement for k8s.
|
| Etcd requires 3 boxes for HA, but nothing stops you running
| a single node etcd.
|
| I personally run single master clusters, because if the
| master goes down, you lose management as opposed to actual
| service availability, so mostly I don't care.
|
| Now that there's anything wrong with your preference.
| notpushkin wrote:
| I might be misremembering it, huh! Yeah, it's pretty much
| the same as Swarm then (any odd number of manager nodes
| is valid, and if more than a half go down you only lose
| the management ability and everything else stays up).
| chuckadams wrote:
| There are several k8s implementations that are fine with a
| single node: k3s in particular is worth a look. But Swarm
| is still quite legit in my book.
| notpushkin wrote:
| I'll look into it, thank you so much! Way back then there
| wasn't a lot of choice though. I think I've played with
| Minikube but that was not recommended for production, and
| all the other distributions were huge (or at least I
| thought so!).
| raphinou wrote:
| Not lunni's dev, but a Swarm fan :-)
|
| I'm a swarm user, but using single node swarms. It's the best
| solution I found for deploying apps. A lot of projects
| publish docker compose files, and those are easily usable
| with Swarm after some small modifications. I'm using the
| setup described at dockerswarm.rocks [1] and it's smooth
| sailing.
|
| It's a real pitty, and still surprises me, Swarm is not more
| popular. It's still maintained [2] but few people still
| recommend it (even dockerswarm.rocks doesn't anymore). I've
| switched to it in 2022 [2] thinking I didn't take a lot of
| risk as starting with it is a really a low investment, and
| I'm still satisfied with it. I've deployed a new server with
| it recently.
|
| 1: https://dockerswarm.rocks/traefik/ 2:
| https://www.yvesdennels.com/posts/docker-swarm-in-2022/
| jjnoakes wrote:
| > 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.
|
| Have you found hosting you like with bandwidth expense caps?
| I'm looking for something like this but I don't want surprise
| network bills if I misconfigure something.
| diggan wrote:
| > Have you found hosting you like with bandwidth expense
| caps?
|
| Not exactly what you're looking for, but solves the same
| problem in a different way:
|
| I've been quite happy with using Hetzner's dedicated servers
| which come with 1 GBit unmetered connection (unlimited
| bandwidth), so no surprise network charges :)
| notpushkin wrote:
| Yeah, I think plenty of VPS providers do unmetered traffic
| too. Mine has a limit but it's something like 8 TB/mo, so
| I'm not particularly worried either.
| apitman wrote:
| Note that if you saturate that 1Gbps link they will almost
| certainly ask you to stop. Lots of VPS offer "unlimited"
| but it's really not. It's only unlimited within their "fair
| use" restrictions, ie only as long as they think it's
| reasonable.
|
| Would love to be shown a counterexample provider.
| devjab wrote:
| It's not really unlimited as they will charge you $1/TB
| for what they call "overusage".
| Aeolun wrote:
| 5-10x cheaper than AWS still.
| thelittleone wrote:
| Perhaps Hetzner or OVH?
| emacsen wrote:
| I'm curious as to your thoughts around Swarm.
|
| My concern around Swarm is around the Docker corporation, which
| appears to be struggling.
|
| As a competitor, we have Nomad, but with the recent IBM
| acquisition, I'm concerned about Nomad's future.
| notpushkin wrote:
| I do have some concerns about Docker Inc. and Mirantis (which
| now owns Docker Swarm I believe), yeah. Swarm is pretty
| mature though, and while I don't think it's going anywhere
| soon, I don't think we'll get any more core features anytime
| soon.
|
| For Lunni, my plan is to add support for another orchestrator
| while keeping the developer experience of just working with
| docker-compose.yml. I really didn't want to do K8s, but given
| it's essentially an open standard now, it should be a safer
| bet than Nomad. I guess we'll see when I can get to it!
| ForHackernews wrote:
| IBM bought Nomad? That's disappointing to hear.
|
| Nomad was always much better than k8s, sad that it never got
| the same kind of traction or mindshare.
| realty_geek wrote:
| Delighted 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 wrote:
| My 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 wrote:
| Dokku 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 wrote:
| This 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 wrote:
| systemctl enable foo
| throwaway77385 wrote:
| One 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 wrote:
| If you search a simpler solution I suggest
|
| 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 wrote:
| Sometimes 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 wrote:
| I love dokku! I've been running my SAAS seamlessly with it for 5+
| years now. It's awesome to see it actively maintained.
| mdasen wrote:
| Dokku 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), but
| it's great to see Dokku doing well.
| davidsgk wrote:
| > 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 wrote:
| I'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 wrote:
| Ah gotcha, thanks for the insight!
| mdasen wrote:
| Yea, 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.
| josegonzalez wrote:
| Yeah the k3s scheduler is basically "we integrate with k3s
| or BYO kubernetes and then deploy to that". It was
| sponsored by a user that was migrating away from Heroku
| actually. If you've used k3s/k8s, you basically get the
| same workflow as Dokku has always provided but now with
| added resilience.
|
| Note: I am the Dokku maintainer.
| mentalgear wrote:
| Has anyone a made or has a link to a recent, detailed comparison
| between all these self-host-platform projects?
| slig wrote:
| Any 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 wrote:
| Currently 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 wrote:
| This is not fully up to date but is a good start
| https://www.herokualternatives.com/
| ofrzeta wrote:
| At least Coolify and CapRover are missing. Also, I don't
| think Kubernetes qualifies as PaaS.
| eeue56 wrote:
| Sadly missing Convox - particularly I'm looking for examples
| of things each excel at against each other.
| zoomzoom wrote:
| We 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-
| repo.... Hope it's helpful!
| Animats wrote:
| "Serverless platform" is an oxymoron.
|
| But it worked for Salesforce, which is a software company whose
| slogan is "no software".
| paxys wrote:
| Salesforce'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.
| password4321 wrote:
| How well does Dokku support running on ARM?
| josegonzalez wrote:
| I 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 wrote:
| Thank you for taking the time to provide this summary, and
| thanks for all your work on Dokku!
| bjornsing wrote:
| Why does the title say "serverless" though? AFAIK Dokku is very
| much a "server platform".
| chuckadams wrote:
| It'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 wrote:
| > _snappier term than "declarative on-demand server
| provisioning, configuration, and scaling"_
|
| Quoth the raven, "servermore"...
| tdeck wrote:
| Except 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 wrote:
| Here'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 wrote:
| > 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.
| spiralpolitik wrote:
| Exactly.
|
| Dokku looks great but what is the value of using it over "run
| your container" platforms like Google Cloud Run, Digital
| Ocean App Platform, or Fargate.
| HL33tibCe7 wrote:
| > 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 wrote:
| From my understanding Cloudflare can generate origin certs for
| exactly this purpose and you can add certs to dokku with `dokku
| certs:add myapp`
| throwitaway1123 wrote:
| Agreed. 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/
|
| Alternatively, you can use Cloudflare Tunnel, and then block
| all incoming connections.
| fideloper wrote:
| they 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 wrote:
| You 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.
| throwitaway1123 wrote:
| Yes, this is correct. If you're using IP address allowlists
| then you also have to check the Host HTTP header
| (Cloudflare won't allow their other customers to forge that
| header). Or, you can use mTLS (as another commenter pointed
| out), or tunnels (as I pointed out):
| https://news.ycombinator.com/item?id=26690388
| andybak wrote:
| Genuinely curious what the threat model is here?
| aftbit wrote:
| One might be avoid mass traffic interception due to malicious
| or corrupt BGP rules, either by accident or on purpose by a
| nation-state or telco. Another might be avoiding interception
| by your own ISP for various purposes.
| yunohn wrote:
| You can avoid both of those easily using Cloudflare
| Tunnels, which seamlessly works with their proxying CDN.
| password4321 wrote:
| Related 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
|
| > _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
|
| > _An open-source & self-hostable Heroku / Netlify / Vercel
| alternative._
| wirelesspotat wrote:
| Does 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
| IgorPartola wrote:
| I 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 wrote:
| I liked Dokku when I was still happy using docker, but since I
| started working on 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 wrote:
| Don'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 wrote:
| You 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.
| shepherdjerred wrote:
| Is 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 wrote:
| If 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 wrote:
| I mean "not having to learn Kubernetes" is surely a factor?
| 0xblinq wrote:
| It's like two orders of magnitude easier to setup and use.
| windowshopping wrote:
| I 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 wrote:
| Your 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 wrote:
| Or simply use traefik + app containers via standard podman +
| systemd integration:
|
| https://docs.podman.io/en/latest/markdown/podman-systemd.uni...
|
| https://traefik.io/traefik/
| simonw wrote:
| The 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/
| Kiro wrote:
| That's the opposite of simple.
| ledgerdev wrote:
| I 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 wrote:
| that'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 wrote:
| Dokku handles a significantly larger scope than the setup you
| describe, including a plugin ecosystem:
| https://dokku.com/docs/community/plugins/
| trallnag wrote:
| For personal stuff I always come back to Ansible and, if I want
| it containerized, Kubernetes
| aledalgrande wrote:
| Curious: 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 wrote:
| If 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/
| ilovebabyyoda wrote:
| minIO 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
| XCSme wrote:
| Total Annual Price > $48,000 $20.00/TiB/month
|
| That doesn't sound cheap...
| apitman wrote:
| I would guess GP was referring to self-hosting minio.
| apitman wrote:
| If 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/
|
| That should alleviate egress costs. Bonus that storage is also
| way cheaper.
| chasd00 wrote:
| A linode vm + dokku has supported my personal projects (for
| profit and otherwise) for years.
| b_shulha wrote:
| Dokku is great, but have you tried 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
|
| It covers usage of the 1-Click apps templates which speed up
| everything "a little bit".
| xrd wrote:
| I 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 wrote:
| I'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?
| ThinkBeat wrote:
| Looking 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 wrote:
| I'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 wrote:
| Same here,
|
| All I do on top of what you said is use Traefik for reverse
| proxy and let's encrypt.
| scottydelta wrote:
| Looks promising, I have been self hosting a lot of apps, this can
| make things easier.
| mike31fr wrote:
| How does it compare to Coolify? https://coolify.io
| cdubzzz wrote:
| I 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 wrote:
| I 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 wrote:
| I 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.
| 0xblinq wrote:
| Dokku 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 wrote:
| Is 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.
| ravxx wrote:
| just get good with docker and make a shell script to instantly
| create/update pre-existing docker images. you wont regret it.
___________________________________________________________________
(page generated 2024-08-26 23:00 UTC)