I want to self host some services offered by HomelabOS in my personal computer. What are the pros and cons of doing it on a virtual machine vs doing it directly on my computer with the dockers that HomelabOS installs? There are some services that I would like to make public like Funkwhale.

  • @Acorn@lemmygrad.ml
    link
    fedilink
    22 years ago

    VMs tend to have more overhead, I only use them when docker doesn’t support something i need it to do.

    Docker compose tends to do what I used VMs mostly for in the past, however especially hardware passthrough is often something that i find VMs better at.

    Not sure about homelabOS specifically but I’d start with docker and switch to a VM if you run into any issues.

  • @southerntofu@lemmy.ml
    link
    fedilink
    12 years ago

    I don’t see much reason to use either a VM or a container. Your desktop computer can be a server as well: it was a common pattern until not so long ago to have your own web/mail server running on your primary desktop computer.

    I mean if you have way too much computing resources to spare then sure feel free to use various forms of virtualization but that makes everything so much harder to configure and deal with… if you need some form of isolation from your main computing tasks, then using another machine is the only safe way as any form of virtualization can be broken sooner or later.

    If you’re looking for a selfhosting distro i would personally recommend to take a look at yunohost, libreserver or freedombox, all of which use little resources because they don’t use useless virtualization.

  • Arthur Besse
    link
    fedilink
    12 years ago

    disk space, RAM, startup speed: containers have an advantage because they have negligible overhead; VMs require more disk and RAM because they run another whole copy of Linux and typically lots of userland processes before starting your application.

    security: VMs aren’t perfect but they have a reduced attack surface vs containers. Here is the most recent Linux container escape bug (as far as I know) from a month ago.

    if you want to run multiple services on one machine and you’re worried that one service might get compromised and you want to ensure that it doesn’t compromise the others, then maybe you want to run VMs. however, there are sometimes VM escape bugs too, so, if you want to be really careful you should actually run the services on different physical machines.

    VMs also have the advantage of letting you run different versions of Linux, or run other operating systems altogether, but i don’t think that is relevant to your situation.