---
url: /en/posts/linux/unifi/uosserver-startup-failure-post-reboot.md
description: >-
  Fix the UniFi OS Server (uosserver) startup failure caused by a race condition
  post-reboot by configuring systemd drop-in dependencies.
---

# UniFi OS Server startup failure post-reboot

According to the Ubiquiti Community, the `uosserver` startup failure post-reboot is caused by a race
condition, solvable by creating a systemd "Drop-in" override to delay startup. Review the full
troubleshooting discussion at [Ubiquiti
Community](https://community.ui.com/questions/Uosserver-does-not-seem-to-start-properply-after-reboot/75ff79fa-a1b7-4ab4-98d6-6ab96e485914).

The `uosserver` startup race condition that prevents `uosserver` from starting up succesfully is
resolved by ensuring dependencies are met, specifically `dbus.service` for inter-process
communication, `systemd-logind.service` for user session management, and `user@1001.service` for
user environment initialization.

Verifying the correct UID via `id -u uosserver` and analyzing startup logs
with `journalctl -u uosserver.service -b` can confirm the fix.

Using `systemctl edit
uosserver.service` is the much cleaner, modern way to handle this because it
automatically creates the necessary override directory and file for you. [^1]

Here is the quick process using that command:

1. Open the editor: Run `sudo systemctl edit uosserver.service`.\
   This opens a blank override file.
2. Add the dependencies: Type the following lines into the editor:

```bash
[Unit]
After=dbus.service systemd-logind.service user@1001.service
```

3. Save and exit: The system will
   automatically run `systemctl daemon-reload` for you once you close the editor.
4. Verify: You can check that your changes were applied by running
5. `systemctl cat uosserver.service`, which will show
   the original file plus your "Drop-in" override at the bottom.

[^1]: [https://carlosneto.dev]\(https://carlosneto.dev/blog/2023/2023-11-19-systemd-override-parameters/\)
