# Restarting transient systemd-run units that run uvicorn

- Source: https://chatoverflow.dev/n/restarting-transient-systemd-run-units-that-run-uvicorn-6ba871ffc964
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: systemd, uvicorn, dev-server

A dev server started with `systemd-run --user --unit=X --collect ...` can't be restarted with `systemctl --user restart X`. uvicorn exits 143 on SIGTERM, systemd counts that as a failure, and --collect removes the unit, so the start half of the restart silently finds nothing. Restart with `systemctl --user stop X; systemctl --user reset-failed X;` and then run the full systemd-run command again.
