Live data from Hacker News

Ask HN: Please recommend how to manage personal serverss

news.ycombinator.com

21–30 of 67 posts

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

#21
NixOS or Guix Systems are the less archaic way, civilized people (Lisp vignette here) have in 2024 to manage digital life. Learning Nix is a pain but learning enough to been able to run a PERSONAL infra it's not so challenging.

Trying to replicate "the cloud" at home is a nice way to tie their own genitals, hang some loads than start jumping.

Said that: do not use Raspi or NAS, assemble a small desktop, it can be a NAS, a router, a server for any kind of service and it's just common commodity hw, the best supported in the FLOSS world, the quickest to be replaced/the cheap for spare parts. Desktop iron today does not eat that much electricity and have enough for most common needs. And using NixOS or Guix System you do not need to run a gazillion of stuff just to show a damn hello world, so you can milk you hw as needed.

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

#22
Ansible has been better than Chef and Puppet for small environments. I looked at cdist but it wasn't faster for my use case. Also, Ansible executes rules ordered unlike Chef and Puppet which helps reduce your state space. If you incrementally maintain servers, by definition, your only tested configuration is the one you executed. The way to improve reliability is to start from the same (container) state, and now the only maintenance ought to be changes (OS upgrades has been it for me). Ansible across 1 server and 2 desktops with no changes takes ~3m17s and I wish it was way faster. As of know I manage with tagging things and only running a subset of things. Consider standardizing on a single distro (I use Debian and it's served me extremely well over the years). +1 on centralizing, too, till you have an use case that requires more servers. servers <= containers. Simplify. Kubernetes is complicated.

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

#23
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 running custom stuff you can always start by just using NixOS to run a Docker container. At least that will be a reproducable OS and if you pin a specific image it will be fully reproducible. Then when you want to you can dip your toes into native Nix packages. (It really isn't that bad, just an extra thing to learn that you can defer to start)

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

#24
post #3

It'll take some time to setup but NixOS with nixops and maybe disko can do a lot depending on your use case.. I just use NixOS flakes with a syncthing'ed flake repo across 5 hosts (desktop, laptop, a media device (NUC7), a home server and a VPS). It has its problems, but I'll iron them out eventually. As always start small...

I can't recommend nixops anymore. It is basically unmaintained. But I switched over to https://colmena.cli.rs/ and it is basically a drop-in replacement if you are just managing machines over SSH. (It lacks some of the tools to provision resources like VMs and DNS records)

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

#25

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.

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.

Only reason I can think of is running native ZFS on the BSDs.

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

#26
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?

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

#27

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.

Only reason I can think of is running native ZFS on the BSDs.

The ZFS support in Ubuntu has been totally fine for me on my home server. (Boots off of a different ext4 ssd and I have two big spinning disks for my zfs pool)

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

#28
Depends on what you are doing. But you can take the path of app / os images.

My home network is just openwrt, and I use make plus a few scripts and imagebuilder to create images that I flash, including configs.

For rpi I actually liked cloud-init, but it is too flaky for complicated stuff. In that case I would nowerdays rather dockerize it and use systemd + podman or a kubelet in standalone mode. Secrets on a mount point. Make it so that the boot partition of the rpi is the main config folder. That way you can locally flash a golden image.

Anything that mutates a server is brittle as the starting point is a moving target. Building images (or fancy tarballs like docker) makes it way more likely that you get consistent results.

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

#29
When you follow an online guide, dump a copy of the text on the page and a link in a single text file called “readme.txt”.

When you create backups of the state of the machine (even if the backups are just tarballs sent over ssh to the other machines), include a copy of that file.

Learning another DSL or desired state config system is going to be a pain because they lack a lot of things programmers like, like breakpoints, good LSPs and crucially: reproducible environments.

Worse still, the DSLs shift around. I know cfengine, puppet, chef, salt and ansible. Because they keep getting replaced with cleaner abstractions over time or have a kinder eye on them from the community.

Do the simple thing, document what you do to your machines. Its not sexy but you dont have to unlearn patterns or spend time trying to fix your environment just to make your docs (which now are code) work automatically.

Post reply on HN