Fleet Desktop (macOS): "Fleet server URL not found" after MDM is turned off on a Mac that was enrolled
Fleet versions
- Discovered: Fleet Desktop for macOS 1.6.0 with Fleet 4.95.0 RC
- Reproduced: Fleet Desktop for macOS 1.6.0 with Fleet 4.95.0 RC
Web browser and operating system: Fleet Desktop for macOS app on macOS 26.6.2 (Apple silicon)
💥 Actual behavior
#54309 lets Fleet Desktop for macOS run on Macs that aren't enrolled in MDM. That works when fleetd was installed from a package built with --fleet-url. It doesn't work on a Mac that was enrolled in Fleet's MDM and then had MDM turned off.
On that Mac, Fleet Desktop opens to this error, with only a Quit button:
"Fleet server URL not found. Ensure fleetd is installed and enrolled on this Mac, then contact your administrator if the problem persists."
It stays that way until fleetd is reinstalled from a package built with --fleet-url, or the Mac is enrolled in MDM again. fleetd itself keeps running and the host stays online in Fleet.
The message doesn't tell the admin what the fix is.
🛠️ Expected behavior
Fleet Desktop keeps working after MDM is turned off, without reinstalling fleetd.
If that isn't possible, the error should tell the admin what to do (reinstall fleetd with --fleet-url, or re-deliver the fleetd configuration profile).
🧑💻 Steps to reproduce
These steps:
- [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [ ] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- In Fleet, turn on Apple MDM.
- Enroll a Mac in Fleet's MDM (I used manual enrollment from My device > Turn on MDM).
- Install Fleet Desktop for macOS 1.6.0 and open it. My device loads.
- Turn off MDM for the host (host details > Actions > Turn off MDM, or remove the enrollment profile on the Mac).
- Quit and reopen Fleet Desktop. It shows "Fleet server URL not found".
🕯️ More info (optional)
Fleet Desktop 1.6.0 reads the Fleet URL from two places:
FleetURLin/Library/Managed Preferences/com.fleetdm.fleetd.config.plist(the fleetd configuration profile delivered by MDM).EnvironmentVariables.ORBIT_FLEET_URLin/Library/LaunchDaemons/com.fleetdm.orbit.plist(only present when fleetd was packaged with--fleet-url).
When a Mac enrolls in MDM, Fleet reinstalls fleetd with ORBIT_USE_SYSTEM_CONFIGURATION, so the launchd plist has no ORBIT_FLEET_URL. I saw this on both re-enrollments of my test host, including one where fleetd had been installed with --fleet-url beforehand. When MDM is turned off, the profile is removed, and the only copy of the URL left is /opt/orbit/fleet_url.txt, which only root can read.
Already called out. PR #54324 lists this under "Not covered here": making /opt/orbit/fleet_url.txt readable is an orbit change (the shared writeOrbitFile helper also writes the enroll secret, so it needs a mode parameter) and "can be a follow-up". The Fleet Desktop for macOS README (apps/fleet-desktop-macos/README.md, "Configuration Sources") documents the workaround: re-deliver the profile or reinstall fleetd with --fleet-url.
Workarounds I tested.
- Reinstall fleetd by hand from a
fleetctl package --fleet-urlpackage. Fleet Desktop then loads My device with MDM off. - Remote: about 20 seconds after turning MDM off, I installed a
--fleet-url --enable-scriptsfleetd package from Fleet as a custom package. Fleet reported Installed and Fleet Desktop loaded. I didn't test this after a fleetd restart or a reboot.
Sprint planning assessment
Generated by Claude on behalf of Sharon FDM
| Field | Value |
|---|---|
| Team | Orchestration |
| Priority | Unprioritized |
| Recommended person | Lucas (lucasmrod) |
| Area | Allow world-readable mode for fleet_url |
| Estimated code lines | 15 |
| Effort label | ~claude-est-30 |