# Systemd service file for phone-recorder # Copy to /etc/systemd/system/phone-recorder.service # Then: systemctl daemon-reload && systemctl enable --now phone-recorder [Unit] Description=Phone Recorder API Server After=network.target local-fs.target Wants=network-online.target [Service] Type=simple User=thallock Group=thallock WorkingDirectory=/work/hosting/recordings # Paths Environment="HOST=0.0.0.0" Environment="PORT=8000" Environment="BASE_DIR=/work/hosting/recordings" Environment="RECORDINGS_DIR=/media/external/Hosting/Recordings" Environment="DATABASE_PATH=/work/hosting/recordings/data/recordings.db" Environment="KEYS_DIR=/work/hosting/recordings/data/keys" ExecStart=/home/thallock/.local/bin/uv run python main.py Restart=always RestartSec=5 # Hardening NoNewPrivileges=true PrivateTmp=true [Install] WantedBy=multi-user.target