top | item 41577156

Gentle Guide to Self-Hosting

325 points| kn81198 | 1 year ago |knhash.in

136 comments

order
[+] massysett|1 year ago|reply
I’m an old-timer, I’m surprised that paying for shared hosting is now “self-hosting.” Nothing wrong with that, but that would never have been called self-hosting ten years ago.

I guess it’s like how “cooking from scratch” evolved. A cookbook from the nineteenth century might have said “1 hog” as an ingredient and instructed you to slaughter it. Now of course you buy hog pieces on foam trays.

[+] apitman|1 year ago|reply
There are other issues with the terminology as well. The self hosting community (centered at /r/selfhosted) has a very technical vibe. These people enjoy tinkering with computers. They're like kit car builders.

But there's a whole market of people who could benefit from self hosting, but shouldn't be required to understand all the details.

For example, you can get many of these benefits by using a managed service with your own domain. Things like data ownership, open source software, provider competition, etc.

I think we need a broader term. I've been using "indie hosting" lately.

[+] kayson|1 year ago|reply
There are definitely plenty of people who would say that using a hosting provider doesn't count, even if you're deploying the software yourself.

The one generally accepted exception to this is network protection. You don't want to expose your home ip address to the outside world if you can help it, so a lot of people use tailscale, cloud flare tunnels, or a vps as a proxy.

[+] _heimdall|1 year ago|reply
I must be becoming an old timer too, I only really consider it self hosting if its on my own hardware.

In case that doesn't make me an old timer, I also actually have pork and home cured bacon in the freezer from hogs we raised and processed. "An old soul living in a new world" feels pretty fitting here.

[+] dylan604|1 year ago|reply
Hosting from home was always subject to home ISP ToS limits on doing that very thing. When I self-hosted in the early days, it was still paying someone to mount my system in their rack and use their network. So whether that was hardware that I rented from them, built the box myself, or using a VM they provide, it's still the same amount of work to maintain it. That's still different from using Wix/Squarespace, geocities, or using a social media platform.
[+] m463|1 year ago|reply
I agree with you.

and so does the author, kind of...

"And so, here is a gentle introduction to self-hosting that is not "true self-hosting", but whatever. Sue me."

:)

[+] chris_armstrong|1 year ago|reply
It's different degrees of the same thing I would have thought.

If you're running your own box, you still depend on network infrastructure and uplink of a service provider, whereas a cloud infrastructure provider may go the other way and negotiate direct connections themselves.

Plenty of valuable lessons await for those who even just provision a virtual host inside AWS and configure the operating system and its software themselves. Other lessons for those who rack up their own servers and VNETs and install them in a data-centre provider instead of running them onsite.

There's only so much you can or should or want to do yourself, and its about finding the combination and degree that works for you and your goals.

[+] bankcust08385|1 year ago|reply
Renting space in a colo and running EBGP on leased dark fiber to HE is real self hosting. VPSes while more convenient are definitely nothing like running metal.

For a lot of stuff that doesn't need constant public network connectivity, I choose to run a home lab.

[+] lelanthran|1 year ago|reply
> I’m an old-timer, I’m surprised that paying for shared hosting is now “self-hosting.” Nothing wrong with that, but that would never have been called self-hosting ten years ago.

Depends, maybe? Was the speaker talking about hardware or software 10 years ago?

Because, when I was given the 'self-hosting' option by some SaaS vendor, it meant that I could host it on whatever I want to independent of the vendor, whether that is a rack in my bedroom or a DO droplet.

When I was given the 'self-hosting' option by some computer vendor (Dell, HP, Sun, etc), it meant that I can put the unit into a rack in my bedroom.

Context was always key; in my mind, nothing has changed.

[+] diggan|1 year ago|reply
Seems to me the term "self-hosting" tends to auto-adjust its position based on the other end. So if "not self-hosting" is hosting on a shared VPS, then self-hosting is hosting on a computer at home. But "not self-hosting" has now become "hosted in cloud" so self-hosting moved to "shared VPS" instead, as the other end moved.

Kind of makes sense, but kind of also makes historical texts more difficult to understand. In the year 2124, who know what "self-hosting" meant in 2054? I guess it's up to future software archeologists to figure out.

[+] ang_cire|1 year ago|reply
If you are using a hosting provider, you are by definition not "self hosting", since you are in fact, not hosting (unless you happen to own the hosting provider company).

I actually self-host tools, and that involves having (in my case) a couple of rackmount servers in my spare bathroom, and an rPi5 with a 4x m.2 hat on my desk. Hell, even just running stuff on your own desktop/laptop is self-hosting.

But PaaS and SaaS are just as not-self-hosted as IaaS is. It's literally cloud hosting.

[+] bityard|1 year ago|reply
I have always understood self-hosting to mean being in charge of your applications and data instead of delegating it to a company. An example might be, setting up Nextcloud instead of Dropbox. Or Taiga instead of Trello.

