Live data from Hacker News

Self hosting in 2023

grifel.dev

291–300 of 307 posts

Re: Self hosting in 2023

#291

Earlier quoted context omitted.

> even Germany has average upstream speeds of 20mbit/second nowadays [1] Is it common for EU countries to not have symmetric gigabit fiber?

Going from 1000/50 to 1000/1000 would cost me an 860€ premium right now (Germany) and this is a good offer, it can get more expensive without special promotion.

It got better with fiber in my area. Now 1G symmetric is available for 199€ per month.

Re: Self hosting in 2023

#292

I pay a data center a hundred or so dollars a month and put a server running nginx and my nixos mailserver. No downtime. Power is guaranteed with an sla and it's faster than anything. Why bother self hosting at home when you can just do it for real by paying the same price as an internet connection?

Because I will be paying for an internet connection regardless and my Pi hasn't had any downtime for the last two years, and its 8 years since I last had a power cut.

I live in the PNW where down trees regularly kill my power for days. If your power is reliable, and your internet connection is good, then go for it.

Re: Self hosting in 2023

#293
post #225

Earlier quoted context omitted.

This. I have anywhere access to 5 machines, way more storage than I need, and 100% control of everything that goes on in the network.

For someone who knows nothing about self-hosting, where should I start? I'm a self-taught junior dev but haven't had a chance to dabble with any aspect of deployment yet... willing to learn though.

You can check out some selfhosting communities for ideas, help or to lurk.

https://www.reddit.com/r/selfhosted/

Setting up your own DNS like pihole and a personal vpn to enable you into your home network when outside is usually a good starting point. Or even simpler and potentially useful setup your own gitea instance, it's easy just use the sqlite backend.

Re: Self hosting in 2023

#294
post #77

Not sure why you'd self-host a public site from home when you can get a VM from https://www.hetzner.com/cloud for € 4.81 /mo (1vCPU / 2GB RAM / 20 TB bandwidth) with much better internet access. Residential internet connections are more unreliable, have poor upload speeds and requires running a server 24/7 with ongoing electricity running costs. Or if it's a static rendered website you can publish on GitHub Pages for…

He said it’s a static page too… don’t even need a VM. He can just dump it into Amazon S3 and put cloudfront on top of it. Unlimited scaling across the globe, 1TB free of data transfer, free SSL.

Re: Self hosting in 2023

#295
post #93
post #70

Earlier quoted context omitted.

Wait how do you add text compression?

Generally, you add mod_deflate, or a similar package, to .htaccess and add the mimetypes on a new AddOutputFilterByType line along with the algorithm. This is one page [1] that describes the process for apache or nginx, though there are millions of webpages that give various methods. [1] https://blog.hubspot.com/website/gzip-compression

Thank you. I thought somehow it was supposed to be done client side. Although tbh I hadn't heard of mod_deflate either.

Re: Self hosting in 2023

#296
post #252

Earlier quoted context omitted.

This is sort of true of owning a car or a home or basically anything. Of those things, my server requires by far the least amount of maintenance (even considering needing to take a day to do something more invasive maintenance once two years or so). I also think it's perfectly fine if my site is down for a day or so because I'm away on travel and it's gone offline. 89.9999% has five nines as well.

> I also think it's perfectly fine if my site is down for a day or so because I'm away on travel and it's gone offline. 89.9999% has five nines as well. I think this is the key takeaway: host at home unless you want good uptime. I don't host from home when I want the page to be available even if: 1. There's a power outage at my home 2. I need to e.g. change a lightbulb, so I have to turn off the power (and therefore…

> host at home unless you want good uptime.

It doesn't even really take much to get 99.999% uptime from a home server. I have my server, cable modem, router, and firewall plugged into a small UPS that can keep everything going for about 30 minutes if the power goes. I've never had downtime due to power interruptions.

If I lived in an area where the power was less reliable, I'd use a bigger UPS.

In order for someone to accidentally switch off a critical piece of equipment, they'd have to go to my closet and remove all of the boxes and other crap I have stacked in front of it in there. Not likely to happen by accident.

Re: Self hosting in 2023

#297
post #235

Self-hosting is weird. I hear a lot of people say it's so much work, but I put like an hour a month into my server at most. I think it's mostly fine from an administrative standpoint, as mentioned elsewhere, not much has actually changed from 2003. You definitely don't need kubernetes. If anything, I think most of what's changed since then is that there's been a flood of bad sysadmin advice making people believe they…

I don't think people usually complain about it being too much work in a sense that you have to put in several hours a week. People usually even like the initial setup procedure because it's fun. When I was studying self-hosting things was just another hobby. For me it's now more about always having it in the back of my mind that I should do regular updates, make sure the disks are fine and everything is healthy. If s…

> having it in the back of my mind that I should do regular updates, make sure the disks are fine and everything is healthy.

