[Unit] Description=OBS to HLS streaming proxy After=network.target [Service] User=www-data Group=www-data WorkingDirectory=/opt/obsproxy ExecStart=/opt/obsproxy/venv/bin/python /opt/obsproxy/server.py Restart=on-failure RestartSec=5s # Logging StandardOutput=journal StandardError=journal SyslogIdentifier=obsproxy # Environment variables Environment=PYTHONUNBUFFERED=1 Environment=STREAM_DIR=/var/www/streams Environment=PORT=5000 Environment=STREAM_PSK=your_pre_shared_key Environment=LOG_LEVEL=INFO Environment=INGEST_RTMP_HOST=127.0.0.1 Environment=INGEST_RTMP_PORT=1936 # Security settings NoNewPrivileges=true PrivateTmp=true ProtectSystem=full ProtectHome=true [Install] WantedBy=multi-user.target