Live data from Hacker News

Ask HN: Please recommend how to manage personal serverss

news.ycombinator.com

31–40 of 67 posts

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

#31
It looks to me like you've been poisoned by the modern scaling approach. You're not going to run N web servers and M load balancers and P application servers, deploying them automatically from a CI system. You're going to run nginx and six single applications behind it and one database, right? So when you adopt ansible or puppet or nix to run a config, you are adding complexity, not simplifying your life. Even docker may be overkill.

The points to consider:

- architecture. You have three boxes. One of them has lots of storage. One of them is cheap. One costs you monthly. I don't know that this is what you actually want. You probably need a main box that can do anything, a backup facility for that, and a proxy to expose services to the outside world.

- a common operating system on all nodes. I like Debian stable. Not everybody does. Being happy with it is more important than being the "best". But you should only have one.

- automatic backup of config and data. Snapshots are nice.

- if you can't have perfect snapshots, you can at least check your config into git. Use etckeeper.

- set up a common approach to running things. Make everything grab TLS certs from Lets Encrypt through nginx. Make a new user for each service. Make a new database user for each service that needs that, make a new PHP worker pool, whatever. Be consistent.

- document your policy and your exceptions. This can be a text file or a wiki or something weird.

- know where you are getting things, how to upgrade them, and how to get announcements of available updates.

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

#32
Take a look at Vagrant! https://www.vagrantup.com/ In my admittedly limited understanding I believe it offers closer to a Nix like reproducable rather than repeatable deployments. Like Nix I beleive you can also hash verify each VM to be confident you have the same image.

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

#33

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.

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

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

#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.

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

#35
For two publicly-reachable services I personally run, I decided the way that involved the least work and was most likely to be low-drama -- initially, and ongoing -- was to just put them on separate $5/month Linodes running Debian Stable.

My personal wiki has very short notes on how to rebuild each from scratch. (Pretty much: push Linode Web site buttons to make a new Debian Stable instance, get a shell and do this `apt install` command line, and edit config file like so). Data gets pushed/pulled via simple shell scripts run on laptop (usually using SSH and rsync).

Separate from those services, my GPU server is a separate box at home, and frequently changing at a low level, so blasting it entirely a few times has made pragmatic sense, so I'm glad it's not sharing config complexity any other resources. And setting up the large ML stacks down to proprietary drivers sometimes is initially very experimental, and I need to do it manually first anyway, not yet ready to make a Dockerfile or set up passthrough for containers, and after the experiment works, there's no reason to do that. Were I making a production setup, or something reproducible by others, I'd do more after the initial experiment setup.

Wrangling much more complex layers atop (e.g., K8s, Docker, Terraform, Ansible, NixOS, etc.) sometimes means more things that can go wrong, and sometimes more time spent learning someone else's bureaucracy. Most of tech work now is learning piles of other people's bureaucracy. That makes sense for businesses that actually need that complexity, and for people who just want to copy&paste cargo-cult command lines and hopefully it works, and for people who want to homelab it for experience (which is perfectly valid). But the way I run my important services and my experimental box seemed to be easier overall.

Of course, for curiosity/resume/masochism purposes, I do have a separate K8s cluster at home, which runs nothing important, and which I can obliterate and change and experiment with at will, without being encumbered by it running services I actually need.

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

#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.

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

#37

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.

Yeah I use ansible (in pull mode) for my home automation for just such a purpose. I have the router open up port 443 to my one box, then have haproxy read the header for the incoming traffic and route it to the backend on the box whether a docker container or a local service. Foundry VTT, jellyfin, etc. All from Ansible, all to a private github that I just SSH into the machine long enough to run ansible pull. That wa…

Are you routing a traffic from a VPS to your home? I've considered a set up like this where my home PC would be permanently VPN-connected to the VPS, but I think the problem was making it secure, e.g. making a virtual network at home to separate my personal stuff to be potentially accessible from the internet.

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

#38

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.

Totally.

And whilst I've used most provisioning tools (quite liking packer and terraform), for my own stuff I have a file with notes and snippets. Follow that file and within less than 10 minutes I've got a working server with Postgres, Nginx, and LetsEncrypt, and it's ready for Git push-to-deploy.

Simplicity is what you need, for as long as you can get away with it. Simplicity and backups.

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

#39
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…

>Just read the wiki

note, there are two wikis now.

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

#40
post #31

It looks to me like you've been poisoned by the modern scaling approach. You're not going to run N web servers and M load balancers and P application servers, deploying them automatically from a CI system. You're going to run nginx and six single applications behind it and one database, right? So when you adopt ansible or puppet or nix to run a config, you are adding complexity, not simplifying your life. Even docker…

I like the pragmatism in this comment, I think I can unify an RPi with a NAS. My concern was keeping important data backups separate from other experiments, though maybe I'm overthinking it.

Thanks for etckeeper, it looks really interesting, I didn't know about it.

Post reply on HN