Server Operations · about 1 min · 4 steps
Limit log disk usage
Stops logs from filling the disk: caps the systemd journal and makes sure log files are rotated daily.
Runs on
- Debian / Ubuntu: supported
- RHEL / Fedora: supported
- Alpine: supported — Alpine doesn't use the systemd journal; only log rotation is set up.
What it changes on your server
- Adds /etc/systemd/journald.conf.d/50-shellbay-size.conf capping the journal, then trims it to that size.
- Installs logrotate and makes sure it runs daily.
What Shellbay asks you
How much disk may the journal use?
In megabytes. The oldest entries are removed first. 500 MB keeps weeks of logs on most servers.
- Journal size limit (MB)
- A whole number from 50 to 10000. Default:
500
Example:
500
Steps
- Cap the journal
- Refresh the package list
- Install logrotate
- Rotate logs daily
Shellbay checks the server before the first step, and stops at the first step that fails.
When it's done
- Logs are capped and rotated daily.