[Unit] Description=Playwish – Website, Admin-Bereich und Player-API After=network-online.target Wants=network-online.target [Service] User={{PLAYWISH_USER}} Group={{PLAYWISH_USER}} WorkingDirectory={{PLAYWISH_DIR}}/app Environment=PLAYWISH_ENV={{PLAYWISH_DIR}}/.env ExecStart={{PLAYWISH_DIR}}/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port {{APP_PORT}} --workers 1 --no-access-log --proxy-headers --forwarded-allow-ips 127.0.0.1 Restart=always RestartSec=3 UMask=0077 # Härtung NoNewPrivileges=yes ProtectSystem=strict ProtectHome=yes ReadWritePaths={{PLAYWISH_DIR}}/data {{PLAYWISH_DIR}}/.env PrivateTmp=yes PrivateDevices=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectControlGroups=yes RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX LockPersonality=yes MemoryMax=300M [Install] WantedBy=multi-user.target