Moving to Debian

December 30, 2023

Overview

For a while now, I’ve been using Fedora Server as the base for my physical and virtual servers in my home lab. Fedora has a fairly fast paced updated cycle, and I didn’t need the updates for what I was running. I recently decided to switch my servers over to Debian in an effort to reduce the amount of time I spend on maintenance.

Install

My servers are vary basic and typically use Docker to run any services. The only (current) deviation from this is the box I have on my DMZ network that runs Caddy on bare metal for a reverse proxy with HTTPS. For the base install, I just use all of the default options until getting to the software selection screen. I use the entire disk for the install and don’t separate out the home partition, as that doesn’t really give me anything for my use case. For software selection, I deselect the GUI options and enable the SSH server.

Configuration

Once the base install is complete, the first thing I do is install sudo and vim. Any users that you want to enable sudo abilities for can be added with the command usermod -a -G sudo username (while root of course). Typically, I’ll install the UFW firewall also. This is mainly just an extra layer to make sure everything is blocked on the server. Digital Ocean has a decent setup article. It has limited use with Docker though. Just be sure to understand the limitations.

I have a dedicated box setup for TrueNAS Scale. Among other things, this provides network file storage to many of my servers via NFS. Debian does not have the NFS utilities installed by default, so nfs-common will need to be installed. For any locations where I mount NFS shares, I always set the immutable flag on the directory before mounting the share. This can be done with sudo chattr +i /mnt/point and ensures nothing can be written to the directory before the share is mounted. To auto-mount the share at boot, an example fstab entry is provided below for reference.

truenas.jlhinson.com:/mnt/nas-pool/media        /mnt/media      nfs     defaults        0 0

Once that is all setup, Docker compose can be used to quickly get all the needed containers up and running. It is as simple as sudo docker compose -f /path/to/yaml up -d.`

Conclusion

Overall, it was a fairly simple conversion. Since most of my services run as Docker containers, they are easy to port to another Linux distribution. It is nice to not have to worry about updates as frequently, and Debian has been extremely solid so far.