Tunneling have some advantages:
- you don't expose your home IP
- you can move your hosting easily (you could even have it in your phone)
- you can host bigger stuff that you couldn't pay or would be too expensive "in the cloud" (you home NAS, a rack of servers, home assistant)
- you could setup just one vps gateway with nginx or traefik and then set a bunch of tunnels for all your friends or several different sites...
It has some interesting uses.Maybe you need better resources than a cheap VPS can offer, i.e. an experimental app that likes a chunk of RAM and IO so won't be happy on an oversold & contended host, but doesn't need low latency or massive bandwidth¹ so is happy with the connectivity found on such a cheap service.
Another consideration is that if the VPS host dies and you are just using it as a proxy/tunnel, all you need to do is sign up for another, change DNS pointers and perhaps VPN config, and you are back up and running: no extra app/stack configuration needed, no need to restore content from backups⁴ to the new location, ete., so time+faf to service restoration is short.
----
[1] It doesn't apply to all locations, as some are lucky to be in places where there has been sufficient infrastructure investment for FTTP to be inexpensively available, but for a lot of people a key limit to self-hosting is an asynchronous link: I know many with 1.4mbit or noticeably less upstream from home, the best I can reliably get here² is ~14mbit³ upstream. Most VPS providers that aren't ridiculously oversold can give you that, so their network would not be the outgoing connectivity bottleneck.
[2] York, UK, not far from the city centre. FTTP is available in parts of the city and outskirts, but rollout is glacial so won't be near me any time soon
[3] g.fast is available from the exchange/cab I'm connected through, but it is hit-and-miss and there is a risk I'll get less out of the nominally 150/30 standard than I do out of the 80/20 one.
[4] though obviously: still keep good backups!
I am confident that my VPS provider (DigitalOcean) can maintain VPSs' better than I can (or want to), for example: automigrate for hadrware faults, cheap daily/weekly backup, and making sure it's up & running after power cycling the home (which is an infrequent but not unheard of situation where I live).
Even for beefier setups, Hetzner (my go to provider for dedicated hw) still looks more appealing than setting it up at home, when I calculate hardware cost. If you have spare hardware sitting unused anyways, I'd agree.
But on the main point we agree - if you know how to administer a server, it's easy to host, either home or on a VPS.
The main drawback I see for common people is that they aren't gonna read up on nginx and postgres configs or set up minikube locally. That requires one-click setup for local use.
That one can be complex. My home server does mainly private stuff so external bandwidth/latency isn't a big issue. Even accounting for cycling drives out¹² and other involuntary maintenance³ the cost of putting the machine together and keeping it running is lower than I'd have spent on the monthly costs of a similarly specced machine with a good provider.
Power costs have made me reconsider that a bit in recent months, but hosting providers are putting up prices as they are subject to similar cost increases too so I'll wait a bit and see how that settles before making major changes.
----
[1] I've had a few failures over the years, though thanks to RAID I've never actually lost data due to that⁴.
[2] Also for space upgrades, but that is an issue for externally hosted options too.
[3] The PSU went fzzzt early last year.
[4] Actual (temporary) data loss due to human error has occurred, but backups resolved those occurrences.
This is the better option sometimes.
Buying multiple TB of storage in the cloud will typically be more expensive, whereas you can have ample storage locally on the cheap. The same goes for CPU/RAM, which you'll need for some applications (like local runners for CI servers) or games. Furthermore, you might prefer that the data stay on your local device for whatever reason (either there's a lot of it, like a voxel video game world files, or something else).
My current homelab setup would cost me hundreds of dollars per month from AWS/GCP/Azure, even though it's just devices that would otherwise be e-waste. The round trip time between my local devices and where the servers are is around 20-30 milliseconds, so not at all bad, even decent for gaming.
It's also far more cost effective than buying a static IP from my ISP and if someone DDoSes me, the VPS will probably be the first to crumble (though this is not guaranteed), which is an acceptable failure mode.
Of course, for things that need better uptime, just going for the VPS directly is generally a good idea.
At that point, you might as well host it on that cheap VPS instead of at home.