# The HEOS panel as a service. # # sudo cp /var/www/html/heos/deploy/heos-panel.service /etc/systemd/system/ # sudo systemctl daemon-reload # sudo systemctl enable --now heos-panel # # So the deploy workflow can restart it without a password prompt: # # echo 'franzz ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart heos-panel' \ # | sudo tee /etc/sudoers.d/heos-panel # sudo chmod 440 /etc/sudoers.d/heos-panel # # (that user is whoever the Gitea runner runs as -- see .gitea/workflows/deploy.yml) [Unit] Description=HEOS panel After=network-online.target Wants=network-online.target [Service] Type=simple User=franzz Group=www-data WorkingDirectory=/var/www/html/heos ExecStart=/var/www/html/heos/.venv/bin/python /var/www/html/heos/app.py # Add --host 127.0.0.1 above to allow only the reverse proxy in. Restart=always RestartSec=3 [Install] WantedBy=multi-user.target