Live data from Hacker News

Ask HN: Please recommend how to manage personal serverss

news.ycombinator.com

51–60 of 67 posts

Re: Ask HN: Please recommend how to manage personal serverss

#51

Docker-compose and be done with it. Kubernetes and NixOS are great and more powerful than docker compose, but the learning curve is longer. Feel free to graduate to k8s or NixOS, once you are up and running with compose. Docker compose has the most tutorials, YouTube videos, the widest support among projects you want to self host, and many more people who can readily advise you on troubleshooting. Check out r/selfhos…

+1 to all these recommendations, and the ordering in terms of (time/money) investment, inclination, and synergy with projects at work. Compose is just the right fit for a small to medium setup and a great place to start.

Re: Ask HN: Please recommend how to manage personal serverss

#52

Opinionated take: "a couple of home servers" are probably the wrong solution to your problem. Almost everything you do as a private person works better, faster, more reliably, and with much less time investment if you use a single machine for it.

And this single machine could run Qubes OS, which runs many VMs with a great UI and strong isolation. My daily driver, can't recommend it enough.

Re: Ask HN: Please recommend how to manage personal serverss

#53
post #41
post #36

I wouldn't go the route and use a VPS for personal stuff, ever. Or a Cloud Provider for that matter. Find a Hoster which offers you a shell login where the Hoster manages close to all services you need, including backups, security updates and so on. That should massively simplify your setup.

Funnily you've mentioned, I explored this route and found one 'normal' web hosting that provides an SVN repo. But in my case, I need a Git hosting to collaborate with friends on private stuff (I don't like an idea of my code being fed into an LLM by GitHub) and a VPN for travels, so VPS is a requirement, unfortunately.

this might help with the VPN needs: https://github.com/lattice0/true_libopenvpn3 git also doesn't need a special server.

Re: Ask HN: Please recommend how to manage personal serverss

#54
post #9

Kubernetes. No, seriously. It's an orchestration tool that's common in the real world, and also notoriously hard to learn and "get right". Downtime due to obvious, important mistakes is common, and it leaves both engineers and lower management wondering if it was a good idea to adopt. The thing is, in your home environment, you have no (or hopefully significantly lower) uptime requirements. If you break the entire cl…

I've always struggled with how to get started. I get lost in picking which CNI(?) I need and how to manage stateful storage. Do you have any pointers towards how to get going?

I agree that k3s is a great way to get started. You can easily bring new nodes online and upgrade them.

If you want your Services to behave a little bit more like physical boxes or VMs, where each service gets its own IP address (instead of using an ingress controller or service mesh, which are different beasts entirely), have a look at MetalLB. MetalLB allows associating an IP address on your home network with a Service, which is more or less exactly what you'd do with a VM or a Raspberry Pi.

Re: Ask HN: Please recommend how to manage personal serverss

#55
post #33

Earlier quoted context omitted.

This. Also, why run different OSes on your machines? And why the need to reinstall stuff? I just run Arch on everything, and I haven't had to reinstall a machine in many years.

I can't install Arch on OVH Cloud. It's by far my favourite distro, tbh.

There is one solution I've seen being used to solve this issue.

