this post was submitted on 16 Aug 2024
64 points (100.0% liked)

Linux

1257 readers
75 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I've only ever used desktop Linux and don't have server admin experience (unless you count hosting Minecraft servers on my personal machine lol). Currently using Artix and Void for my desktop computers as I've grown fond of runit.

I'm going to get a VPS for some personal projects and am at the point of deciding what distro I want to use. While I imagine that systemd is generally the best for servers due to the far more widespread support (therefore it's better for the stability needs of a server), I have a somewhat high threat model compared to most people so I was wondering if maybe I should use something like runit instead which is much smaller and less vulnerable. Security needs are also the reason why I'm leaning away from using something like Debian, because how outdated the packages are would likely leave me open to vulnerabilities. Correct me if I'm misunderstanding any of that though.

Other than that I'm not sure what considerations there are to make for my server distro. Maybe a more mainstream distro would be more likely to have the software in its repos that I need to host my various projects. On the other hand, I don't have any experience with, say, Fedora, and it'd probably be a lot easier for me to stick to something I know.

In terms of what I want to do with the VPS, it'll be more general-purpose and hosting a few different projects. Currently thinking of hosting a Matrix instance, a Mastodon instance, a NextCloud instance, an SMTP server, and a light website, but I'm sure I'll want to stick more miscellaneous stuff on there too.

So what distro do you use for your server hosting? What things should I consider when picking a distro?

top 50 comments
sorted by: hot top controversial new old
[–] bjoern_tantau@swg-empire.de 39 points 3 months ago (1 children)

I love Debian for servers. Super stable. No surprises. It just works. And millions of other people use it as well in case I need to look something up.

And even when I'm lazy and don't update to the latest release oldstable will be supported for years and years.

[–] mdione@en.osm.town 9 points 3 months ago

@bjoern_tantau @communism That 'support for years and years' means security support. So even if the nominal versions stay stable, security fixes are backported. Security scans that only check versions usually give false positives: they think fixes in newer versions are not present when in fact they are.

Many others distros do exactly the same. I only chose Debian because the amount of software already packaged in the distro itself is bigger than any other, barring 3rd party repos.

[–] selokichtli@lemmy.ml 21 points 3 months ago

Debian. This is the way (for servers).

[–] 2xsaiko@discuss.tchncs.de 21 points 3 months ago (1 children)

I run NixOS. It (or something like it, with a central declarative configuration for basically everything on the system) is imo the ideal server distro.

[–] gomp@lemmy.ml 8 points 3 months ago (1 children)

I think I can sense your love/hate relationship with nixos from here :) you are not alone

[–] 2xsaiko@discuss.tchncs.de 5 points 3 months ago

Very true haha. NixOS is great and the best I've got right now but I would lie if I said it has never been painful.

