News for hackers. Stuff that matters.
Re:Ditching PaaS: Why I Went Back to Self-Hosting by davedx on Thursday January 18, 2024 @02:49PM (#39046685)
I've recently gone the other way. I was self-hosting everything on a DigitalOcean VPS, but keeping the OS maintained, and indeed the headaches of configuring Nginx, letsencrypt, postgres and so on became more annoying not less each time I wanted to make a new app, because every app was a bit different.

I'm now running my primary project on Fly.io and I'm pretty happy with it overall.

"No matter how small is the service, no matter how rarely you need it, you’d need to pay the full price."

On Fly.io I'm running an app server, a db server, and another app server with a 1GB volume for a Discord bot. Everything fits in the free plan.

The thing about PaaS is you really have to do your research. It's not like VPS providers where all you really need to look at is how much compute and storage you get for a monthly price. PaaS have a lot more subtleties and yes, it happens that the startups behind them sometimes blow up or get bought out by huge public enterprise companies. VPS providers tend to be lower risk.

The tradeoff is worth it for me, but it really depends on your skillset, your priorities and so on. I can maintain a VPS, but I have very limited time, so I want to focus every spare hour I have on developing my product.

Re:Ditching PaaS: Why I Went Back to Self-Hosting by takinola on Thursday January 18, 2024 @04:01PM (#39047668)
Interestingly, I have a very different experience than you. I simply have a script that sets up the server. I keep updating the script to make it better each time I hit an edge case. At this point, it's pretty bullet-proof. Updates are automatic and so I can leave the server running for months without any intervention.

Due to my love to shiny things, I keep wanting to find an excuse to move to a PaaS but I can never find a sufficient justification.

Re:Ditching PaaS: Why I Went Back to Self-Hosting by xrobledo84 on Thursday January 18, 2024 @09:08PM (#39050790)
How do you make your updates automatic?
Re:Ditching PaaS: Why I Went Back to Self-Hosting by takinola on Friday January 19, 2024 @12:46PM (#39058520)
Honestly, I can't remember exactly. I believe there are some settings in Ubuntu that apply updates automatically. I set just the security updates to reduce the risk of breaking something. The beauty of the system is that I can forget stuff like this and still get the benefit of my previous knowledge.
Re:Ditching PaaS: Why I Went Back to Self-Hosting by pdimitar on Friday January 19, 2024 @09:45AM (#39056054)
Is it a normal shell script or do you use something else?
Re:Ditching PaaS: Why I Went Back to Self-Hosting by takinola on Friday January 19, 2024 @12:44PM (#39058477)
It's basically a combination of documentation (Step 1: Do this, Step 2 Do that) and shell scripts wherever possible. I can just follow the steps and run the commands without thinking and go from a bare server to a fully deployed working app in about 20 minutes.
Re:Ditching PaaS: Why I Went Back to Self-Hosting by davedx on Saturday January 20, 2024 @02:16PM (#39071197)
My issue was that the ubuntu version my VPS was on went out of LTS so I had to do a full major OS upgrade which I kept keeping off…
Re:Ditching PaaS: Why I Went Back to Self-Hosting by takinola on Monday January 22, 2024 @03:12PM (#39094761)
LTS support lasts for 5 years so this works out to be a problem that happens twice a decade so I'm willing to put up with it.
Re:Ditching PaaS: Why I Went Back to Self-Hosting by tronikel on Thursday January 18, 2024 @03:16PM (#39047027)
Have you tried dokku?
Re:Ditching PaaS: Why I Went Back to Self-Hosting by wharvle on Thursday January 18, 2024 @03:29PM (#39047221)
I've been amazed at the resilience and convenience of a handful of shell scripts calling "docker" commands on Debian for my server at home.

- Figured I'd need to screw with Systemd at some point. Nope, whatever Docker's doing restarts my services on a system restart, and auto-restarts if they break. I haven't had to lift a finger for any of that. My services are always just there, unless something really goes horribly wrong.

- Which directories I need to backup is documented in the shell scripts themselves. Very clear and easy.

- Moving those directories and my shell scripts to another server, potentially with a different distro, would be trivial. Rsync two directories (I've put all the directories I mount in the docker images, under a single directory for convenience), shell in, run the scripts. Writing a meta-script to run all of them would be easy. On a VPS I could have everything that mattered on a network drive, and that'd make it even simpler. Mount network drive, run script(s).

- Version updates are easy. I can switch between "use the latest" and "use this specific version until I say otherwise" at will. Rollbacks are trivial. If the services were public-facing I could automate a lot of this with maybe an hour of effort.

- Port mapping's covered by Docker. If these were public-facing it'd be pretty easy to add one extra container for SSL certs and termination (probably Caddy, because I'm lazy, though historically my answer for this at paying gigs has been haproxy). Like, truly, the degree to which I can interact with and configure this system entirely by using portable-everywhere docker commands & config is very high.

I've been running servers (sometimes private, sometimes public) at home since like 2000, and this is easily my favorite approach I've used so far.

I've used stuff like Dokku at work. I dunno—it's another thing that can and does break. If you're just self-hosting a few services and aren't trying to coordinate the work of several developers, IMO it's simpler and not-slower to just use Docker directly.

Re:Ditching PaaS: Why I Went Back to Self-Hosting by josegonzalez on Thursday January 18, 2024 @05:51PM (#39049047)
Maintainer of Dokku here.

Would love to hear more about how Dokku broke as it will help me polish the project further :)

Re:Ditching PaaS: Why I Went Back to Self-Hosting by wharvle on Thursday January 18, 2024 @07:50PM (#39050211)
I just mean in the usual way that another component in the stack is another way for things to go wrong, another thing to update that might mean api changes that require further effort, and so on.

It was plenty solid, but I’ve definitely seen it fall victim to operator error :-) I’d certainly consider using it again to support a team, under the right circumstances.

Re:Ditching PaaS: Why I Went Back to Self-Hosting by josegonzalez on Friday January 19, 2024 @02:25AM (#39052581)
I would love to hear more about any issues you've seen in the past, feel free to message me :)
Re:Ditching PaaS: Why I Went Back to Self-Hosting by tstrimple on Thursday January 18, 2024 @09:16PM (#39050837)
> The thing about PaaS is you really have to do your research.

I find this true of pretty much all modern cloud development. So many people want to just pretend it’s another VPS alternative and are shocked that their misuse leads to high monthly bills. You need different patterns to take advantage of the strengths of PaaS cloud services and to avoid the weaknesses and gotchas. I PaaS all of the things that I can and my maintenance and support efforts have never been lower. My services scale to zero and I only pay for actual utilization.

If you’re standing up a lot of VMs in the cloud and pretending it’s just another data center of course you’re going to have a bad time and waste money.