this post was submitted on 14 Mar 2024
46 points (92.6% liked)

Selfhosted

40347 readers
406 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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?

top 50 comments
sorted by: hot top controversial new old
[–] Guenther_Amanita@feddit.de 68 points 8 months ago* (last edited 8 months ago) (5 children)

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.

[–] h3ndrik@feddit.de 16 points 8 months ago* (last edited 8 months ago) (1 children)

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.world 10 points 8 months ago (2 children)

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 9 points 8 months ago (1 children)

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 4 points 8 months ago (1 children)

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

[–] h3ndrik@feddit.de 3 points 8 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 4 points 8 months ago* (last edited 8 months ago) (1 children)

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.world 1 points 8 months ago (1 children)

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 1 points 8 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 12 points 8 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.

load more comments (3 replies)
[–] summerof69@lemm.ee 42 points 8 months ago
[–] PoliticallyIncorrect@lemmy.world 38 points 8 months ago (1 children)
[–] Corgana@startrek.website 1 points 8 months ago

+1 for Debian, also CasaOS is like a single-command setup for docker and other features with a nice GUI.

[–] peo@feddit.it 28 points 8 months ago (1 children)

Debian, set and forget. Being a server you don't need the latest version of any software and Debian is timely in security patches. use unattended-upgrades and forget about what is running your stuff.

[–] faethon@lemmy.world 6 points 8 months ago

Yes, I am running unattended-upgrades, and basically my current server is running 24/7 just fine! It is indeed like set and forget already. More reason to move to Debian!

[–] doeknius_gloek@discuss.tchncs.de 23 points 8 months ago

Since you're already familiar with a debian based distro, switching to the OG debian would be an option.

[–] Atemu@lemmy.ml 14 points 8 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.

[–] derbolle@lemmy.world 13 points 8 months ago

debian. stable, reliable, easy to learn

[–] matcha_addict@lemy.lol 13 points 8 months ago

For your use case, debian. Ubuntu is based on it, it's stable, it'll feel like home.

I personally use Gentoo (since you asked what we all use), but based on your reqs, you wouldn't wanna use it. And I'm probably in the minority anyways.

[–] GunnarGrop@lemmy.ml 8 points 8 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.

[–] rtxn@lemmy.world 7 points 8 months ago (1 children)

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.

load more comments (1 replies)
[–] eleitl@lemmy.ml 7 points 8 months ago (10 children)

Proxmox with Debian containers.

load more comments (10 replies)
[–] Codilingus@sh.itjust.works 5 points 8 months ago

Unraid is the GOAT when it comes to being headless for docker. They know how to walk the fine line of "this is too much. It's bloat," and "this is minimal and bare bones." I seriously can't hype them enough, and can't do justice to describing their ease of use.

[–] kylian0087@lemmy.world 5 points 8 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.

[–] erev@lemmy.world 5 points 8 months ago (1 children)

I prefer Fedora Server. It comes with a lot of nice integrations into more enterprise/centralized Linux administration and management tools. A lot of these are FOSS so if you like infrastructure, this is a really good way to take an easy step up.

load more comments (1 replies)
[–] Mora@pawb.social 5 points 8 months ago (3 children)

Does someone use nixOS? How does that hold up for this usecase?

[–] farcaller@fstab.sh 4 points 8 months ago

I wouldn’t specifically say nixOS is stable in the same sense debian is but yes, it can totally handle this use case. I mainly run k8s on it, but a few home machines run docker (or, rather, podman) containers.

A thing about nixOS is that quite often you won’t need containers at all and would be better off without them, managing your apps as part of the system state as a whole. I only do that because I can’t be bothered to properly switch to nixOS services for ELK (which is supported by nixOS).

It's a very stable solution in general and usually ends with a configuration that either doesn’t apply at all or applies with no issues. Gitops included for pretty much free. It requires understanding nix, and it can be tricky, but not overly tricky.

All and all I haven’t had an Ubuntu in homelab for two years now and can’t be happier about that.

[–] mlaga97@lemmy.mlaga97.space 2 points 8 months ago

Still a few Ubuntu Server stragglers here and there, but it works quite well as long as you keep your base config fairly lean and push the complexity into the containers.

Documentation tends to be either good or nonexistent depending on what you're doing, so for anything beyond standard configuration but it can usually be pieced together from ArchWiki and the systemd docs.

All in all, powerful and repeatable (and a lot less tedious than Ansible, etc), but perhaps not super beginner-friendly once you start getting into the weeds. Ubuntu Server is just better documented and supported if you need something super quick and easy.

load more comments (1 replies)
[–] msoulforged@fstab.sh 5 points 8 months ago

I have Debian for some time and am quite happy. İt is slow with updates but very stable.

[–] skilltheamps@feddit.de 4 points 8 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

[–] redcalcium@lemmy.institute 4 points 8 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.

[–] Im_old@lemmy.world 3 points 8 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.

[–] zarenki@lemmy.ml 3 points 8 months ago

Debian. I was in a similar boat to OP and just a couple weeks ago migrated my almost 8-year-old home server setup from Ubuntu LTS to Debian Stable. Decided to finally move away from Ubuntu because I never cared for snap (had to keep removing it with every upgrade) and gradually gained a few smaller issues with Ubuntu. Seems good to me so far.

I considered RHEL/Rocky but decided against them largely because I wanted btrfs for my rootfs, which their stock kernel doesn't have, though I use a few Red Hat developed tools like podman and cockpit. Fedora Server and the like have too fast a release lifecycle for my liking, though I use Fedora for my desktop. That left Debian as the one remaining obvious choice.

I also briefly considered throwing a Debian VM into TrueNAS Scale, since I also use this system as a ZFS NAS, but setting that up felt like I was fighting against the "appliance" nature of what TrueNAS tries to be.

[–] jaypg@lemmy.jaypg.pw 2 points 8 months ago

Something headless for just running containers? Alpine.

It’s small, boots fast, simple, can run from RAM and Docker is available in its software repository.

[–] turkishdelight@lemmy.ml 2 points 8 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.

[–] boeman@lemmy.world 2 points 8 months ago

My 4 host machines run debian (proxmox). I have a lot of different guest flavors running though, debian, fedora, rocky, one old guest still running Ubuntu and even a mint sandbox machine.

I probably have a bit more complicated self host than others because I am using it both for my useful internal services (jellyfin, git, pihole, etc.) I also run a whole lot of services for learning, such as kubernetes and dns. Plus a whole lot of other mostly useless stuff that I only use to test different architectures or automations that come in handy as an SRE.

[–] Decronym@lemmy.decronym.xyz 1 points 8 months ago* (last edited 8 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]

[–] homegrowntechie@lemmy.world 1 points 8 months ago

debian\ubuntu vm on proxmox. Then you can snapshot the whole deal and take easy backups of everything using proxmox backup server.

[–] Shimitar@feddit.it 1 points 8 months ago

Gentoo. While a bit unusual, it's perfect for the job.

Check my wiki at https://wiki.gardiol.org where I document my Gentoo selfhost experience.

load more comments
view more: next ›