57 lines
1.7 KiB
Desktop File
57 lines
1.7 KiB
Desktop File
[Unit]
|
|
Description=skyg-linux-tracker: read-only systemd, journal and Docker monitor (REST, MCP, OTel)
|
|
After=network.target docker.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/local/bin/slinuxm serve --config /etc/skyg-linux-tracker.toml
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
TimeoutStopSec=30
|
|
|
|
# Dedicated user, created beforehand: useradd --system --no-create-home \
|
|
# --shell /usr/sbin/nologin skyg
|
|
# A static user (not DynamicUser) so `sudo -u skyg slinuxm token ...` can open
|
|
# the same token database the service uses.
|
|
User=skyg
|
|
Group=skyg
|
|
# Read the journal. The tracker never writes to it.
|
|
SupplementaryGroups=systemd-journal
|
|
# WARNING: membership of the docker group is root-equivalent on the host (the
|
|
# Docker API can start privileged containers). Prefer pointing
|
|
# sources.docker_socket at a read-only socket proxy (see README) and leave this
|
|
# commented out. Uncomment only if you accept that risk (see ARCHITECTURE.md, Decisions).
|
|
#SupplementaryGroups=docker
|
|
|
|
# /var/lib/skyg-linux-tracker, owned by the service user, mode 0700.
|
|
StateDirectory=skyg-linux-tracker
|
|
StateDirectoryMode=0700
|
|
|
|
# Hardening
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectControlGroups=yes
|
|
ProtectClock=yes
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
SystemCallArchitectures=native
|
|
SystemCallFilter=@system-service
|
|
SystemCallFilter=~@privileged @resources
|
|
ProtectProc=invisible
|
|
ProcSubset=pid
|
|
RestrictSUIDSGID=yes
|
|
UMask=0077
|
|
CapabilityBoundingSet=
|
|
AmbientCapabilities=
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|