self-update
The owlette agent can update itself remotely without physical access to the machine.
how it works
The self-update is handled by the service command handler in owlette_service.py:
- Receives an
update_owlettecommand from Firestore. - Requires
installer_urlandchecksum_sha256; readstarget_versionwhen provided and otherwise tries to infervX.Y.Zfrom the installer URL. - Rejects the command if another update marker is less than 10 minutes old.
- Checks for at least 500 MB of free disk space.
- Downloads the installer to
%ProgramData%\owlette\tmp\owlette-Update.exewith retry/backoff. - Verifies the file looks like a Windows executable and matches the supplied SHA-256 checksum.
- Writes
%ProgramData%\owlette\logs\update_in_progress.jsonso the next service start can report the update result. - Creates and runs an
OwletteUpdate_*scheduled task asSYSTEMwith highest privileges. The task launches the installer with/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /ALLUSERS /LOG="<path>". - Creates an
OwletteRecovery_*scheduled task that waits about five minutes, checks whetherOwletteServiceis running, and starts it if needed. - On the next service start, checks the update marker, compares
agent/VERSIONwith the target version, reports success or failure to Firestore, and removes stale update/recovery tasks.
The service does not stop itself and run the installer inline. Task Scheduler owns the installer process so it can continue after the service stops.
triggering an update
from the dashboard
- Open the deploy page in the dashboard.
- Click update owlette in the page header. The button is only shown while at least one machine on the current site is behind the latest installer.
- Select the machines to update. Only outdated machines are listed, and an offline machine cannot be selected — the agent has to be online to receive the command.
- Confirm the update.
The dashboard uses the current latest installer metadata automatically and sends an update_owlette command with the installer URL, expected SHA-256 checksum, and target version.
on the machine itself
The installer runs with /VERYSILENT, so nothing appears on screen. Setup closes the owlette desktop app before it copies files, so the window and the tray icon both disappear for the length of the update — that is expected, not a crash. The installer does not bring them back: the service relaunches the desktop app in tray mode as soon as it starts again.
what gets preserved
| preserved | replaced |
|---|---|
| ProgramData configuration | Agent application files |
| Encrypted OAuth tokens | Bundled Python packages |
| Log files | The service host (owlette-host.exe) and the desktop app |
| Cache and temporary data directories | Installer executable used for the update |
The installer upgrades in place and avoids deleting the ProgramData configuration, token, log, cache, and temp directories. It does not perform a separate config backup/restore step.
update command payload
{
"type": "update_owlette",
"installer_url": "https://firebasestorage.googleapis.com/.../Owlette-Installer-v2.1.8.exe",
"target_version": "2.1.8",
"checksum_sha256": "2f4c2f0e6d8f0c2f2a4f6f7a8b9c0d1e2f3a4b5c6d7e8f90123456789abcdef0",
"deployment_id": "deploy_abc123"
}Required fields:
| field | required | notes |
|---|---|---|
installer_url | yes | Download URL for the Windows installer. |
checksum_sha256 | yes | The command is refused without a checksum. |
target_version | recommended | Used for post-restart verification. If omitted, the agent tries to infer it from vX.Y.Z in the URL or records unknown. |
deployment_id | no | Passed through when updating command progress and completion. |
version verification
After the update completes:
- The service starts and reads the installed version from
agent/VERSION. - The startup check reads
%ProgramData%\owlette\logs\update_in_progress.json. - The agent compares the installed version with
target_version. - The command is marked completed or failed in Firestore.
- The next heartbeat reports
agent_version.
troubleshooting updates
update stuck
If the machine goes offline and does not come back:
- Check the machine physically if remote access is unavailable.
- Open the desktop app from the start menu (Owlette). The service is what relaunches it, so it will not be in the tray while the service is down. Opening the app attempts to start the service on its own, and its status footer keeps a start service button — either may raise a single UAC prompt.
- Read the logs. The app menu (☰) → logs opens
%ProgramData%\owlette\logs, and the start menu's View Logs shortcut opens the same folder without the app:service.log— the agent's own account of the update.installer_update.log— what the installer did.update_in_progress.json— old version, target version, command ID, and deployment ID. The service deletes this file on its next start, so finding it still present means the service has not come back.
- Check for leftover
OwletteUpdate_*orOwletteRecovery_*scheduled tasks.OwletteRecovery_*should already have tried to start the service about five minutes after the update began. - Start the service manually with
net start OwletteServicefrom an elevated prompt if the desktop app is unavailable.
version did not change
If the agent reports the same version after update:
- Review
%ProgramData%\owlette\logs\installer_update.logfor installer failures. - Confirm the installer URL was reachable from the target machine.
- Confirm the
checksum_sha256value matches the exact installer binary. - Confirm
target_versionmatches the version embedded in the installer.
rollback
To roll back to a previous version, trigger another update_owlette command that points to the older installer and includes that installer's SHA-256 checksum.
remote commands
The agent listens for commands from the web dashboard via Firestore. Commands are written as entries in a pending command map, executed by the agent, and mirrored into a completed command map as progress, completion, failure, or cancellation records.
agent troubleshooting
Common issues and how to resolve them.