[Unit]
Description=Xpra System Server
Wants=avahi-daemon.socket
Documentation=https://github.com/Xpra-org/xpra/blob/master/docs/Usage/Service.md man:xpra
After=network.target xpra.socket
Requires=xpra.socket

[Service]
Type=simple
EnvironmentFile=-/etc/default/xpra
ExecStart=/usr/bin/xpra proxy :14500 --daemon=no \
    --tcp-auth=${TCP_AUTH} \
    --bind=none --auth=${AUTH} --socket-permissions=666 \
    --bind-quic=*:10000 --quic-auth=${QUIC_AUTH} \
    --ssl-cert=/etc/xpra/ssl-cert.pem --ssl-key=/etc/xpra/key.pem --ssl=on \
    --log-dir=/var/log --pidfile=/run/xpra/proxy/server.pid --debug=${DEBUG}
#rely on SIGKILL which returns 128+15=143
SuccessExitStatus=0 143
Restart=on-abnormal
PIDFile=/run/xpra/proxy/server.pid
ProtectSystem=strict
ReadWritePaths=/run/xpra /tmp
#PrivateDevices=true
ProtectKernelTunables=true
ProtectControlGroups=true

[Install]
WantedBy=multi-user.target
