SYSTEMD-NETLOGD(8)
๐ NAME ๐
hey bestie, gather round, because this is SYSTEMD-NETLOGD(8) โ the manual page for systemd-netlogd, and ngl it's kind of a whole personality โจ
So what is it, in one breath? systemd-netlogd โ forwards systemd journal messages to remote hosts via Syslog. That's it, that's the function, periodt ๐
And here's the lil table of contents so you know what's coming (spoiler: it's a lot, and every single crumb is important, no skimming bestie ๐):
- Name
- Synopsis
- Description
- Installation
- User Creation
- Running the Service
- Configuration
- [Network] Section Options
- Examples
- UDP Multicast
- Unicast UDP (RFC 3339)
- Custom Structured Data
- TLS
- DTLS
- Extract Journal Metadata
- TCP with Filtering
- Using Structured Data and Message IDs
- Files
- Troubleshooting
- See Also
- Author
- Colophon
๐ SYNOPSIS ๐
okay so this is literally the whole invocation, she's a simple girl:
systemd-netlogd [OPTIONS...]
๐ฆ DESCRIPTION ๐ฆ
systemd-netlogd is a lightweight, network-aware daemon that forwards log messages from the systemd journal over to remote hosts through the network using the Syslog protocol (RFC 5424 and RFC 3339) ๐ฅ She does unicast and multicast destinations, which means log aggregation in distributed environments stays efficient and cute, the way it should be.
Key features, and bestie, they kinda ate:
- Efficient forwarding: reads journal entries sequentially and transmits them one-by-one, with no buffering and no extra disk usage. Zero hoarding, we love that for her ๐
- Network integration: leverages
sd-networkso she starts forwarding when the network is up, and pauses when it's down ๐ like a respectful queen - Secure transports: supports UDP (default), TCP, TLS, and DTLS (RFC 6012 for datagram security) ๐
- Flexible output: formats logs as RFC 5424 (default), RFC 5425 (length-prefixed for TLS), or RFC 3339 โจ
- Isolation: runs as the dedicated system user
systemd-journal-netlogโ she has her own lil apartment, boundaries are healthy ๐ซถ - Filtering: exclude specific syslog facilities or levels, and target journal namespaces. Basically she's picky and it's a flex ๐
This daemon is ideal for edge devices, servers, or cloud setups that need centralized logging with minimal resource impact. Like, she's low-maintenance but high-value, the dream bestie combo ๐ญ
๐ INSTALLATION ๐
Go ahead and use your distribution's package manager, she's packaged:
- Ubuntu/Debian:
sudo apt install systemd-netlogd - Fedora/RHEL: available via COPR repositories (just search for
systemd-netlogd) - Arch Linux: build from AUR (
systemd-netlogd-git)
And if you're the build-it-from-source type (main character energy), check the GitHub repository at https://github.com/systemd/systemd-netlogd โญ
๐ธ USER CREATION ๐ธ
Okay important: the daemon requires a dedicated system user. Fr fr, no shortcut here. You can create it manually:
sudo useradd -r -d / -s /usr/sbin/nologin -g systemd-journal systemd-journal-netlog
Or, and this is the preferred way, via sysusers.d:
# /etc/sysusers.d/systemd-netlogd.conf
# Type Name ID GECOS Home directory Shell
u systemd-journal-netlog - - / /bin/nologin
Then apply it with:
sudo systemd-sysusers
That's it, user created, slay. Don't skip this step, bestie, she will NOT run without it ๐
๐ RUNNING THE SERVICE ๐
Enable and start her via systemd, the classic duo:
sudo systemctl daemon-reload
sudo systemctl enable --now systemd-netlogd.service
- Logs:
journalctl -u systemd-netlogd.service๐ - Manual invocation:
sudo systemd-netlogd(for testing, she doesn't mind being summoned directly)
๐ CONFIGURATION ๐
Her config gets read from /etc/systemd/netlogd.conf and any drop-ins in /etc/systemd/netlogd.conf.d/*.conf (INI format, we love a familiar format ๐ฅฐ).
The options live in the [Network] section. And when you've made changes, reload her like so:
sudo systemctl reload systemd-netlogd.service
okay that's the setup part done, but we are NOT done bestie, the options and examples are still coming, stay with me ๐
๐ [NETWORK] SECTION OPTIONS ๐
Okay bestie, this is the part where the tea gets real. Everything below lives inside the [Network] block of your config and controls how netlogd talks to whoever's on the other end. One bullet per option, and yes I kept the types and defaults because details are the whole personality ๐
Address=โ type string, default (required). This is your destination, and it's literally the one thing you cannot skip. It's either a unicastIP:PORTor a multicastGROUP:PORT. Seesystemd.socket(5)for the deets. ๐ซถProtocol=โ type enum, defaultudp. Your vibes are:udp,tcp,tls,dtls. Pick your fighter.LogFormat=โ type enum, defaultrfc5424. Options arerfc5424,rfc5425(the TLS-friendly one, she's built different), andrfc3339.Directory=โ type path, defaultsystem. Points at a custom journal directory if you don't wanna use the system one.Namespace=โ type string, defaultdefault. This is a filter, not a whole essay:IDgrabs that namespace,*grabs all of them, and+IDgrabs theIDplus thedefaultone. Chef's kiss logic โจConnectionRetrySec=โ type time, default30s. How long to wait before trying to reconnect, and no, you can't go belowโฅ1s. Seesystemd.time(5).TLSCertificateAuthMode=โ type enum, defaultno. Validation modes areno,allow,deny,warn.TLSServerCertificate=โ type path, default โ. This is your PEM CA/server certificate used for validation. No default, so you have to actually supply one if you want it.KeepAlive=โ type bool, defaultfalse. Turns on TCP keepalives (SO_KEEPALIVE). Seesocket(7). Basically a little "u still there??" poke.KeepAliveTimeSec=โ type sec, default7200. How long the connection sits idle before the probes start (TCP_KEEPIDLE).KeepAliveIntervalSec=โ type sec, default75. The gap between each probe (TCP_KEEPINTVL).KeepAliveProbes=โ type int, default9. How many probes fire before it gives up and closes (TCP_KEEPCNT). Nine chances, icon behavior.SendBuffer=โ type size, defaultsystem. Sets the send buffer (SO_SNDBUF), and yes she takesK/M/Gsuffixes like a queen.NoDelay=โ type bool, defaultfalse. Disables Nagle (TCP_NODELAY). Seetcp(7). Turning this on means send it NOW, no waiting around.StructuredData=โ type string, default โ. A fixed SD-ID, which is exactly the move if you're shipping to something like Loggly.UseSysLogStructuredData=โ type bool, defaultfalse. YanksSYSLOG_STRUCTURED_DATAstraight out of the journal.UseSysLogMsgId=โ type bool, defaultfalse. Same energy, but it extractsSYSLOG_MSGIDfrom the journal.ExcludeSyslogFacility=โ type list, default โ. Skips whole facilities, likeauth authpriv.ExcludeSyslogFacility='s bestie,ExcludeSyslogLevel=โ type list, default โ. Skips whole levels, likedebug.
Facilities you can name-drop:kern,user,daemon,auth,syslog,lpr,news,uucp,cron,authpriv,ftp,ntp,security,console,solaris-cron,local0โlocal7. Levels you can name-drop:emerg,alert,crit,err,warning,notice,info,debug.
๐ EXAMPLES ๐
Steal these fr fr, they're all just [Network] blocks with different main character energy.
๐ก UDP Multicast
[Network]
Address=239.0.0.1:6000
๐ฎ Unicast UDP (RFC 3339)
[Network]
Address=192.168.8.101:514
LogFormat=rfc3339
๐งฌ Custom Structured Data
[Network]
Address=192.168.8.101:514
StructuredData=[1ab456b6-90bb-6578-abcd-5b734584aaaa@41058]
๐ TLS
[Network]
Address=192.168.8.101:514
Protocol=tls
LogFormat=rfc5425
TLSCertificateAuthMode=deny
๐ธ DTLS
[Network]
Address=192.168.8.101:4433
Protocol=dtls
TLSCertificateAuthMode=warn
๐ฆ Extract Journal Metadata
[Network]
Address=192.168.8.101:514
LogFormat=rfc5424
UseSysLogStructuredData=yes
UseSysLogMsgId=yes
๐ฅ TCP with Filtering
[Network]
Address=192.168.8.101:514
Protocol=tcp
ExcludeSyslogFacility=auth authpriv
ExcludeSyslogLevel=debug
๐ USING STRUCTURED DATA AND MESSAGE IDS ๐
So you wanna tag your journal entries so they can be extracted later? Say less. Here's the whole thing in C, and I do mean exactly this:
#include <systemd/sd-journal.h>
int main(void) {
sd_journal_send(
"MESSAGE=%s", "Message to process",
"PRIORITY=%i", 4, // warning
"SYSLOG_FACILITY=%i", 1, // user
"SYSLOG_MSGID=%s", "1011",
"SYSLOG_STRUCTURED_DATA=%s", R"([exampleSDID@32473 iut="3" eventSource="Application"])",
NULL);
return 0;
}
And to build that little beauty:
gcc example.c -lsystemd
Periodt. Compile it, run it, watch the metadata flow ๐
๐ FILES ๐
/etc/systemd/netlogd.confโ the main configuration. The one that runs the show ๐/etc/systemd/netlogd.conf.d/*.confโ drop-in snippets, for when you only wanna tweak one tiny thing instead of touching the main file./lib/systemd/system/systemd-netlogd.serviceโ the service unit itself.
๐ฉบ TROUBLESHOOTING ๐ฉบ
ok bestie, something's off and you're spiraling. breathe. let's vibe check this together ๐
- No forwarding? First move: check
journalctl -u systemd-netlogd. That's where the tea lives โ. Then go verify your network is actually networking and that permissions aren't ghosting you โ both of those are the usual suspects fr fr. - TLS errors? Run
openssl verify -CAfile cert.pem server.crtand see what the certs have to say ๐. And if you're just trying to get something working while you debug, you can setTLSCertificateAuthMode=allowfor testing. (Testing!! lowercase testing. not production. do not leave that on, i'm begging ๐) - Test setup: make some fake logs with
logger -p user.info "Test"and catch them on the other side withnc -u -l 514. Tiny little sender, tiny little receiver, absolutely adorable ๐ฆ. great for confirming the whole pipeline is even alive. - Debug mode: override the service with
systemctl edit systemd-netlogdand drop inStandardOutput=journal+console. now it yells into both the journal and your terminal, which is exactly the main character behavior you need when nothing is making sense โจ.
lowkey the move here is always the same: journals first, then network, then permissions, then certs. in that order. every single time. no skips ๐
๐ SEE ALSO ๐
go read these next, i promise they're worth it:
systemd.socket(5)systemd.time(5)socket(7)tcp(7)systemd-journald(8)
and the literal receipts, the source material, the canon:
and the project itself, the whole reason we're here:
๐ธ AUTHOR ๐ธ
Susant Sahani <ssahani@gmail.com>
like. an icon. we owe them everything ๐ซถ
๐ COLOPHON ๐
this page is part of systemd-netlogd, version 1.4.5, dated December 1, 2025.
Author
- Susant Sahani
<ssahani@gmail.com>
Copyright
- 2024, Susant Sahani
and that's a wrap bestie!! ๐๐โจ you just read the whole thing, which honestly? ate. and if you scrolled all the way down to the version string โ that's the 1.4 build, dated Jul 24, 2026 ๐ go forth and forward some logs, you've got this ๐ฆ๐๐
๐ฆ where this page comes from
- ubuntu stonking: systemd-netlogd 1.4.5-1build1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms