Repository navigation
self update
Pre-Alpha. This page describes behavior that may change.
Ze can automatically download, verify, and install firmware updates on non-gokrazy deployments. The update cycle: check a version manifest, download the binary, verify its SHA-256, atomically replace the running binary via rename (keeping a .prev backup), and optionally restart.
The update path depends on the platform Ze runs on:
| Platform | Backend | Behaviour |
|---|---|---|
| Normal Linux | Ze self-update | SHA-256 verified download, atomic rename, .prev rollback, deterministic spread scheduling, maintenance windows, server-side pause, and persisted update history. Everything on this page applies. |
| Gokrazy appliance | gokrazy-ab |
Reports backend: gokrazy-ab, probes the gokrazy management socket for reachability and features, and returns structured "unsupported" responses for the manual firmware operations. Gokrazy owns image updates (atomic A/B partition swap); push images with bin/ze-setup appliance push <name>. See Appliance. |
show system update reports the active backend. The rest of this page describes the normal-Linux self-update backend.
Ze includes a standalone update server for build infrastructure:
ze update serve --listen :8080| Path | Purpose |
|---|---|
GET /version.json |
Enhanced manifest (version, sha256, size, paused). |
GET /<goos>/<goarch> |
Binary download. |
GET /<goos>/<goarch>/sha256 |
Hex SHA-256 digest (text/plain). |
The server computes SHA-256 at startup. If the binary changes on disk (rebuild), restart the server.
A running daemon can serve the same endpoints itself, from any command surface (ze cli, SSH, the web, REST, gRPC, MCP):
update serve # answers {"running": false, "paused": false}
update serve start listen :8080 # answers {"listen": "[::]:8080", "paused": false}
update serve pause # toggles the pause, answers the state it left
update serve stop # answers once the server has ended
update serve alone answers the status of the daemon's server and starts nothing. Without listen, the server listens on :8080; port 0 picks a free port and the answer names it. A daemon runs one update server at a time, so a second update serve start is refused until update serve stop. Stopping the daemon stops its update server, and the daemon finishes stopping only once the server has ended.
Two mechanisms, ORed together:
-
File: create a file named
update-pausedin the binary's directory. Remove to unpause. -
Signal: send
SIGUSR1to the foregroundze update serveto toggle the in-memory pause state. A signal sent to a daemon reaches the daemon, not its server, so under the daemonupdate serve pausetoggles it instead.
When paused, the manifest returns "paused": true. Clients with auto-apply stop downloading. Manual commands bypass pause.
Any HTTP server returning the manifest JSON works. Required fields:
{
"version": "26.05.20",
"sha256": "a1b2c3d4...64hex",
"size": 52428800,
"paused": false
}Optional fields: minimum-version (sequential upgrade enforcement), download-url (override download location, under the same URL rule as url below).
The server answers each request where it is asked. Ze follows a redirect of the manifest or of the binary only within the scheme and host of the request: a redirect to another host, or from https to http, is refused, and the target receives nothing. Configure the url the manifest really lives at, and name a binary on another host in download-url. The refusal reads "redirects to ..., and Ze did not follow it", and its fix: line sets url to the final manifest location, or asks the server to publish the binary's location as download-url, or to answer over https with no redirect.
system {
update-check {
url https://update.example.com/version.json;
}
}
Daily check, report via show system update and show warnings. No download.
The url, and a manifest's download-url, must be HTTPS. Plain HTTP is accepted only when the host is the router itself (127.0.0.1, ::1 or localhost). The host is compared after the URL is parsed, so a name such as 127.0.0.1.example.com is not loopback. Every URL Ze reads a file from answers to this one rule, including the RIR delegation sources.
system {
update-check {
url https://update.example.com/version.json;
interval 3600;
auto-apply true;
spread 1800;
maintenance-window {
start 02:00;
end 06:00;
}
restart {
time 03:00;
}
}
}
Check hourly. On new version: wait a random delay up to 30 minutes (spread), download and verify at any time, replace binary only between 02:00 and 06:00, restart at 03:00.
system {
update-check {
url https://update.example.com/version.json;
interval 300;
auto-apply true;
spread 0;
restart {
immediate;
}
}
}
Check every 5 minutes. Download immediately, stage, restart within 5 seconds.
show system update # Current status
show system update history # Last 20 update events
update system firmware check # Trigger immediate version check
update system firmware download # Download now (bypass spread, window)
update system firmware apply # Full cycle: download+verify+stage+restart
update system firmware restart # Restart into staged version
update system firmware rollback # Restore previous versionManual commands bypass spread and maintenance window.
After a successful update, the previous binary is preserved as <binary>.prev. To roll back:
update system firmware rollbackThis renames .prev to the target binary and restarts. After rollback, .prev no longer exists.
Each device computes a deterministic delay from its identity (machine-id or hostname) and the target version string. Default: 3600 seconds (1 hour). A fleet of 100 devices distributes downloads over approximately 1 hour.
The maintenance window gates only binary replacement (the rename step). Download and verification proceed at any time. Windows crossing midnight are valid: start 22:00 / end 06:00.
If the server sets minimum-version, devices running an older version are blocked from updating. They must update to the intermediate version first.
| Symptom | Cause |
|---|---|
| "not configured" | No url in update-check config. |
| "auto-apply requires server to provide sha256" | Server manifest missing sha256 field. |
| "waiting for spread" | Spread delay not elapsed. Use update system firmware download to bypass. |
| "waiting for maintenance window" | Outside configured window. Use update system firmware apply to bypass. |
| "paused by server" | Server manifest has paused: true; remove the pause file, send SIGUSR1, or run update serve pause on a daemon's server. |
| "checksum mismatch" | Binary changed on server. Restart ze update serve. |
-
System for the
update-checkconfiguration block. - Upgrade and Restart for the manual upgrade workflow.
- Health Checks for update-related warnings.
Adapted from main/docs/guide/self-update.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Install
- Docker
- netlab
- Appliance
- Quick Start
- Use Ze with an AI agent
- ExaBGP Migration
- CLI Tour
- Web UI Tour
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- Backup and Restore
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- Path MTU
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Telemetry
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Link State
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology