Two friends and I would like to build a PC as a server in my house. The idea would be to have a headless server with 3 VMs. I was wondering what would be the best thing to do so that everyone could have their own private space, while optimizing disk space as much as possible (1TB M.2 SSD + 8TB HDD via RAID1). Each of us could play with Docker to have services on top. What software would you use to set up VMs and manage disks, and what advice would you give us in general?

The other option would be to go cloud, with Hertnez + Mega (autoscaling).

  • mholiv@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    11 months ago

    I see two paths that might be fun for you.

    1. Building a local home server

    Here you set up something like Debian or Rocky Linux with KVM. You set up 3 VMs. These VMs live on the SSD. 30% each with the remaining 3% aka 30GB reserved for the host system.

    You then set something up like GlusterFS or CEPH or even NFS all with set up with a 1/3 quota. You then access these in the VMs and have fun. Pretty isolated and secure. The only catch is that everyone has to trust the person who set up the Linux KVM host and the person who’s home the server lives in.

    1. Cloud servers

    No point of sharing a single machine it would be better for each of you to have your own machine. This being said if you do go this route I think a fun option would be for the three of you to set up and run a Kubernetes cluster.

    https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner

  • navigatron@beehaw.org
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    Hey! Best of luck, I’m actually going down the same road at the moment :)

    I would build it yourself - it’s more fun, and is cheaper than renting over a shorter-than-you-would-think time period.

    The first thing to know is whether or not you can port-forward / if your isp has you behind nat.

    Exposing virtual disks is relatively straightforward, or even just storage quotas on a single disk. I’m about to jump into the wide world of zfs; I need to glue together 4+ disks into a single storage array.

    If you want everyone to have a separate VM, you’ll need some kind of hypervisor underneath. Could you grant everyone a user account in a single system, and use docker for separation?

    It sounds like the others will be connecting remotely - make sure you use ssh keys (not passwords) and disable root over ssh. Once ssh is exposed to the internet, you’ll see a lot of failed login attempts