The problem is that you will set up your first VPS by spending hours installing packages and tweaking configs by hand. But eventually you will need to upgrade the OS, or switch to bigger hardware, or change VPS providers. And then it’ll be a nightmare to recreate all that snowflake config elsewhere without forgetting some detail.
The upside is that it’s cheap and fast, especially compared to anything “serverless” that chargers per request.
With so many servers Ansible script would ocassionally fail on some servers (weird bugs, network issues, ...). Since the operations weren't always atomic we couldn't just re-run the script. it required fixing things manually.
Thanks to this and emergency patches/fixes on individual servers, we ended up with slightly different setup on the servers. This made debugging and upgrading a nightmare. Can this bug happen on all the server or just this one because it has a different minor version of package 'x'?
We switched to NixOS. It had a steep learning curve for us, with lots of doubts if this was the right decision. Converting all the servers to NixOS was a huge 2-year task.
Having all the servers running same configuration that is commited to GitHub, fully reproducable and tested in CI, on top of automatic updates of the servers done with GitHub action, was worth all the troubles we had with learning NixOS.
This entire blog post could be a NixOS config.
The fact that it's not hermetic and perfectly reproducible is a major problem for a fleet, but for single user it's a benefit. It offers a graceful migration path from a snowflake server to a managed server, and still works even if you can't manage to do 100% of the config automatically.
In a lot of cases, especially if you are gonna be moving between machines, rather than scaling horizontally, your machines don’t need to be reproducible. You can just restore a backup and tweak the new stuff (network configuration, etc). This gets rid of an entire class of complexity and lets you just do things once (rather than figuring something out and encoding into config management DSL).
If you actually need reproducibility, then it makes sense to go all the way. Something like NixOS provides stronger guarantees than Ansible. There is definitely a larger learning curve than Ansible though.
a link or a couple of words would be great -- might save hours.
Even well-written scripts will do! Just know - if you go with writing your own, you're doing something someone probably already did as a module.
With proficiency Ansible is like writing declarative pseudocode. Say what you want and a huge library of Python will 'make it so'.
Eventually you'll have a library of roles that don't care about the operating system, maybe even the provider.
A peer comment mentions docker-compose. That's fine, but I prefer Ansible -- the DSL can be made very similar with a role... and it's far more capable. Like preparing the runtime.
Why not something like docker-compose and put all of the config bits into a single repo?
That way you can clone the repo on a new server and simply rebuild the containers.
I don’t think there is a VPS provider that doesn’t use it.
Shouldn't the hosting provider have pointed me to it from the start? So weird!
Just get a gcp,azure or aws compute instance. Hassle is all you'll get with VPS these days.
I can't believe it is so hard to pay someone to provision a VM. They need my phone, i have to go through approvals and so much other bs. 4-5 years ago I was able to get a VPS and a domain with some bitcoin within a few hours. Now some places have the audacity to ask for ID verification.
prgmr.net (now tornadovps) accepts payment by check or money order, https://tornadovps.com/documentation/make-payment
I had trouble getting a CC payment to work with another small VPS host, and they let me pay in cash (literal currency through international mail), but maybe that doesn't count since I was an existing customer they were familiar with, not a new sign-up. But if you're trying to run stuff on VPS's and you don't have any existing hosting relationships and you're trying to pay with BTC, that sounds odd.
If your project fits in a "serverless" environment use Vercel or Netlify for free. If not, use the Fly free tier or pay a small amount of money per month. Use Supabase or Planescale for the db.
For the price of $0-5/mo* you can deploy whatever you like, without managing the infrastructure. Then you can focus on building whatever it is you wanted to deploy.
* The asterisk is of course that these services usually cost quite a bit more if your usage goes beyond the free tier, but you can always move to a VPS at that point.
A VPS takes some time to set up but over time can offset a lot of cost - keep in mind hosting is an ongoing expense, and handholding services can cost over 2x more (I would even say easily 10x more).
> you can always move to a VPS at that point
Then why not start there?
It can be very cheap and if you stick to static HTML or PHP, deployment is as simple as a SCP or FTP upload.
Plus you don't need to worry about configuring a VPS or keeping up with security updates.
It's a PaaS you can run on your own VPS and it is literally one command to set it up on a fresh Ubuntu instance. Disclaimer: I help co-maintain Piku.
I appreciate when people give me code that I understand and would have taken me longer to figure out on my own - but a complex non-standard tool is harder to adopt.
Inside virtual machines, there are rootless containers managed by systemd.
When I'm productive, I get to around 0.5-0.8€ a day of electricity costs with the PC, and gaming for just a few hours occasionally puts me above 1€/day.
Has the cloud killed this skillset? Seems increasingly less common these days.
And jumping into the VPS world, I have not encountered any of these - although I have tried to learn as much as I could. So the fact that it wasn't obvious to me that I should have used some simple tool is saying something about how easy these are to find!