Welcome to the Café

Explore the world of Linux with clear, approachable guides. Whether you’re just starting out or looking to sharpen your skills, you’ll find something to brew your interest here.

Replacing Ubuntu’s Default DNS with Dnsmasq: Fixing Stale IPs in My Home Network

Stale IPs on a Home Network? Let dnsmasq Clean Up the Mess

If you’ve ever pinged a device that had moved to a new address and the reply came from an old IP, you’ve probably been frustrated by the same stale DNS entries that linger in the resolver cache. On a typical Ubuntu desktop or server, systemd‑resolved is the default DNS stub. It’s great for most use cases, but it can keep outdated records for a long time, especially when your router’s DHCP server changes leases frequently. The result? Your own machine keeps trying to resolve a dead address until the cache finally expires.

[Read More]

Why my nightly rsync backup disappeared after switching to a systemd timer – and how I fixed it with 'Persistent=true

Nightly rsync vanished after moving to systemd timers

I had a simple nightly backup script that ran under cron for years. One evening I decided to modernise the scheduler: replace the crontab entry with a systemd timer. The idea was clean, the logs would be in journalctl, and I could keep the backup logic in a single unit file. A few days later the backup disappeared from the destination directory. After a quick audit I discovered that the timer had never fired because the system had been powered off at the scheduled time. The culprit was the missing Persistent=true setting.

[Read More]

Taming My Daily Backup Script’s CPU Spikes with `nice` and `ionice`

Why CPU Spikes Hurt Your Backup

Running a nightly backup with rsync or tar is a staple of any homelab or self‑hosted server. Even if the backup finishes in a few minutes, a sudden burst of CPU usage can push the system into a state where interactive work stalls, background services lag, or even the backup itself stalls due to contention. On a machine that also hosts a web server or a desktop, those spikes become noticeable. The good news is that Linux gives you two lightweight knobs—nice and ionice—to dial the priority of a process without touching the kernel or installing extra software.

[Read More]

Running Podman as a Non-Root User on a Headless Server

Install Podman and Enable User Namespaces

sudo apt update
sudo apt install -y podman

On Debian 12, Podman ships with userns-remap turned off.
I always enable it right away by editing /etc/containers/containers.conf:

[engine]
userns = "keep-id"

keep-id keeps the container’s UID/GID the same as the host user’s, which is the simplest approach for a single‑user homelab. If you have multiple users, you might want auto or a custom mapping.

After that tweak, restart the daemon:

[Read More]

Taming the systemd Boot Process: My Journey to Fixing Slow Boot Times on My Linux Laptop

Introduction to Slow Boot Times

I’ve been running Linux on my laptop for years, and slow boot times have become a major frustration. As someone who values productivity, waiting for my system to boot up can be a real pain. So, in 2025, I decided to dive into the world of systemd and see if I could optimize my boot process.

Understanding systemd

Before you start tweaking, it’s crucial to understand how systemd works. systemd is a system and service manager that’s responsible for booting and managing your Linux system. It’s complex, but there are some great tools available to help you understand and optimize it. One of the most useful tools is systemd-analyze, which provides detailed information about the boot process.

[Read More]

Troubleshooting Slow DNS Lookups with systemd-resolved on My Linux Homelab Server

Introduction to Troubleshooting Slow DNS Lookups

I’ve been running a Linux homelab server for a while now, and one issue that’s caught my attention recently is slow DNS lookups. With the increasing reliance on online services, fast and reliable DNS resolution is crucial. I noticed my server was taking longer than usual to resolve domain names, affecting my homelab’s overall performance. After digging in, I found the issue was related to systemd-resolved, the DNS resolver service that comes bundled with systemd. I’ve seen this go wrong when the default resolvers aren’t responding quickly.

[Read More]

Taming the Journalctl Noise: How I Stopped Wasting Time on Useless systemd Logs

Introduction to Journalctl Noise

I’ve spent years relying on journalctl for system logging and debugging, but I’ve found myself wasting too much time sifting through useless logs. The noise was becoming a significant problem, making it tough to identify real issues. I’ve seen this go wrong when trying to troubleshoot a critical issue, only to get bogged down in irrelevant logs.

Understanding Journalctl

journalctl is a powerful tool provided by systemd, and it’s essential to understand how it works. The real trick is to learn how to use its features effectively. The systemd.io website has extensive documentation on journalctl, which is definitely worth checking out. Don’t bother with trying to memorize every option, though - just get familiar with the basics and build from there.

[Read More]

Taming Disk Usage with btrfs Snapshots and Automatic Pruning on My Homelab Server

Introduction to btrfs Snapshots

As someone who’s run a homelab for years, I’ve learned that managing disk space is key to keeping my servers running smoothly. One of the most effective ways to keep disk usage under control is by using btrfs snapshots. I’ve seen this go wrong when people don’t have a solid backup strategy, and btrfs snapshots have been a lifesaver for me. The real trick is to use them in conjunction with a solid backup plan.

[Read More]

Taming tmux: How I Replaced My Desktop's Taskbar with a Custom Terminal Layout

Introduction to Custom Terminal Layouts

I’ve always been fascinated by the idea of replacing my desktop’s taskbar with a custom terminal layout. After months of tweaking and fine-tuning with tmux, I’ve finally settled on a setup that works perfectly for my daily workflow. The real trick is finding a configuration that suits your needs, and I’ve learned that it’s all about experimentation.

What is tmux?

For those new to tmux, it’s a terminal multiplexer that allows you to create multiple virtual terminals within a single window. This means you can have multiple shells, each with its own set of commands and output, all within a single window. I’ve seen this go wrong when people don’t take the time to understand how tmux works, so it’s worth reading up on the official tmux documentation before diving in.

[Read More]

Taming the initramfs: How I Solved My Linux Boot Hangs with Dracut Debugging

Introduction to initramfs

I’ve been using Linux for years, and I’ve had my fair share of boot issues. Recently, I encountered a frustrating problem where my system would hang during boot, and I had no idea what was causing it. After some digging, I discovered that the issue lay with my initramfs configuration. In this article, I’ll walk you through how I used Dracut debugging to identify and solve the issue.

[Read More]