Home server / self-hosting: VMs or one host OS?

Hi everyone! First proper post.

So I was wondering, for a simple home server that's used to self-host a caldav server, static website, github, documents etc and maybe more stuff to come later, would it make more sense to isolate different services by running each in its own VM or have them all run in the same host OS? I get that if you need proper isolation, running services in VMs makes more sense.

So t I was wondering if it isn't a bit overkill to have one VM per service? Anyone have any practical or maybe even professional experience with this?

Thanks!

PS: There needs to be a new category for hosting related things...

Running services in their own contained space is always recommended from a management and troubleshooting perspective, say that you install 4-5 services on a single host and the server starts acting weird, with contained services you can isolate the issues to a single container/VM which helps massively.

Trust me, I used to install all the services on a single machine without the use of containers or VMs and configuration and management was a nightmare if something went massively wrong.

As for installing services per VM, if you don't want the extra overhead I would recommend using LXC containers for your services instead, they are less isolated than VMs but shouldn't use nearly as much resources (mostly in terms of memory usage, etc).

2 Likes

I agree with @MichaelLindman, having each service on its own vm or container makes managing it much easier as if you break something on one vm it won't affect everything else. Plus if you use snapshots for your VMs you can roll back one server to a previous configuration without having to roll everything back.

It also helps for security as if one service becomes compromised the others are somewhat isolated, and can be firewalled for additional security.

2 Likes