systemd-journal-upload on AlmaLinux

See systemd-journal-remote(8), journal-remote.conf(5) for detailed setup instructions. Consider this a minimal config example. See this in my NixOS configuration.

AlmaLinux 10

Install the systemd-journal-remote package:

sudo dnf install -y systemd-journal-remote

Populate the configuration file. Adjust to fit. I’m pulling all of my logs into a VictoriaLogs instance; you can use another machine running journal-remote or any other log server that takes the journal-upload format.

If you intend to use port 443, you’ll need to modify SELinux policy. I’ve made my VictoriaLogs server listen on the default port (19532) for systemd-journal-upload instead.

sudo tee /etc/systemd/journal-upload.conf > /dev/null << 'EOT'
[Upload]
# Compression = zstd:3 # not supported until systemd 258, n/a for alma 10
# NetworkTimeoutSec is unset
ServerCertificateFile = -
ServerKeyFile = -
TrustedCertificateFile = -
URL = https://victorialogs.lab.wporter.org:19532/insert/journald
EOT

Add an override to the default service config so systemd-journal-upload doesn’t give up after five tries (the default).

sudo tee /etc/systemd/system/systemd-journal-upload.service.d/override.conf > /dev/null << 'EOT'
[Service]
Restart=always
EOT

Enable the service:

sudo systemctl daemon-reload
sudo systemctl enable --now systemd-journal-upload

Proxmox VE 9

Install the systemd-journal-remote package:

sudo apt install -y systemd-journal-remote

Populate the configuration file. Adjust to fit. I’m pulling all of my logs into a VictoriaLogs instance; you can use another machine running journal-remote or any other log server that takes the journal-upload format.

If you intend to use port 443, you’ll need to modify SELinux policy. I’ve made my VictoriaLogs server listen on the default port (19532) for systemd-journal-upload instead.

sudo tee /etc/systemd/journal-upload.conf > /dev/null << 'EOT'
[Upload]
# Compression = zstd:3 # not supported until systemd 258, n/a for alma 10
# NetworkTimeoutSec is unset
ServerCertificateFile = -
ServerKeyFile = -
TrustedCertificateFile = -
URL = https://victorialogs.lab.wporter.org:19532/insert/journald
EOT

Add an override to the default service config so systemd-journal-upload doesn’t give up after five tries (the default).

sudo mkdir -p /etc/systemd/system/systemd-journal-upload.service.d
sudo tee /etc/systemd/system/systemd-journal-upload.service.d/override.conf > /dev/null << 'EOT'
[Service]
Restart=always
EOT

Enable the service:

sudo systemctl daemon-reload
sudo systemctl enable --now systemd-journal-upload