It is to overwrite the current Linux OS with the one you want. I came across this idea here [0]. I researched and got Alpine Linux running on Hetzner (even they don't support custom images) using a similar method [1].

This seems to be the guide to do the same with Arch Linux [2], I'm not sure though.

Once you do create a successful Arch image on OVH, take a snapshot of the machine before installing anything else, in case you want to start from a fresh Arch image in the future.

[0] https://github.com/elitak/nixos-infect

[1] https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux...

[2] https://wiki.archlinux.org/title/Install_Arch_Linux_from_exi...

Re: Ask HN: Please recommend how to manage personal serverss

#56
post #2

I was going to suggest NixOS. It's a bit of a climb to learn it, but having a modular setup that works with all my devices is absolutely a killer-app. My desktop, laptop, VPS and Raspberry Pi all share the same terminal configuration from the same Git repo. Waxing poetic about NixOS on HN is a horse well-beaten. Just try it, if you've got an extra machine laying around and a few hours to spare. I think it's a great h…

I strongly agree. NixOS is a league above things like Ansible that are highly mutable. Also getting started with NixOS really isn't that bad. Just read the wiki and set a few options. https://search.nixos.org/options The hard part about NixOS is when you need to package something yourself. That can have a bit of a learning curve but since nixpkgs is the largest package repository you rarely need to do it. If you are…

Agreed fully! Just got finished packaging up a few desktop apps for the first time on NixOS and it wasn't as bad as I expected.

My biggest issue with Nix (as is everyone's I hear) is the mediocre documentation. It takes a lot of wheel-spinning to get up-to-speed with PKGBUILD or makefile knowledge. A lot of that difficulty curve could be remediated with better, flake-focused packaging tutorials. Surely though, that too will be Coming Soon™.

Re: Ask HN: Please recommend how to manage personal serverss

#57
post #34
post #2

I was going to suggest NixOS. It's a bit of a climb to learn it, but having a modular setup that works with all my devices is absolutely a killer-app. My desktop, laptop, VPS and Raspberry Pi all share the same terminal configuration from the same Git repo. Waxing poetic about NixOS on HN is a horse well-beaten. Just try it, if you've got an extra machine laying around and a few hours to spare. I think it's a great h…

Most cloud providers don't provide NixOS, e.g. I use OVH Cloud. IIUC, there is a way to run a script that will delete my OS and install Nix, but I think there might be side effects like cloud-specific network setup which will probably be too much for me :) Edit: But NixOS looks really good, I have to agree. I guess 'immutability' will let me just install and forget about it.

> IIUC, there is a way to run a script that will delete my OS and install Nix

There is! It's a fucking nightmare: https://xiaoyehua.dev/posts/nixos-on-oracle-arm-machine

It works though, and thanks to the genius that wrote this script I've got a 4 core 24gb Oracle Always Free instance loaded up with NixOS at all hours of the day. I feel spoiled.

Re: Ask HN: Please recommend how to manage personal serverss

#58
post #4

Maybe containerize most things since distros change a lot between releases. That way you can keep your distro on the latest version and even switch distros without too much impact.

what does "your distro" mean here? the distro in the container, or the container host, or the client host? containers are just a packaging/isolation technique. you can keep using an obsolete stack in a container, regardless of what changes outside it. rebuilding containers from scratch is certainly not easier than rebuilding an install via ansible.

> what does "your distro" mean here? the distro in the container, or the container host, or the client host?

Container host.

> rebuilding containers from scratch is certainly not easier than rebuilding an install via ansible.

How so? The OP is giving an example of ansible scripts breaking because of OS version change, and having to fix them. With containers, the container OS is very slim, so fewer things to break with upgrades, and you can upgrade the host OS easily since docker is quite stable across OS versions.

Re: Ask HN: Please recommend how to manage personal serverss

#59
post #46
post #6

Earlier quoted context omitted.

Oh and if you don't want to go full nixos, you can just install whatever the base image for your server from the provider and run nix as a separate install for your applications.

This is quite interesting, thanks for recommendation, I'll investigate this. Are you aware of any edge cases or inconveniences of this approach I can keep in mind while experimenting?

Well nixos is really great if your package and options are already thought through by the maintainers, although you might have to read through nixpkgs for options. It's more painful if you need X compiled with Y enabled and it needs to rebuild (might be slow on vps), and if your package isn't included at all, it can be a pain to add a new one and get all the dependencies included.

Once it works though, it basically never breaks - you can always pick an older working version.

Oh and it eats disk space like there's no tomorrow if you have multiple generations retained.

Re: Ask HN: Please recommend how to manage personal serverss

#60
The hard part here is idempotency. Ansible is great for a programmer because it's learning for fun. And you just have to spar with your machine to get good.

But for a non-programmer, it's understandable you don't want to be bother with the inner workings of your OS and how to maintain Ansible script idempotency.

And for every piece of software you want to run on your server, the idempotency task grows more difficult.

My honest opinion? Tolerate the learning curve for docker-compose. Each application you need can be managed and tweaked in isolation. Troubleshooting "works on my machine" problems will cost you more time in the long-run. You can't anticipate all the weird interactions between your programs and the os. Being able to nuke the setup and rebuild from scratch is your most valuable tool.

- thin base os (install just enough to run docker-compose)

- maintain images for each of your apps you need.

- mount the essential volumes of each image to well known location on your hard drive to make manual backups easy.

Post reply on HN