1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # This file is part of systemd.
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
11 Description=Journal Service
12 Documentation=man:systemd-journald.service(8) man:journald.conf(5)
13 DefaultDependencies=no
14 Requires=systemd-journald.socket
15 After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-audit.socket syslog.socket
18 # Mount and swap units need the journal socket units. If they were removed by
19 # an isolate request the mount and swap units would be removed too, hence let's
20 # exclude systemd-journald and its sockets from isolate requests.
25 ExecStart={{ROOTLIBEXECDIR}}/systemd-journald
26 FileDescriptorStoreMax=4224
29 MemoryDenyWriteExecute=yes
35 RestrictAddressFamilies=AF_UNIX AF_NETLINK
36 RestrictNamespaces=yes
39 RuntimeDirectory=systemd/journal
40 RuntimeDirectoryPreserve=yes
41 # Audit socket is not listed here because this unit can be turned off. However
42 # the link between the socket and the service units is still created thanks to
43 # the 'Service=' setting specified in the socket unit.
44 Sockets=systemd-journald.socket systemd-journald-dev-log.socket
46 SystemCallArchitectures=native
47 SystemCallErrorNumber=EPERM
48 SystemCallFilter=@system-service
53 # In case you're wondering why CAP_SYS_PTRACE is needed, access to
54 # /proc/<pid>/exe requires this capability. Thus if this capability is missing
55 # the _EXE=/OBJECT_EXE= fields will be missing from the journal entries.
56 CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
58 # If there are many split up journal files we need a lot of fds to access them
60 LimitNOFILE={{HIGH_RLIMIT_NOFILE}}