WHERE and HOW it is hosted, is less important to me. Because if you self-host your own tools, you can freely pick them up and move them to any hosting provider, a cloud provider, or a Raspberry Pi in your basement. Self-hosting FREES you from infra/vendor lock-in.

[+] hk1337|1 year ago|reply
I'm not sure what your classification of "old-timer" is with how it compares to me but I would think of myself as an old-timer as Gen X.

I feel like there's another term for what you're thinking of but I cannot come up with what it is.

Self-hosting definitely was locally hosted on your own hardware back when hosting providers like Linode, Digital Ocean, AWS, etc existed or were as customizable.

Even corporations "self-host" GitHub Enterprise or Gitlab when they set it up on AWS. Self-host just means you're not reliant on creator of the application to host it for you and manage the server.

There are certainly advantages and disadvantages to self-hosting on your own hardware, as there are to using a hosting provider.

[+] koziserek|1 year ago|reply
Indeed nowadays killing an animal is hidden behind industrial vail.

Unfortunately, it also normalized and further desensitivied us to the topic.

Though I'm quite happy to see that eating sentient beings gets out of fashion, at least in developed world.

[+] eximius|1 year ago|reply
Every time this sentiment comes up I'm reminded that it's a spectrum.
[+] nashashmi|1 year ago|reply
On-cloud self host is where you rent out a vm or full physical machine and then upload your stuff on there. Easy peasy lemon squeezy.
[+] j45|1 year ago|reply
Hosting software yourself is a step towards more.
[+] hoosieree|1 year ago|reply
Yeah, my list of requirements for self-hosting starts with:

1. battery backup

That said, I'm not zealous about it. "Perfect is the enemy of good" and I like ecosystem diversity in general. Better to have a few dozen shared hosting providers than 2 or 3 monopolies.

[+] asar|1 year ago|reply
Love self-hosting and really got into it over the last couple of months. I run a bunch of services for my company now and also in my home lab. I use a Hetzner VPS and provision things either via ansible + docker compose files or via https://github.com/coollabsio/coolify/.

The awesome-selfhosted repository is also a great place to find projects to self-host but lacks some features for ease-of-use, which is why I've created a directory with some UX improvements on https://selfhostedworld.com. It has search, filters projects by stars, trending, date and also has a dark-mode.

[+] user_7832|1 year ago|reply
Since you seem knowledgeable on this topic I'd like to ask - how risky is it to expose a computer on your network to the internet, if you're somewhat tech-savvy but not very familiar with networking? Is it relatively "safe" with modern tools and VMs or do you need to stay on top and (for eg) always ensure you're updating software weekly?

I've thought of setting up and running a server for a long time and finally have a spare laptop so I'm thinking of actually running a NAS at least.

[+] bongobingo1|1 year ago|reply
Hm, is there a name for the type of software that Coolify is, where it presents a management plane for other servers, vs Dokku where it runs on the server?
[+] from-nibly|1 year ago|reply
> Practically, it is foolishness, for what you save in money you lose in time and sanity.

Kubernetes gets a lot of side eyes in the self-hosted community. That's all of self hosting though. So why not go all in?

I've got 3 dell r720XDs running nixos with k3s in multi master mode. It runs rook/ceph for storage, and I've got like 12 hard drives in various sizes. My favorite party trick is yoinking a random hard drive out of the cluster while streaming videos. Does not care. Plug it back in and it's like nothing happened. I've still got tons of room and I keep finding useful things to host on it.

[+] kayson|1 year ago|reply
Plenty of people use k8s or k3s for self hosting. But for most, the added complexity doesn't buy enough for the trade-off to be worth it. Keep in mind most people have a single node, so docker does everything they need.

Personally, even with a 4 node setup (of tiny desktops; the hardware you have would easily cost me $200/mo in power bills), I use docker swarm. Old and unloved, but does everything I need for multi node deployment and orchestration with only a sliver more complexity than vanilla docker.

[+] Cyph0n|1 year ago|reply
I just use NixOS as a VM and run services as containers directly. Self-plug: I wrote a tool that makes it easy to run Docker Compose projects on NixOS [1].

This way, I get the advantages of NixOS config, while also being able to run arbitrary applications that might not be available on nixpkgs.

As far as storage goes, I just use ZFS on the hypervisor (Proxmox) and expose that over NFS locally.

[1] https://github.com/aksiksi/compose2nix

[+] jamwil|1 year ago|reply
For a homelab k8s is way overkill. I do it because self-hosting is 1 part utility to 2 parts education.
[+] meonkeys|1 year ago|reply
The author nails it here:

> It is 2024, and I say it is time we revisited some of the fundamental joys of setting up our own systems.

Self-hosting really is joyful. It's that combination of learning, challenge, and utility.

+1 to Actual Budget

+1 to Changedetection.io

-1 for not mentioning threat modeling / security. The author uses HTTPS but leaves their websites open to the public internet. First-timers should host LAN-only or lock their stuff way down. I guess that's tricky with shared hosting without some kind of IP restriction or tunneling, though. No idea if uberspace offers something like that.

