File: //etc/systemd/system/klausurenweb-schueler.service
[Unit]
Description=Klausurenweb Schüler Streamlit Service
After=network.target
[Service]
Type=simple
# Entfernen Sie die User-Zeile oder setzen Sie sie explizit auf root
# User=root
WorkingDirectory=/opt/klausurenweb-schueler
# Setzen Sie die PATH-Variable, damit systemd die richtigen Executables findet
Environment=CODEX_HOME=/opt/klausurenweb-schueler/.codex
Environment=PATH=/root/.nvm/versions/node/v22.22.1/bin:/home/karateka/miniconda3/envs/klausurenweb/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Optionally set other environment variables if needed
# Environment=MEINE_VAR=wert
ExecStart=/home/karateka/miniconda3/envs/klausurenweb/bin/streamlit run /opt/klausurenweb-schueler/app.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target