Especially for desktop use I want to build my own distro which takes a lot from NixOS, mostly in terms of the central configuration but not much else (I definitely want a more sane package installation situation where you don't need stuff like wrapper scripts which are incredibly awful imo), but also other distros, and also with some unconventional things (such as building it around GNUstep). But who knows if that ever gets off the ground, I have way too many projects with enormous scale...

[–] ginza@lemmy.ml 19 points 3 months ago

My server is running headless Debian. I run what I can in a Docker container. My experience has been rock solid.

From what I understand Debian isn't less secure due to the late updates. If anything it's the opposite.

[–] savvywolf@pawb.social 18 points 3 months ago

I switched mine to NixOS a while ago. It's got a steep learning curve, but it's really nice having the entire server config exist in a handful of files.

[–] Revan343@lemmy.ca 16 points 3 months ago

Always Debian. I'm most comfortable in an environment with apt, and that's even more important on a server

[–] danielquinn@lemmy.ca 15 points 3 months ago (1 children)

Debian, with a Kubernetes cluster on top running a bunch of Debian & Alpine containers. Never ever Ubuntu.

[–] TDK3D@discuss.tchncs.de 6 points 3 months ago (3 children)

Never ever Ubuntu

Why's that?

[–] danielquinn@lemmy.ca 8 points 2 months ago (1 children)

Because Ubuntu is the worst of both worlds. Its packages are both old and unstable, offering zero benefit over always-up-to-date distros like Arch or the standard Debian.

Especially when you're running a containerised environment, there's just no reason to opt for anything other than a stable, boring base OS while your containers can be as bleeding edge, crazy, or even Ubuntu-based as you like.

load more comments (1 replies)
[–] ReversalHatchery 5 points 2 months ago

Probably mostly for their corporate fuckery

[–] pupbiru@aussie.zone 4 points 2 months ago

it’s just less reliable, more corporate, more bloated debian

… so why would you?

[–] hagarashi8@allthingstech.social 15 points 3 months ago

@communism Debian is an easy pick, but sometimes I can do alpine. Generally, it's all in containers anyway, so doesn't really matters.

[–] itslilith@lemmy.blahaj.zone 14 points 3 months ago

NixOS for my homelab that I like to tinker with, Debian as Docker host for the server people actually rely on

[–] robinj1995@feddit.nl 10 points 3 months ago (1 children)

CentOS Stream 8. Which I regret. Because they ended support without upgrade path.

[–] gomp@lemmy.ml 3 points 3 months ago (1 children)

I thought you could still go Centos Stream 9?

Anyway, I'm pretty sure almalinux-deploy allows migration from Centos Stream 8... it's your second chance to be done with fickle management decisions from RedHat/IBM: don't miss it this time :)

load more comments (1 replies)
[–] daniskarma@lemmy.dbzer0.com 9 points 2 months ago (1 children)

Debian has been rock solid for me.

It's not insecure. Quite the contrary debian repositories only include packages that has been through extensive testing and had been found secure and stable. And of course it regularly introduce security updates.

[–] corsicanguppy@lemmy.ca 5 points 2 months ago

It’s not insecure.

There's the inconvenient truth: it's easiest to secure an OS, say for enterprise life, the farther you are from the bleeding edge: churn is lower, the targets move dramatically slower, and testing an install set (as a set) is markedly easier. It's why enterprise linux distros are ALL version-branched at a given version, and only port security fixes in: if you need to change a package and start the extensive testing, keep it to security fixes and similarly drastic reasons.

So most ent-like distros aren't insecure; not at all. Security is the goal and the reason they endure wave after yearly wave of people not understanding why they don't surf that bleeding edge. They don't get it.

Enterprise distros also offer a really stable platform to release stuff on; that was a mantra the sales team used for Open that we'd stress in ISV Engineering too, as we dealt with companies and people porting onto Open. But ISVs had their own inexperienced types for whom the idea of a stable platform that guaranteed a long life to their product with guaranteed compatibility wasn't as valuable as "ooh shiny". But that was the indirect benefit: market your Sybase or ProgressDb on the brand new release and once it's working you don't have to care about library rug-pulls or similar surprises for a fucking decade (or half that as you start the next wave onto the next distro release). And 5 years is a much better cadence than 'every week'.

So while it's easy to secure and support something that never moves, that's also not feasible: you have to march forward. So ent distros stay a little back from the bleeding edge, market 'RHL7' or 'OL31' as a stable LTS distro, and try to get people onto it so they have a better time of it.

Just, now devs have to cope with libs and tools that are, on average, 5 years stale. For some, that's not acceptable. And that's always the challenge.

[–] secret300@lemmy.sdf.org 9 points 3 months ago

I just use debian cause it's rock solid and most of what I set up are in containers or VM'S anyways

[–] harsh3466@lemmy.ml 8 points 3 months ago (3 children)

Ubuntu LTS. Currently on 22.04.

[–] mark@programming.dev 1 points 3 months ago

Ubuntu here as well! Sticking with just the LTS versions tho 😎

load more comments (2 replies)
[–] meldrik@lemmy.wtf 8 points 3 months ago

Mostly Ubuntu, but sometimes Debian.

[–] phoenixz@lemmy.ca 8 points 2 months ago

Debian and Ubuntu server which, barring some differences in versions, are basically the same thing

They're both awesome

[–] bl_r@lemmy.dbzer0.com 8 points 3 months ago

I have tons of experience with enterprise linux, so I tend to use Rocky linux. It’s similar to my Fedora daily driver, which is nice, and very close to the RHEL and Centos systems I used to own.

You are slightly mistaken with your assumption that debian is insecure because of the old packages. Old packages are fine, and not inherently insecure because of its age. I only become concerned about the security implications of a package if it is dual use/LOLBin, known to be vulnerable, or has been out of support for some time. The older packages Debian uses, at least things related to infrastructure and hosting, are the patched LTS release of a project.

My big concerns for picking a distro for hosting services would be reliability, level of support, and familiarity.

A more reliable distro is less likely to crash or break itself. Enterprise linux and Debian come to mind with this regard.

A distro that is well supported will mean quick access to security patches, updates, and more stable updates. It will have good, accurate documentation, and hopefully some good guides. Enterprise linux, Debian and Ubuntu have excellent support. Enterprise linux distros have incredible documentation, and often are similar enough that documentation for a different branch will work fine. Heck, I usually use rhel docs when troubleshooting my fedora install since it is close enough to get me to a point where the application docs will guide me through.

Familiarity is self explanatory. But it is important because you are more likely to accidentally compromise security in an unfamiliar environment, and it’s the driving force behind me sticking with enterprise linux over Nixos or a hardened OpenBSD.

As a fair word of warning, enterprise linux will be pretty different compared to any desktop distro, even fedora. It takes quite a bit of learning, to get comfortable (especially with SELinux), but once you do, things will go smoothly. ~~you can also use a pirated rhel certification guide to learn enterprise linux~~

If anything, you can simply mess around in a local VM and try installing the tools and services needed before taking it to the cloud.

[–] data1701d@startrek.website 7 points 3 months ago

Debian backports security updates to most software, including popular server software. Stable also always uses an LTS kernel, which stays supported upstream. So long as you’re using latest Debian Stable (Bookworm as of this writing), run apt update often (in fact, ‘’’unattended-upgrades’’’ is probably not the worst idea in this case) and do common sense security practices like a firewall and (brain is not working), you should be good.

In brief, it’s totally fine to use Debian and in fact one of the best options in my opinion.

[–] Johnny123123@lemmy.ml 6 points 3 months ago (1 children)

You don’t wanna use rolling release distros trust me, the whole point of server is automation and less maintenance. I got couple personal servers running, after things i need got setup and all of them running at a decent capacity, i just turn them on and never worry about them. Old package and software doesn’t necessarily mean less security, quite opposite actually, i suggest you take a look at how stable distros distribute their software, such as Debian. For a Debian package becomes stable, it has to go through several stages, experimental, unstable, testing, and finally stable, that’s why their packages are old, and because they are old, they are secure. It might be quite opposite than what you expect.

Mostly i use Debian for my personal servers, some of them are stable and some of them are testing, because of Podman’s new feature Quadlet. Honestly many features of Debian feel really old, like APT’s source list, preferences, and the way to deal with unattended upgrades. It’s kinda hard to get it at first and it’s easy to shoot yourself in the foot, especially many people tend to unintentionally mix and match packages from different suites for new software. But once you get comfortable with it things just work.

As my experience, no matter what distros i use, the worst distros are always those that i don’t understand and in a hurry to put them into production. Just pick one popular server distro and learn the ecosystem, you will find out what distros you like really soon.

[–] ReversalHatchery 3 points 2 months ago

Yeah, and key point in why old packages are secure is that versions with serious bugs and vulns don't get to the next stage, and if a package in stable is finally going to have one, they'll release a patch for it with just enough changes that fixes the serious issue.
There are some exceptions for very complex software, like Debian maintainers cannot be expected to be able to understand and see through something like Firefox. There they mitigate it by using ESR releases that are maintained by Mozilla.

[–] user68k@wired.bluemarch.art 4 points 3 months ago

Debian with Docker containers works well for my needs.

[–] avidamoeba@lemmy.ca 4 points 3 months ago

Debian but mostly Ubuntu LTS with the free Ubuntu Pro that gives 10-year support. If I get hit by a bus, chances are the self-hosted systems I've setup would continue to work for years till my family can get someone to support or migrate the data. 😅

[–] pnutzh4x0r@lemmy.ndlug.org 4 points 3 months ago* (last edited 3 months ago)

I currently use Ubuntu for all my machines (desktops, laptops, and servers), but I used to use Void Linux on my machines for about 6 years, including on a couple of VPSes. Since you are familiar with Void Linux, you could stick with that and just use Docker/Podman for the individual services such as Matrix, Mastodon, etc.

In regards to Debian, while the packages are somewhat frozen, they do get security updates and backports by the Debian security team:

https://www.debian.org/security/

There is even a LTS version of Debian that will continue backporting security updates:

https://www.debian.org/lts/

Good luck!

[–] ampersandcastles@lemmy.ml 4 points 2 months ago

Proxmox so I can run a bunch of other distros.

[–] visone@fosstodon.org 4 points 3 months ago

@communism
I use alpine, but void is a good option too, for me the host should be minimal and lightweight. At the end I have all on containers

[–] Estebiu@lemmy.dbzer0.com 4 points 2 months ago

I've been running arch for like 3 years now. Why arch? Because it just works (and its the only one i have esperience with). Maybe ill try nixos one day.

[–] chrand@lemmy.ml 3 points 2 months ago (2 children)

I always use Rocky Linux or Alma Linux, since I have extensive experience with enterprise Linux and RPM packages. I have Fedora on my main desktop computer. Both Rocky Linux and Alma Linux are rock-solid and are ideal for any kind of workload.

Also, Debian is a good choice if you know how to manage DEB packages and you feel comfortable with APT.

Fedora is a good choice if you want fresh packages and are willing to upgrade your server every 6 months (following the Fedora release cycle).

Rocky Linux and Alma Linux follow a similar slow release cycle of RHEL, wherein you can install your server and not have to worry for years (as long as the packages are updated with dnf update) Debian is also a slow release distribution, which makes it good for servers.

load more comments (2 replies)
[–] gencha@lemm.ee 3 points 3 months ago

If you are already familiar with one package manager, pick a distro that also uses that package manager.

When deciding on the release track, the harder it is to recover the system, the more stable the track should be. Stable does not imply secure.

As you move up through virtualization layers, the less stable the track needs to be, allowing access to more recent features.

Steer clear of distros that pride themselves on using musl. It's historically slow and incomplete. Don't buy into the marketing.

Think about IaC. Remote management is a lot more comfortable if you can consider your server ephemeral. You'll appreciate the work on the day you need to upgrade to a new major release of the distro.

[–] wolfie@lemmy.zip 3 points 2 months ago

Personally, I use Rocky Linux on my servers. It’s stable, and has plenty of support since it’s RHEL-based. It’s supported until 2030 or so, and it doesn’t have any of the cloud-init or netplan stuff that Ubuntu Server has.

It’s also pretty simple to set up docker/podman containers, although you need the EPEL for podman-compose and for a lot of other packages, but once you get your setup the way you like it, it just keeps running and running.

[–] Andromxda@lemmy.dbzer0.com 3 points 2 months ago

Debian if you are new to Linux servers and self-hosting. Alpine if you get more advanced and just want something very light-weight and minimal.

[–] 30p87@feddit.org 3 points 2 months ago

Arch. With testing repos. And somehow, it also just works.

[–] minnix@lemux.minnix.dev 2 points 3 months ago

Used to be CentOS until the stream debacle. Now Debian.

[–] DarkMetatron@feddit.org 2 points 3 months ago

I use arch on my servers. It is the distro I am most used too, because I use it also as my daily driver.

[–] heythatsprettygood@feddit.uk 2 points 2 months ago

openSUSE Leap - YaST is the greatest thing since sliced bread, and works great on command line over SSH. Yes, sometimes installing some software is difficult, but generally most stuff you would want is there and a lot of stuff runs on Docker anyway now. Very stable too, have had nearly zero issues.

[–] blackstrat@lemmy.fwgx.uk 2 points 3 months ago

Been running Ubuntu LTS releases on all my server VMs for 8 years and haven't had a single problem. Absolutely solid as a rock. Fantastic support, loads of guides to do anything. Plus you can get 10years of support as a home user with a free Ubuntu Pro subscription.

[–] Mwa@thelemmy.club 2 points 3 months ago

I don't have a server but If I had one I would prob pick nixos or some arch distro

[–] corsicanguppy@lemmy.ca 1 points 2 months ago* (last edited 2 months ago)

I won't say which one, but I'll give you a hint as to why:

rpm -Vp https://...

It's what got me off Slackware, and it's true today. If the distro can't support that kind of check, it's dead to me.

[–] Nomecks@lemmy.ca 1 points 2 months ago (1 children)

Red Hat, because it's free for developers and used by a lot of enterprises.

[–] corsicanguppy@lemmy.ca 4 points 2 months ago (1 children)

Red Hat, because it’s free for developers

Not really.

and used by a lot of enterprises.

Not really. We're moving to a surprising alternative, but the source for a paid enterprise Linux is drifting away collectively from RedHat. It started with 7 - ironically people choosing a 7 equivalent from a clone, like a paid centos almost, just because they were so pissed at the quality free-fall that began with 7. In short, paying a competitor for their clone of a bad release because they're so pissed at RedHat for making that release. Really weird.

Now that RH is starting to wobble and falter, these also-rans are trying to get into the lead as flagship. If RH post-Lennart can't get its quality back up to EL6 level, the cracks will get noticeable. As they keep on pitching every product under the sun except linux, we worry their focus won't get back to it in time and they'll lose the flag - if not already - to someone else.

It's not SuSE. That combination of Slackware and (I wanna say SLS) is an experience, but not a joy. It seems like a good idea, but their culture is still weird for the west.

[–] Findmysec@infosec.pub 1 points 2 months ago

Please tell me you're using Oracle /s

load more comments
view more: next ›