For folks getting past the initial stages of self-hosting, I'd really recommend something like Docker to run more and more different apps side by side. Bundled dependencies FTW. Shameless plug for my book, which covers the Docker method: https://selfhostbook.com

[+] RajT88|1 year ago|reply
I'm with the other old timers.

If it's not your hardware running in a space you own or rent, you're not self-hosting.

Currently I have a little Micro-ITX box. But once upon a time I had a proper server rack with 6 U worth of servers, UPS, networking, etc. (Before I was married...)

[+] arrty88|1 year ago|reply
I'm a big fan of self hosting. I have learned a lot on a small hobby project.

for those who are curious about my setup, I bought a used Dell R630 on ebay for cheap. 1tb raid 1 on ssds, 32gb ram, 32 cores, and i am enjoying running a few small hobby apps with docker, virsh, and minikube (yes i learned all 3). I have a 1gbps fiber connection. I use a 1m cronjob to detect if my IP changes, and i use the linode api to change my DNS A records.

[+] cutler|1 year ago|reply
1.5Gb RAM/10Gb disk? Hetzner's basic cloud VPS comes with 4Gb RAM and 40Gb disk for E4.51.
[+] tarruda|1 year ago|reply
AFAIK Nothing seems to beat Oracle cloud: https://www.oracle.com/cloud/costestimator.html

For compute:

"Each tenancy gets the first 3,000 OCPU hours and 18,000 GB hours per month for free to create Ampere A1 Compute instances. This free-tier usage is shared across Bare Metal, Virtual Machine, and Container Instances."

For block storage:

"Block Volume service Free tier allowance is for entire tenancy, 200GB total/tenancy. If there are multiple quotes for the same tenancy, only total 200GB can be applied"

In other words: you have a 4-core ARM CPU + 24GB RAM + 200GB space for free.

[+] Ringz|1 year ago|reply
Do you have an eye on the (potential) price difference?
[+] tonymet|1 year ago|reply
spoiler alert, the article isn't about self-hosting, it's about shared-hosting
[+] Havoc|1 year ago|reply
But then someone whispers K8S into your ear…
[+] jasonjayr|1 year ago|reply
That reminds me ... I have to go feed my homelab K3S cluster some updated CRDs to plan for the next upgrade window ...
[+] chadsix|1 year ago|reply
I am part of a company that promotes self hosting and provides external routing for self hosting [1]

We made Cloud Seeder [2] an open source application that makes deploying and managing your self-hosted server a 1-click issue!

Hope this comes in handy for someone! :-)

[1] https://ipv6.rs

[2] https://ipv6.rs/cloudseeder https://github.com/ipv6rslimited/cloudseeder

[+] xiconfjs|1 year ago|reply
From the FAQ: * Q: "What about IPv4?"

* A: "While IPv4 is still widely used, its necessity is diminishing as the world transitions to IPv6. (...)"

;)

[+] DanAtC|1 year ago|reply
I like the concept, but only 5 IPs? With IPv6 you should be offering at least a /64 per tunnel.
[+] crossroadsguy|1 year ago|reply
I loved the idea of PikaPods until I realised even if I use 10 small (no tiny) instances/services and that too just for me to be used really really rarely) I was getting into integral USD x 11 (or whatever the number is) cost. Can't blame them because it costs money to run things. But I would have rather preferred something that isn't that costly or doesn't go up in prices with number of services/apps used. I wish there was a cost effective solution for this self/web/app hosting.
[+] leosanchez|1 year ago|reply
Miniflux is very good. It even has a telegram integration which will send you notification whenever a new article is published
[+] loremm|1 year ago|reply
in general, it's worth noting telegram bots are easy (free) to make and messages can be sent with one cURL command. Very useful, you can even set it up to send after long terminal commands so you know to check back
[+] johnklos|1 year ago|reply
It's a good writeup, but I do take exception to this:

"Seriously, else-hosting is the practical option, let someone else worry about the reliability, concurrency, redundancy and availability of your systems."

Spend one time trying to get through a maze of automated phone answering systems, then try to ascertain whether the human, when you finally get them, even understands the issue, then wonder how much of what they're telling you is to just get you off the phone, all the time wondering if calling even really does anything, and you'll wonder whether it's better to blindly trust a company that likely doesn't have tech people we're allowed to talk to or to just do it ourselves.

At least when there's an issue with my things, I can address it. Although a bit of a tangent, I'd love to see a review of major hosting providers based on whether you can talk to a human, and whether said human knows anything at all about Internet stuff.

[+] w10-1|1 year ago|reply
OK:

    This has not been a detailed step by step walkthrough 
    on how to do things, by design. You are meant to go and explore; 
    this is simply a way pointer to invigorate your curiosities
Sorry, but because I came looking for solutions, I found the invigoration aggravating, but then helpful in focusing my attention.

Scalable services and sites I can build, 10 different ways.

My enduring, blocking need is for dead-simple idiot-proof network management to safely poke a head out on public IP from home. And to make secure peer-to-peer connections. Somehow that process never converges on a solution in O(available) time.

</complaining>