[Unit] Description=JSON HTTP API for NUT upsc After=network-online.target nut-server.service Wants=network-online.target [Service] Type=simple ExecStart=/usr/bin/python3 /opt/jsonnutserver/server.py Environment=LISTEN_HOST=0.0.0.0 Environment=LISTEN_PORT=8000 Environment=PYTHONUNBUFFERED=1 Restart=on-failure RestartSec=5 # runs as a throwaway unprivileged user; upsc only needs network access to upsd DynamicUser=yes NoNewPrivileges=yes ProtectSystem=strict ProtectHome=yes PrivateTmp=yes [Install] WantedBy=multi-user.target