Edgeweir
Nodes

Node upgrades

Signed batch upgrades from the console (canary, promotion, verification, automatic rollback), manual upgrades, downgrades and node capabilities.

Concepts

TermDefinition
Canary groupThe canary node group. The other nodes wait as Waiting for the canary group until promotion
Release sourceThe base URL of the node release files, one v<version>/ directory per release
Supervisoredgeweir-node supervise --manage-nginx, which downloads, verifies, switches and rolls back
Base installThe edgeweir-node and Lua modules installed by the package or image; signed upgrades are kept in the state directory under upgrades/releases/
Node capabilityA feature identifier a node reports. When a node lacks a capability the cluster's configuration needs, Clusters & nodes shows Upgrade required

Ways to upgrade

WayUpdatesFor
Signed upgrade from the consoleAgent binary and Lua modulesNodes running supervise under systemd or in a container
Package or imageAgent, Lua, supervisor, cosign, OpenRestyEvery node; fixes to OpenResty and the supervisor arrive only this way

Prerequisites

ItemRequirement
Cluster nodesEvery active node of the cluster: a heartbeat within 45 seconds, a healthy data plane, the cluster's current revision applied, Linux, an architecture (amd64 or arm64) the release has, and self-upgrade-v1 reported. A node that shows Upgrade required because it lacks a capability of the current configuration only needs an earlier revision applied
SizeAt most 1000 active nodes per cluster
ConcurrencyNo other upgrade in progress for nodes of the cluster
SupervisorThe node runs supervise --manage-nginx (the default of the node image and the systemd unit) and finds cosign; when EDGEWEIR_UPGRADE_PUBLIC_KEY is set, that file exists
Release filesThe release source's v<version>/ directory has checksums.txt, checksums.txt.sigstore.json and the edgeweir-node_<version>_linux_<arch>.tar.gz listed in checksums.txt

Nodes that do not meet the supervisor requirements do not report self-upgrade-v1. Nodes installed with --allow-unsigned get no cosign; without cosign on the host a node cannot be upgraded remotely. Installing nodes: Adding nodes.

Upgrade nodes

  1. Open Clusters & nodes, select the cluster, and switch to the Releases tab (/clusters?tab=releases).
  2. In Node upgrades, click New upgrade.
  3. Enter Target version, for example 1.6.2 (the tag v1.6.2 works too), and select Canary node group.
  4. Click Start upgrade. While the dialog lists Nodes not ready, it cannot start: deal with those nodes first (see below).
  5. Wait until the canary nodes show Succeeded and stay healthy for 30 seconds.
  6. Click Promote remaining nodes. The rest are upgraded in batches: at most a quarter of them at a time (at least one, by node name); when a node succeeds the next one is released.
  7. Verify: the upgrade shows Succeeded; Agent / engine of the nodes on the Nodes tab shows the target version.

An upgrade restarts the node's agent. OpenResty runs under the supervisor: it keeps serving during an upgrade and reloads the configuration, and bans, CC state and rate-limit counters survive; a rollback to an older version restarts it. An upgrade is not guaranteed to be hitless; choose a canary group whose traffic other nodes can absorb.

The dialog

