So I have been running a fair amount of selfhosted services over the last decade or so. I have always been running this on a Ubuntu LTS distribution running on a intel NUC machine. Most, if not all of my services run in a docker container, and using a docker compose file that brings everything up. The server is headless. I connect over ssh into a tmux config so I am always ready to go.

Ubuntu has been my stable server choice over the years. I’ve made the upgrade from 16, 18, 20 and 22 LTS release and everything has kept working. I even upgraded the hardware (old NUC to a new NUC) and just imaged the disk from the old one onto the new machine, and the server kept chugging along quite nicely, after I configured the hardware (specifically the Intel QuickSync for hardware transcoding in the Plex container).

Since Ubuntu has been transitioning from a really open community driven effort into a commercial enterprise, I feel it may be time to look at other distributions. On the other hand, it will require a fair amount of work to make the switch. But if it needs to be done, than so be it. I guess I am looking for opinions on what Linux distribution would fit my particular use case, and am wondering what most of us here are running.

TLDR; What stable, long term supported Linux distributions do you recommend for a headless server running a stack of docker containers?

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    9 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    Git Popular version control system, primarily for code
    IoT Internet of Things for device controllers
    LTS Long Term Support software version
    LXC Linux Containers
    NAS Network-Attached Storage
    NUC Next Unit of Computing brand of Intel small computers
    SSH Secure Shell for remote terminal access
    VPS Virtual Private Server (opposed to shared hosting)
    ZFS Solaris/Linux filesystem focusing on data integrity
    k8s Kubernetes container management package

    [Thread #601 for this sub, first seen 14th Mar 2024, 10:35] [FAQ] [Full list] [Contact] [Source code]

  • Guenther_Amanita@feddit.de
    link
    fedilink
    English
    arrow-up
    70
    arrow-down
    1
    ·
    edit-2
    9 months ago

    Debian. I don’t see much benefit of Ubuntu LTS compared to plain old Debian. It’s exactly what you wanted.

    Alternatively, AlmaLinux is a good choice if you like Red Hat stuff (RHEL clone), but the difference between Ubuntu LTS and Debian would be almost not noticeable for you I think.

    • umbrella@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      what even is the difference?

      im using ubuntu rn, but need to redeploy and have been thinking of just switching away to debian.

      • Guenther_Amanita@feddit.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        Debian is community run, which often means all changes and features get implemented because the community wants that, not some corporation. One notable example of that is Snap.

        Also, I found (minimal install) Debian a bit more minimalist than Ubuntu server, which is great imo. I just want the bare minimum for my services to work, and pretty much the only thing I expect from my server to have is SSH and Docker.

    • h3ndrik@feddit.de
      link
      fedilink
      English
      arrow-up
      16
      ·
      edit-2
      9 months ago

      And I would agree. I’ve been using Debian on my VPS with docker-compose etc for years. Would recommend it, too. And it’s pretty similar to what you have now. There isn’t much needed to swich around or learn.

      And it is the textbook example of a successful, community driven distro.

      • faethon@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        10
        ·
        9 months ago

        It seems to be the most logical move to go from Ubuntu to Debian indeed. As I understand it maintains the core Linux system as I have it now (systemd / apt / stable kernel) while truly community driven. I have to look into transitioning into the latest stable Debian release.

        • h3ndrik@feddit.de
          link
          fedilink
          English
          arrow-up
          9
          ·
          9 months ago

          I mean it’s not only alike what you’re currently using… It’s the foundation of Ubuntu. Lots of packages are exactly the same.

          And I think you’ll find something very similar, just with the stuff missing that Ubuntu added on top, and you don’t like anyways.

          Hope you can move you containers and volumes without too much effort. I mean since you’re starting over anyways you could also pause for a minute and think if you want to recreate something similar or switch to something different. There are other containerization techniques, podman, systemd-nspawn, you could do your server in a declarative approach with NixOS… But if you like what you have now, and don’t want to learn something entirely new, I’d say Debian is probably your solution.

          • iso@lemy.lol
            link
            fedilink
            English
            arrow-up
            4
            ·
            9 months ago

            “Ubuntu added on top” you mean Snap? No thanks :)

            • h3ndrik@feddit.de
              link
              fedilink
              English
              arrow-up
              3
              ·
              9 months ago

              It’s not the first strange decision they made. I think I finally switched from Ubuntu to Debian when they introduced the Amazon advertisements to the Unity desktop. That must have been 12.10 Quantal Quetzal. I’ve been happy since and didn’t miss the odd business strategies they pushed in the time since…

        • lemmyvore@feddit.nl
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          9 months ago

          The only thing you need to watch out is the kernel.

          Debian stable is on a 2-year release cycle (odd years). LTS kernels are released once a year, but Debian needs time to test each release thoroughly so they use the LTS kernel from the previous year. This means that by the time the next stable Debian comes out the kernel will be 3 years old.

          Example: Debian 11 released in 2021 with kernel 5.10 (from 2020). By the time Debian 12 released in 2023, kernel 5.10 was 3 years old.

          You can of course use backports to get a newer kernel but using backports defeats the purpose of using Debian stable. So please think very carefully whether you need recent kernel support for anything.

          Docker and ZFS are the usual suspects but they tend to support a pretty wide array of kernel versions so they should not be a problem. Especially since you can install them from 3rd party repos. But please understand that releases from external repos are, again, not tested with stable.

          There are other things that may need kernel support, for example I use the Samba and NFS drivers from the kernel, which need userland packages as well, so in their case you definitely want to stick to the official stable packages.

          If you can’t live with old Debian kernels then stick to Ubuntu. There’s no inherent problem with Ubuntu and given that you have experience with it it might actually be the ideal choice for you. There’s no substitute for a distro you know very well.

          • faethon@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 months ago

            Ah, that is a good point. I am using 6.5.0 kernel atm, as part of the HWE (hardware enablement) package, which supports QuckSync / hardware encoding of my 12th gen intel processor. I did a quick search, but did not find HWE for Debian is that correct?

            • lemmyvore@feddit.nl
              link
              fedilink
              English
              arrow-up
              1
              ·
              9 months ago

              HWE for Debian should be in the backports.

              I haven’t looked into it tbh, my Intel is 7th gen so I have no problem running with Debian’s older kernel.

    • varsock@programming.dev
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      9 months ago

      Debian has the advantage of not using snapd like Ubuntu does. You have to not only remove snaps but also instruct the package manager not you pull in snaps as dependencies and not to favor snap packages.

      I have fond memories of Ubuntu being my first distro many years ago but pushing snaps onto users to compete with flatpak is a nuisance.

    • TCB13@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      7
      ·
      9 months ago

      Dude the guy is running on system with restricted resources and you’re suggesting the most bloated and prone to fail thing ever.

      The OP would be way better with Debian + Cockpit (also provider a webUI and virtual machine manager) or Debian + LXD/LXC (containers + VMs, optional webUI). Both of those solutions are way lighter and won’t mess your base system.

      • 𝘋𝘪𝘳𝘬@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        Any small Linux distro would do. Just install Docker and maybe Portainer (as container itself of course) if you want a web UI.

      • eleitl@lemmy.ml
        link
        fedilink
        English
        arrow-up
        6
        ·
        9 months ago

        It’s a NUC so sufficiently poweful. Proxmox isn’t fat by any means. If you run your stuff in containers then Proxmox (I aways install it on top of Debian) is your hypervisor is your base system. You typically don’t install stuff on your hypervisor, though I do some very select things.

        • TCB13@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          9 months ago

          If you run your stuff in containers then Proxmox (I aways install it on top of Debian) is your hypervisor is your base system

          I believe you’re missing my point. Cockpit also works as an hypervisor for most people, a very light and stable one, besides…

          If you’re running containers on Proxmox then you’re running LXC containers… why not just use LXD/Incus (also another hypervisor) to manage those containers that is considerably lighter, comes by default in the Debian repository, was designed to manage LXC container (not hacked around like Proxmox was) and isn’t mostly made by a for profit entity that sometimes likes to hold important patches on their subscription-only repositories? Or constantly nag you to buy a subscription?

          • eleitl@lemmy.ml
            link
            fedilink
            English
            arrow-up
            3
            ·
            9 months ago

            I hear you, but Proxmox does a great many more things than just run containers. Admittedly, many selfhosters won’t need these.

            • TCB13@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              9 months ago

              LXD/Incus also does clustering, storage management, has a WebUI etc.

            • BearOfaTime@lemm.ee
              link
              fedilink
              English
              arrow-up
              3
              arrow-down
              2
              ·
              edit-2
              9 months ago

              I just spun up Proxmox - it’s using 1GB of ram, and trivial CPU.

              For a host, nothing else looked as easy to install and get running. The hardest thing so far was learning how to use ZFS raid0 on 3 drives. Doing so requires going commando (command line), because it’s not a safe thing to do, and really should never be done.

              Once you get the concepts in Proxmox, it’s really straightforward.

              Also, it’s backed by a commercial business, so it’s likely to see continued support and dev. With the recent shitshow with VMware, I suspect it’ll be a choice for many businesses - which hopefully translates to a growth in user base (and financial support).

              • TCB13@lemmy.world
                link
                fedilink
                English
                arrow-up
                3
                arrow-down
                2
                ·
                9 months ago

                Also, it’s backed by a commercial business, so it’s likely to see continued support and dev. With the recent shitshow with VMware, I suspect it’ll be a choice for many businesses - which hopefully translates to a growth in user base (and financial support).

                That’s kind of the problem with Proxmox, you never know when they’ll start requiring a license for everyone and what prices will look like. That’s one of the reasons why I’m telling people to look at LXD/Incus. It’s truly free/open and financed by the linux containers initiative that gets resources from multiple big vendors and providers.

                • moonpiedumplings@programming.dev
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  arrow-down
                  1
                  ·
                  9 months ago

                  LXD/Incus. It’s truly free/open

                  Please stop saying this about lxd. You know it isn’t true, ever since they started requiring a CLA.

                  LXD is literally less free than proxmox, looking at those terms, since Canonical isn’t required to open source any custom lxd versions they host.

                  Also, I’ve literally brought this up to you before, and you acknowledged it. But you continue to spread this despite the fact that you should know better.

                  Anyway, Incus currently isn’t packaged in debian bookworm, only trixie.

                  The version of lxd debian packages is before the license change so that’s still free. But for people on other distros, it’s better to clarify that incus is the truly FOSS option.

  • Im_old@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    9 months ago

    As everyone said, debian. I use it for my mail server, the docker server, podman server, matrix, headscale. On docker I also have nvidia drivers for hardware video decoding in jellyfin.

  • Atemu@lemmy.ml
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    9 months ago

    If you’re using containers for everything anyways, the distro you use doesn’t much matter.

    If Ubuntu works for you and switching away would mean significant effort, I see no reason to switch outside of curiosity.

  • redcalcium@lemmy.institute
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    9 months ago

    I also moved to Debian after years of using Ubuntu Server LTS. No problem so far on those servers for container workloads, the small ones run docker compose, the medium ones run k3s, and a small cluster runs rke2.

  • rtxn@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    9 months ago

    Debian, all the way. I’ve got both ubuntu (made by my predecessor) and debian servers at work, and as far as maintenance and administration, they’re more or less identical. The one thing that sometimes catches me off-guard is that sudo is not installed by default, and you have to su - into a root session.

    • zarenki@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      That’s actually a choice you’re offered during Debian’s interactive install. When you’re offered the option to set a root password, if you leave it empty the system will disable direct root login and instead give your first normal user sudo access.

  • kylian0087@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    9 months ago

    Personally I prefer Rocky linux. Default to using SElinux which I also like. not a big fan of debian though as things are quite old and sometimes outdated for my needs.

  • skilltheamps@feddit.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 months ago

    Since you run everything in docker, I guess you have experienced the benefits of containerization. So why not leverage that for your host too?

    Fedora IoT is a container-based host that runs on your hardware, with a focus on edge device deployment.

    https://fedoraproject.org/iot/ I have it running on two servers as well, and it works great. The only thing I changed is that I layered docker on it instead of using podman, because at the time I had trouble getting my reverse proxy working properly over ipv6

  • turkishdelight@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    9 months ago

    I use ubuntu because my provider has that by default. It’s not my favourite distro these days, but gets the job done.

  • GunnarGrop@lemmy.ml
    link
    fedilink
    English
    arrow-up
    8
    ·
    9 months ago

    OpenSUSE MicroOS or Fedora CoreOS. If you’ll be using containers you’ll have a great time. If you don’t want to deal with transactional systems, then there is literally nothing I’d rather use than Debian.