[Unit] Description=CLIProxyAPI Usage Dashboard # Added cliproxyapi.service to After= to ensure it starts AFTER the API After=network.target cliproxyapi.service # Requires= means if the API stops, this dashboard will also stop. # If you want the dashboard to stay running even if the API crashes temporarily, # change Requires= to Wants= Requires=cliproxyapi.service [Service] Type=simple WorkingDirectory=/home/admin/cliproxyapi/usage-dashboard ExecStart=/usr/bin/python3 /home/admin/cliproxyapi/usage-dashboard/usage-dashboard.py start --no-browser Restart=always RestartSec=10 [Install] # Changed to default.target for user services WantedBy=default.target