Live video on the AT Protocol
1[Unit]
2Description=Live video for the AT Protocol. Solving video for everybody forever.
3Documentation=https://stream.place/docs
4After=network-online.target
5Wants=network-online.target
6Wants=streamplace-http.socket streamplace-https.socket
7Requires=network.target
8
9[Service]
10Type=exec
11ExecStart=/usr/bin/streamplace
12Restart=always
13RestartSec=3
14TimeoutStartSec=60
15TimeoutStopSec=30
16
17User=streamplace
18Group=streamplace
19
20# Environment
21Environment=SP_DATA_DIR=/var/lib/streamplace
22
23# Additional environment file for user customization
24EnvironmentFile=-/etc/streamplace/streamplace.env
25
26# Security hardening
27NoNewPrivileges=yes
28ProtectSystem=strict
29ProtectHome=yes
30ProtectKernelTunables=yes
31ProtectKernelModules=yes
32ProtectControlGroups=yes
33RestrictRealtime=yes
34RestrictSUIDSGID=yes
35RemoveIPC=yes
36PrivateTmp=yes
37
38# Allow access to necessary directories
39ReadWritePaths=/var/lib/streamplace
40ReadOnlyPaths=/etc/streamplace
41
42# Network access
43PrivateNetwork=no
44RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
45
46# Resource limits
47LimitNOFILE=65536
48LimitNPROC=4096
49
50# Logging
51StandardOutput=journal
52StandardError=journal
53SyslogIdentifier=streamplace
54
55# Working directory
56WorkingDirectory=/var/lib/streamplace
57
58[Install]
59WantedBy=multi-user.target