Logging & Journald
Stop your logs from vanishing into the void after a reboot
🧩 The Challenge
You know that feeling when a service crashes at 3 AM, the server reboots automatically, and when you log in, journalctl shows absolutely nothing from the previous session? I spent way too many nights staring at a blank screen because journald defaults to volatile storage.
💡 The Fix
Flip the setting in your config file to make the logs persist on disk so they actually survive a power cycle or a reboot. It’s the first thing I change on every fresh install now.
sed -i 's/#Storage=auto/Storage=persistent/' /etc/systemd/journald.conf && systemctl restart systemd-journald
⚙️ Why It Works
By default, journald often keeps logs in /run/log/journal, which gets wiped clean every time the machine drops power. Forcing it to persistent mode moves those files to /var/log/journal/ where they stay put until you manually rotate or delete them.
🚀 Pro-Tip: Check that /var/log/journal exists first, or just let systemd create it once you restart the service.
Linux Tips & Tricks | © ngelinux.com | 7/18/2026