All of that can be easily automated. If my system starts getting flaky, I get an email telling me well before it actually fails. Theoretically, if an automated update fails, I'll be notified of that as well, but that hasn't happened in 15 year or so, so it's been a while since it was tested.

Re: Self hosting in 2023

#298
I've been self-hosting since 2003 - starting with a repurposed Pentium 1 sitting under my bed, with Slackware still installed through tons of floppy disks. And by this day I host ~30 services. My two cents:

- Mileage may vary. I see plenty of people self-hosting their SearX(NG), Miniflux, Wallabag, Grafana, PiHole instance on a RPi at home. And that works perfectly fine: those services are relatively lightweight, they don't take more than a few tens of MBs of RAM, installing them is usually as easy as a docker pull, and they aren't too bandwidth-hungry for a decent home connection. Jellyfin? Sure, but streaming high resolution content may warm up the RPi quite a bit. NextCloud? Hmm, it starts to be a bit borderline for a RPi at home - especially if you don't add some decent fast external disks. Matrix? Hmm, that starts to be a heavy beast - and if you decide to federate your server it may eat a lot of bandwidth and disk space. Mastodon, or anything involving federation on scale? Unless you're ready to add a few GB of storage every couple of weeks and can receive and content very fast, it may be a problem (and it also takes 1.5 GB of RAM to run a small instance of my server). Keycloak, ElasticSearch, Kafka or any fat beast running on a fat JVM? At least 1 GB of RAM goes to run each of these beasts. Bitwarden? The latest versions will freeze everything unless MSSQL can allocate at least 2 GB of RAM at startup. So do you want to run your personal website or a few small services on your RPi at home? You can probably do it. But self-hosting other popular services will require you either more CPU power (and, in most of the cases, still an x86 architecture), more memory, more/faster disks, more bandwidth, or all of them.

- I've reached a balance where I run my small services (SearXNG, Miniflux, Wallabag, PiHole, Gitea, Grafana etc.) on a RPi. The medium ones (Jellyfin, NextCloud, Matrix, Keycloak etc.) on a Celeron mini-PC with SSD disk and ~10 TB of storage attached. Those that take >1.5 GB of RAM (like Bitwarden and Mastodon), or need to be accessible even if my house goes on fire (like Bitwarden itself, the main node of my VPN and the git server with all of my synchronized configurations), or eat up more bandwidth than my house could handle (like Jitsi), are running on a couple of Linode servers outside of my network. And, as the traffic for some of those services starts to increase, I'm even considering using Cloudflare.

- I agree with what other people mentioned in this topic: you don't need Kubernetes for everything. Sometimes Docker/Podman containers managed by systemd services are more than enough. I personally like to run Arch whenever I can - there's an AUR package literally for everything, and a wiki page for nearly everything. Then you don't need to waste extra disk space to host a lot of Docker images. All the configuration files are stored on an external git server connected over VPN. So bootstaping a system or moving/copying services is usually as simple as running a git clone and running a couple of Ansible playbooks to automate the deployment. Sure, Kubernetes can help, but it's just one among the possible tools that you have in your box.

Re: Self hosting in 2023

#299

Earlier quoted context omitted.

Even from the client side, CGNAT can break a lot of things. I'm very glad that my mobile provider gives me IPv6 as well - that allows me to get to my home systems without any NAT in the way. Even hotspot clients get an IPv6. Of course, IPv6 is its own can of worms, but (cross my fingers) it's working for me.

CGNAT is both amazing and shocking. Amazing in that it kinda works. And shocking because the average person will never know why their shit is broken. For me it broke online gaming. Luckily my ISP simply gives a static-ish IP to anyone who has an issue with CGNAT. But some ISPs force you to pay for a static IP, and some don’t even offer static IPs. I mean, I’d pay, but soon that won’t even be an option. It’s scary.

For me 2023 is exactly like 2003 from this point of view: a dynamic DNS account with inadyn/ddclient to refresh it when the IP changes, and it's almost like having a static IP.

Even better if you have e.g. a Linode or any server with a public IP that can run Wireguard or OpenVPN. Then you can run your own VPN server, configure your DNS, and connect to anything from anywhere.

Yggdrasil (https://yggdrasil-network.github.io/) is also another interesting IPv6-based solution - I have played with it a bit, but I still prefer to use my VPN, and do nginx reverse proxy from my Linode to my network over VPN when needed.

Re: Self hosting in 2023

#300

Self-hosting is weird. I hear a lot of people say it's so much work, but I put like an hour a month into my server at most. I think it's mostly fine from an administrative standpoint, as mentioned elsewhere, not much has actually changed from 2003. You definitely don't need kubernetes. If anything, I think most of what's changed since then is that there's been a flood of bad sysadmin advice making people believe they…

Why not just disable signups to your Gitea? E.g. just invite people to it who you want on it, if anyone.
Post reply on HN