ItemBehavior
Target versionPrefilled with the latest version of the release source: the latest GitHub release for the default source, a mirror's latest file otherwise (as install.sh reads it), cached by the console for 10 minutes; empty when it cannot be read. When every active node already runs that version or a newer one, the dialog says "Every node runs … or newer" and cannot start
Canary node groupDefaults to a canary node group (Canary turned on in the group's settings) with active nodes, else the non-default group with the fewest active nodes. Options show the active node count; when the chosen group holds every node (more than one), the dialog says "The group holds all … nodes; none remain for the rollout"
Nodes not readyActive nodes of the cluster that stop the upgrade, with the reason: Upgrade in progress, Offline, Not Linux, Unsupported architecture, No signed upgrades, Data plane unhealthy, Configuration not applied, Behind. A node showing Upgrade required that runs an earlier revision is not behind

Health window

ItemBehavior
ConditionThe canary nodes report the target agent version, revision and content hash, with a healthy data plane
DurationPromotion is possible after at least 30 seconds (two heartbeat intervals) of that ("Promotable after the canary group is healthy for 30 s")
RestartAn unhealthy report or a heartbeat gap above 45 seconds starts the window again

States

Upgrade stateMeaning
CanaryThe canary group is upgrading or being observed
RolloutThe other nodes are upgrading in batches
Succeeded / Failed / CancelledFinal result. The latest upgrade lists its nodes; each earlier finished upgrade is one row with version, result and time; the arrow at the end of the row expands its nodes and errors
Node stateMeaning
Waiting for the canary groupA non-canary node waiting for promotion
QueuedPromoted, waiting for the previous batch
PendingReleased, not started by the node yet; shows the deadline
UpgradingThe node is downloading, verifying or in its trial run; shows the deadline
Succeeded / Failed / CancelledThe node's result; Diagnostics shows what the node reported

Cancellation and expiry

ActionBehavior
Cancel queued workCancels node tasks in Waiting for the canary group, Queued and Pending; upgraded nodes keep their version; not possible while a node is Upgrading
ExpiryA node task not finished 30 minutes after release is recorded as "Upgrade task expired" and the whole upgrade fails; canary nodes are released when the upgrade is created, the others when their batch is released. The observation before promotion has no time limit
Disabling or deleting a nodeIts task is recorded as "Node disabled or deleted; not upgraded" and the other nodes continue; once every canary node is disabled or deleted the upgrade cannot be promoted: cancel it and start a new one

Checks on the node

The node accepts only the release source configured on the node (--upgrade-source / EDGEWEIR_UPGRADE_SOURCE, default https://github.com/marvinli001/edgeweir-node/releases/download). The URLs the console sends must match the target version, the node's Linux architecture and the expected file names exactly.

  1. Downloads checksums.txt (at most 2 MiB), checksums.txt.sigstore.json (at most 4 MiB) and the archive (at most 128 MiB) with a 90-second HTTP timeout and at most 4 minutes for the whole preparation. Redirects stay on the same scheme and host, at most 5; with the default release source GitHub's download hosts (release-assets.githubusercontent.com, objects.githubusercontent.com) are allowed as well.
  2. Verifies checksums.txt with cosign: certificate identity https://github.com/marvinli001/edgeweir-node/.github/workflows/release.yml@refs/tags/v<version>, issuer https://token.actions.githubusercontent.com.
  3. Checks that the SHA-256 in the task matches the signed list, then verifies the archive's SHA-256.
  4. Unpacks while refusing path traversal, links, special files and duplicate entries; at most 512 entries, 128 MiB per file and 256 MiB in total; checks the ELF architecture and the version edgeweir-node version prints.
  5. Places the binary and Lua in a private directory upgrades/releases/<task ID>/ (0700) of the state directory and switches after persisting its state.

The console cannot send shell commands, change the public key nodes trust or skip signature checks. Plain-HTTP test mirrors are verified the same way.

Supervisor and rollback

ItemBehavior
ExclusionThe supervisor holds the exclusive lock upgrades/supervisor.lock in the state directory, so a second process cannot mistake a running trial for an interrupted one; the private Unix socket upgrade.sock is mode 0600
SuccessThe candidate completes mTLS calls and applies the desired configuration (applied, healthy data plane, revision equal to the console's latest), and stays healthy for at least 10 seconds within a 90-second trial; the agent reports to the supervisor every 5 seconds, independent of the heartbeat interval
RollbackFailing within 90 seconds, exiting during the trial or a supervisor restart restores the previous binary, Lua and configuration snapshot
DowngradesA version older than the running one is refused ("Version … was rejected; the previous version is kept"); nodes started with --upgrade-allow-downgrade accept it, see Rolling back to an older version
ResultsThe result stays on disk until the console confirms it; a failed confirmation write does not drop it; failed downloads, verification or persistence are never reported as success
Never rolled backIdentity keys, certificates, credentials and statistics cursors do not go back with the binary
DiskOnly the current, the previous and the version being prepared are kept
ComponentUpdated by
Agent binary, LuaSigned upgrades, or the package or image
Supervisor, cosign, OpenRestyThe node image or the deb / rpm packages only; security fixes in these components need the full image or system packages

When a package or image update changes the base install's binary or Lua, the supervisor takes the new install instead of an older signed upgrade in the state directory; an upgrade task not yet confirmed is recorded as "The task for version … was superseded by a local package update". The console shows the running agent's version; edgeweir-node version from the system path shows the base install's version.

Manual upgrades

Verify the releases first. Package upgrades restart a running edgeweir-node.service from the package scripts (systemctl try-restart); OpenResty restarts with the service.

Install formCommand
Install commandAdd --version <version> at the end of the original script's set -- --token-file … line and run the complete command on the enrolled host (no new token needed): it verifies and installs that version, restarts the service and runs the health check
debsudo apt-get install ./edgeweir-node_<version>_amd64.deb (list the new edgeweir-openresty and edgeweir-openresty-modsecurity packages too when OpenResty changes)
rpmsudo dnf install ./edgeweir-node-<version>-1.x86_64.rpm (as above)
tar.gzReplace /usr/bin/edgeweir-node and the Lua modules as in tar.gz, then sudo systemctl restart edgeweir-node
ContainerPull the new tag and recreate the container with the same volumes and flags: docker pull ghcr.io/marvinli001/edgeweir-node:<version>
Node (enrolled)
curl -fsSL https://cdn-admin.example.com/install.sh | sudo bash -s -- \
  --server https://cdn-admin.example.com:8443 --ca-sha256 <CA fingerprint> --version 1.6.2

Verify: edgeweir-node version prints the new version; Agent / engine in Clusters & nodes shows it.

Rolling back to an older version

A failed signed upgrade rolls back by itself. To go back to an older version on purpose:

WaySteps
debsudo apt-get install --allow-downgrades ./edgeweir-node_<older version>_amd64.deb
rpmsudo dnf downgrade ./edgeweir-node-<older version>-1.x86_64.rpm
ContainerRecreate the container with the older tag and the same state volume
Console taskSet EDGEWEIR_UPGRADE_ALLOW_DOWNGRADE=true on the nodes and restart the service; the dialog cannot start while every node runs the target version or newer, so start it through the API with POST /api/v1/node-upgrades
ConstraintDetail
Base install firstAfter a package or image downgrade the supervisor takes the new base install; a newer signed upgrade in the state directory is no longer used
CapabilitiesAn older version that lacks a capability the cluster's configuration needs keeps the last configuration it applied and shows Upgrade required, see Node capabilities; as the candidate of a signed task it cannot apply the current configuration and rolls back after 90 seconds
Major versionsAcross major versions the state directory may be incompatible; within one major version it is compatible
OpenRestyThe supervisor stops OpenResty before switching to an older binary and starts it again

Private mirrors and own releases

ItemSetting
Console release sourceWhere the console reads release manifests, set in System settings → Node release source, see Node release source
Node release sourceThe node's EDGEWEIR_UPGRADE_SOURCE, the same v<version>/ layout as the console release source
Mirror requirementsThe mirror serves the files directly; nodes refuse cross-origin redirects
Own signing keySet EDGEWEIR_UPGRADE_PUBLIC_KEY on the node to a public key the operator deploys there; the node verifies against it instead of the public transparency log, and changing the console's database cannot change the key a node trusts
Plaintext mirrorsEDGEWEIR_UPGRADE_ALLOW_HTTP=true only for a deliberately chosen local test or air-gapped mirror; default false
/etc/default/edgeweir-node
EDGEWEIR_UPGRADE_SOURCE=https://mirror.example.com/edgeweir-node
EDGEWEIR_UPGRADE_PUBLIC_KEY=/etc/edgeweir-node/release.pub

Run sudo systemctl restart edgeweir-node afterwards. Flag table: Node configuration; signing and verifying: Sigstore documentation.

Node capabilities

Nodes report their capabilities in every heartbeat. The console derives the capabilities each cluster's configuration needs when it compiles it.

Capabilities a configuration needs

A node without one shows Upgrade required; it keeps using the last configuration it applied and refuses configurations with unknown capabilities or enum values.

CapabilityNeeded for
tls-v1Sites with HTTPS settings (the HTTPS view has been saved)
http01-v1ACME HTTP-01 validation
tls-pending-domains-v1Domains served over HTTP until the certificate covers them
http3-v1Sites with HTTP/3 on
brotli-v1, zstd-v1Sites with Brotli or Zstandard compression
modsecurity-v1Sites with the OWASP CRS; the node needs edgeweir-openresty-modsecurity
rules-v1Site rules, global rules, Allow or Block IP lists
rules-v2Rule engine extensions: functions and the new fields, expression targets and query parameter edits, origin overrides, compression rules, the new override settings, cache rule expression conditions and browser TTLs, bulk redirects, origin groups, see Rules
rules-v3Expression fields and header values: cookies and query parameters by name, new fields such as User-Agent and Referer, new functions and wildcard comparisons, expression values for request headers, response headers and query parameters, appended response headers, redirect 303, {{time}} and {{path}} in error pages, see Rules
rules-body-v1Rules that read request body fields, or a rules body limit
waf-v2The ban, respond, close and skip rule actions; access log lines from log rules; rate-limit bans; CRS overrides and exclusions by path
challenge-v1The challenge action, Under Attack, CC mitigation, or session affinity (which needs challenge keys)
challenge-v2Verified search engine crawlers, crawler fields, challenge page texts, bans after failed challenges
ja4-v1Rules that read or count by tls.ja4, or access logs recording JA4
geoip-city-v1Rules or geo access control by country (or subdivision); reported when the node has country data
geoip-asn-v1Rules or geo access control by ASN; reported when the node has ASN data
geoip-subdivision-v1Rules using ip.geoip.subdivision, or geo access control by subdivision; reported when the node has a City MMDB, checked by the console only; older nodes that do not report geoip-country-v1 count geoip-city-v1 instead
access-logs-v1Access log sampling
access-logs-v2A site logs blocked, challenged and authentication-refused requests always, or records query strings, request headers or the peer address, see Access logs
access-auth-v1Access authentication rules
access-control-v1A site's access control
error-pages-v1Site error pages
site-content-v1Cache keys that drop parameters, caching responses with Set-Cookie, the PURGE method, hiding X-Cache, error pages for more statuses and redirects, maintenance mode, charsets, the gzip level and largest compressed response, request body limits, origin retry settings
cache-zone-v1A node with its own cache size
active-health-v1, active-health-grpc-v1Active health checks of origin pools; gRPC checks
session-affinity-v1Session affinity
origin-http2-v1HTTP/2 to origins and end-to-end gRPC
origin-proxy-protocol-v1PROXY protocol towards origins
origin-mtls-v1Client certificates towards origins
origin-ca-v1, origin-ca-rotation-v1The Origin CA as the only trust anchor; trusting the previous Origin CA as well during a rotation
multi-certificate-v1Several certificates for one site
client-cert-v1Visitor client certificates (mTLS) and the tls.client.* fields
image-convert-v1A site converts images to WebP / AVIF, see Image format conversion; nodes running with --image-workers 0 do not report it
markdown-v1A site has Markdown for Agents on, see Markdown for Agents; nodes running with --markdown-workers 0 do not announce it
edge-ports-v1The cluster has extra listener ports, a site is bound to ports other than the defaults, or the HTTPS redirect uses a status, port or excluded domains other than the defaults, see HTTPS
client-ip-v1The cluster's client IP is not direct (or drops the client's X-Forwarded-For), or a rule reads ip.peer, see Client IP
domains-v2A site (disabled ones included) has . suffix or pattern domains, see Domain forms
unknown-host-v1The cluster's unknown host settings are not the defaults (a handling other than the unknown host page, or scan protection on), see Unknown hosts and node IP access
l4-v1The cluster has an enabled L4 app: layer-4 forwarding and L4 statistics. Without it the port pools tab, the L4 app list and the dialog warn "Nodes {nodes} in {cluster} lack L4 forwarding and skip configurations with L4 apps until upgraded"
l4-v2An L4 app uses a port range, origins on the arriving port or TLS termination, see L4 forwarding
stats-sequence-v1Sequenced statistics reports; without it the node always shows Upgrade required

Such nodes can be upgraded directly and apply the current configuration afterwards; the target version must have the missing capability, otherwise the candidate cannot apply the current configuration and rolls back after 90 seconds. Console accounts (session or AccessKey) can publish a configuration that needs a new capability, and nodes without it keep their configuration as above; service accounts and background jobs publishing such a configuration get 409 NODE_CAPABILITY_REQUIRED.

Task capabilities

Without one the console refuses that task for the affected cluster; Upgrade required is not shown.

CapabilityTask
purge-tag-v1Purge by host and by Cache-Tag
prefetch-v2Prefetch of desktop and mobile variants, sitemap prefetch
debug-logs-v1Pull debug logs ("Node version too old" without it), see Node logs

Other capabilities

Without one Upgrade required is not shown; the feature is unavailable for that node or its data is partial.

CapabilityPurpose
self-upgrade-v1Signed upgrades; reported when the supervisor runs and finds cosign
metrics-v1Host metrics in the heartbeat (CPU, load, memory, egress, active connections), reported by Linux nodes; without it node metrics and node-metric scheduling conditions show No data
stats-dims-v1Statistics dimensions (regions, networks, referrers, clients, protocols, block reasons, challenges); while an active node of a cluster lacks it the statistics page notes that data is incomplete
origin-stats-v1, rule-log-v1Origin fetch statistics per origin; hit counts of log rules; partial without them
probe-health-v1The health endpoint /.edgeweir/health on the edge listeners; when every active node of a cluster has it, regional probes probe with HTTP / HTTPS, otherwise TCP connections only
node-logs-v1Uploading node logs, see Node logs
channel-follow-v1Following the node channel address the console gives out (1.2.0 and later); without it the node shows Upgrade to switch
bans-v1, greylist-v1, kernel-ban-v1, conn-limit-v1Receiving dynamic bans; receiving greylist entries; kernel bans active; understanding the cluster's per-address connection limits (enforced through nftables)
auth-identity-headers-v1, certificate-isolation-v1Security fixes: identity headers of disabled access authentication rules are removed; a certificate that cannot be loaded is skipped alone. A node that lacks either and does not show Upgrade required is marked Upgrade recommended under Agent / engine (tooltip: "Missing security fixes from newer releases")
encoded-path-exemptions-v1Paths with %2F or ; under prefixes a site lists are compared and cached as they are; older nodes ignore the setting

API

ProcedureEndpointPurpose
upgrades.releaseGET /node-releases/{version}Read a release manifest: archive, SHA-256 and signature URLs per architecture
upgrades.latestVersionGET /node-upgrades/latest-versionThe latest version of the release source; null when unknown
upgrades.listGET /node-upgradesUpgrades with each node's state; clusterId limits it to one cluster
upgrades.createPOST /node-upgradesStart an upgrade: version (a leading v is dropped), nodeGroupId (the canary group)
upgrades.promotePOST /node-upgrades/{id}/promotePromote the remaining nodes
upgrades.cancelPOST /node-upgrades/{id}/cancelCancel queued work

The endpoints live under /api/v1. Read-only AccessKeys can call the GET endpoints only; service accounts cannot call these procedures.

Limits

ItemDetail
InterruptionSigned upgrades restart the agent; OpenResty restarts only on a rollback to an older version or an image or package update. Upgrades are not hitless
PlatformsLinux amd64 and arm64 only
ScopeSigned upgrades update only the agent binary and Lua

Troubleshooting

SymptomCauseFix
"These nodes must be online, healthy, in sync and support signed upgrades: …"The listed active nodes (up to 10, the rest as "+N") are offline, have not applied the current revision (except nodes behind only for a missing capability), have an unhealthy data plane, lack self-upgrade-v1, or have an architecture the release lacksFix or disable those nodes and retry
"The canary node group has no enabled nodes"The chosen group has no active nodesChoose another group
"An upgrade covers at most 1000 nodes"The cluster has more than 1000 active nodesSplit the cluster
"Use a version such as 0.2.0"Target version is not major.minor.patch (a pre-release suffix such as 1.0.0-rc.1 is allowed)Correct the version
"This release manifest is unavailable"The version does not exist, the release source is unreachable, or the manifest lacks a Linux archiveCheck the version and the console release source
"The release source must use HTTPS and resolve to an allowed address"The release source saved in System settings → Node release source violates the outbound policySee Node release source
"These nodes already have an unfinished upgrade: …"The listed nodes already have a task, or they are Upgrading when cancellingWait for the current task to finish
"The upgrade has already finished"Cancelling a finished upgrade—
"Canary nodes have not passed the health window"The canary group has been healthy for less than 30 secondsWait, then promote
"Version … was rejected; the previous version is kept"Download, signature, checksum, archive or version check failed, or the target is older than the running versionSee Diagnostics; check the node release source and public key
"Version … failed the health check and was rolled back"The candidate did not apply the configuration and stay healthy within 90 secondsSee Node logs
"Upgrade task expired"Not finished within 30 minutes of releaseCheck the node's connection and start again
"The task for version … was superseded by a local package update"The node's package or image was updated before the upgrade was confirmedThe installed version stands; start again if needed
"Queued node upgrades were cancelled"Cancel queued work was clicked, or the queued tasks stopped after a node failedFix the failed node and start again if needed
"Node disabled or deleted; not upgraded"The node was disabled or deleted during the upgrade—
The node does not report self-upgrade-v1It runs run, finds no cosign, or the file EDGEWEIR_UPGRADE_PUBLIC_KEY names does not existUse the default systemd unit or image; install cosign; upgrade manually
Edit on GitHub

On this page