Edgeweir
Nodes

Node overview

Edge node components, processes, console communication, how configuration takes effect, ports, file layout and versioning.

A node is the Go agent edgeweir-node plus an OpenResty data plane; it receives configuration from the console over mTLS and serves visitor traffic. Installation and enrollment: Adding nodes; parameters: Node configuration.

Components

ComponentDelivered asRole
Agentedgeweir-node (static binary): /usr/bin/edgeweir-node from the packages, /usr/local/bin/edgeweir-node in the imageEnrollment, mTLS channel, configuration validation and apply, tasks (purge, prefetch, upgrade, debug logs), heartbeats and statistics, ban sync, active health checks, OCSP
SupervisorThe same binary in supervise --manage-nginx mode; entry point of the systemd unit and the imageRuns the agent and OpenResty; signed upgrades, trial runs and rollback, see Node upgrades
OpenRestyPackage edgeweir-openresty 1.31.1.1-3: /usr/lib/edgeweir-openresty/ (HTTP/2, HTTP/3, Brotli, Zstandard)Data plane: routing, cache, origin fetches, rules, WAF, challenges, layer-4 forwarding (stream)
Lua modules/usr/share/edgeweir-node/lua/edgeweir/Data plane logic; receives the site table the agent pushes over a local unix socket
ModSecurity and OWASP CRSPackage edgeweir-openresty-modsecurity (optional): module in /usr/lib/edgeweir-openresty/modules/, CRS 4.29.0 in /usr/share/edgeweir-openresty/crs/Loaded only when a site enables the OWASP CRS
cosignThe host's cosign, or v3.1.3 installed by install.sh (/usr/local/bin/cosign); bundled in the imageVerifies checksums.txt for signed upgrades
Image conversionInternal child process of edgeweir-nodeWebP / AVIF conversion, see Image format conversion
Regional probeedgeweir-node probe, unit edgeweir-probe.serviceProbes the nodes' scheduling addresses; runs no OpenResty, see Regional probes

The console requests and renews site certificates; nodes fetch the certificate material over mTLS. Nodes answer ACME HTTP-01 challenges on port 80.

Processes

systemd: edgeweir-node.service (user edgeweir)
└─ edgeweir-node supervise --manage-nginx        supervisor
   ├─ edgeweir-node run --manage-nginx …          agent (base install or self-upgraded version)
   │  └─ edgeweir-node imgconv                    image conversion, one per conversion
   └─ nginx master (edgeweir-openresty)
      └─ nginx worker × worker_processes
ItemBehavior
OpenResty ownershipRun by the supervisor; the agent tests and reloads configuration through it. Restarting or upgrading the agent does not restart OpenResty; shared memory (bans, CC state, rate-limit counters, statistics counters) is kept
Agent restartsThe supervisor restarts an agent that exits, after 2 seconds doubling up to 1 minute; on exit status 2 (invalid flags or local settings) the supervisor exits with status 2 and systemd does not restart it (RestartPreventExitStatus=2)
StopSIGTERM goes to the supervisor; the agent stops first, then OpenResty exits gracefully; whatever remains after TimeoutStopSec=30s is killed
Without configurationBefore enrollment or without a usable configuration the data plane listens on --default-port (default 80) and answers every host with 404 (X-Edgeweir-Error: unknown-host)
run modeedgeweir-node run --manage-nginx runs without a supervisor and the agent runs OpenResty itself; no signed upgrades, self-upgrade-v1 is not reported

Communication with the console

Nodes only connect out to the console's node channel; the console never connects to nodes.

ItemBehavior
Address--server given at enrollment: the node channel port (default https://<console>:8443), or the WebSocket entry on the console's web port (wss://, ws://; node 0.2.0 or later), see Ports, reverse proxies and trusted proxies
ProtocolConnect RPC (protobuf) over HTTP/2; HTTPS_PROXY, HTTP_PROXY and NO_PROXY apply
EnrollmentOne-time token (prefix ewt_); the TLS chain must contain the internal CA pinned by --ca-sha256 before the token is sent; the private key (ECDSA P-256) is generated on the node and never leaves it
After enrollmentEvery RPC uses mTLS: the node certificate as client certificate, only the internal CA trusted
ConfigurationThe WatchConfig stream pushes new revisions; GetConfig also polls every 30 seconds (±20%)
HeartbeatReportStatus every 15 seconds (and right after an apply); a heartbeat within 45 seconds counts as Online
Statistics and logsStatistics every 60 seconds; sampled access logs every 10 seconds; node logs drained every second, see Node logs
Node certificateValid for 30 days; renewed automatically with a newly generated key when less than a third (10 days) remains or the console asks
Console unreachableThe node keeps serving the last configuration it applied (last-known-good, LKG); statistics, access logs and node logs are spooled in the state directory
Address changesNodes 1.2.0 and later follow the node channel address the console gives out, see Changing the node channel address

How configuration takes effect

StepBehavior
ValidationContent hash, cluster, capabilities and field ranges; an invalid configuration is refused as a whole, the LKG keeps serving and the same revision is not retried for 5 minutes
Single bad itemsInvalid domains, origins, listeners and similar items are skipped and reported as warnings; the rest applies
Structural changesListeners, cache zones, the set of sites, HTTPS sites' domains, protocol and compression settings, the OWASP CRS, layer-4 ports and protocols: nginx.conf is rendered again and reloaded after openresty -t passes; old workers serve existing connections until they end (limit: How long old workers stay)
Other changesHot update of the site table over the local control socket, no reload
PersistenceAfter a successful apply the revision is written to config/current.binpb; the previous one stays as config/previous.binpb
CapabilitiesA configuration that needs a capability the node lacks is refused as a whole and the console shows Upgrade required, see Node capabilities

Ports

Inbound (open in the host firewall and cloud security groups; conditions in Ports and firewall):

PortUse
80/TCPHTTP, ACME HTTP-01; default listener before any configuration
443/TCP, 443/UDPHTTPS, HTTP/3
The cluster's extra HTTP / HTTPS portsSee The cluster's listening ports
The cluster's port pool (1024–65535)Layer-4 forwarding

Outbound:

DestinationUse
The console's node channel (default 8443/TCP; the console's web port for the WebSocket entry)Enrollment and every RPC
The console's EDGEWEIR_PUBLIC_URLinstall.sh and the downloads mirror (installation only)
github.com, api.github.com and GitHub's download hostsinstall.sh and the default release source of signed upgrades
OriginsOrigin fetches and active health checks
OCSP respondersSites with OCSP stapling
DNS servers/etc/resolv.conf or --resolver, for origin host names
Other nodes' scheduling addressesWhen the node also probes, see Nodes as probes

Local unix sockets (no TCP listener):

PathUse
/run/edgeweir-node/control.sockData plane control API; used by healthcheck, bans, security, accesslog
/run/edgeweir-node/diag.sockAgent diagnostics (0600); used by diagnose, pprof
/run/edgeweir-node/control.sock.geoGeoIP lookups (served by the agent to Lua)
/run/edgeweir-node/edge.sock, edge-tls.sockLocal edge listener for prefetching
/run/edgeweir-node/origin*.sockInternal origin layer (origin, origin-noverify and their -h2, -grpc variants)
/run/edgeweir-node/l4.sockControl relay of the stream subsystem (with layer-4 applications)
/run/edgeweir-node/agent.sock, image.sockPURGE method, image conversion
/var/lib/edgeweir-node/upgrade.sockSupervisor (0600)

Files and directories

PathContent
/usr/bin/edgeweir-nodeAgent (same path for tar.gz installs; /usr/local/bin/edgeweir-node in the image)
/usr/share/edgeweir-node/lua/edgeweir/Lua modules
/usr/share/edgeweir-node/geoip/Bundled IPinfo Lite and NOTICE (container image only)
/usr/lib/edgeweir-openresty/OpenResty: nginx/sbin/nginx, luajit/, lualib/; modules/ and lib/libmodsecurity.so.3 come from edgeweir-openresty-modsecurity
/usr/share/edgeweir-openresty/OWASP CRS (crs/) and modsecurity/unicode.mapping
/etc/default/edgeweir-nodeEnvironment of the service (deb, rpm; local edits are kept), see Node configuration
/etc/default/edgeweir-probeEnvironment of the probe service (0600)
/usr/lib/systemd/system/edgeweir-node.service, edgeweir-probe.servicesystemd units (deb, rpm); tar.gz installs /etc/systemd/system/edgeweir-node.service
/var/lib/edgeweir-node/State directory (user edgeweir, 0700), see below
/var/cache/edgeweir-node/<zone>/Cache (0750)
/var/lib/edgeweir-probe/Probe identity (0700): probe.key (0600), probe.crt, ca.crt, probe.json

State directory /var/lib/edgeweir-node/:

FileContent
node.key (0600), node.crt, ca.crtNode private key, node certificate, internal CA certificate
identity.jsonNode ID, cluster ID, node name, node channel address and server name, CA fingerprint, enrollment time, fallback address; its presence marks the node as enrolled
config/current.binpb, previous.binpb, receipts.jsonLKG configuration and the one before, configuration receipts signed by the console (0600)
certificates.json, origin-client-certificates.jsonSite certificate chains, private keys and OCSP responses; origin client certificates (0600)
credentials.jsonS3 origin credentials, PURGE keys, access authentication secrets (plaintext, 0600)
challenge-keys.json, session-ticket-keys.jsonChallenge pass keys, TLS session ticket keys (0600)
bans.json, purge.jsonDynamic bans, purge markers (0600)
health.crt, health.keySelf-signed certificate of the health endpoint (0600)
traffic-spool.json, logs-spool.json, nodelogs-spool.jsonStatistics, access log and node log batches the console has not confirmed (0600)
run.lock, identity.lockAgent run lock, identity rewrite lock
upgrades/Supervisor state state.json and version directories releases/<task ID>/ (0700)
nginx/nginx prefix: conf/nginx.conf, logs/, tmp/

The state directory holds the node's private key, site private keys and origin credentials; copying it copies the node's identity. Enroll a new host with a new install command instead of copying another node's state directory.

Commands

CommandPurpose
edgeweir-node enrollEnroll with a one-time token; --force replaces an existing identity
edgeweir-node supervise --manage-nginxSupervisor (entry point of the systemd unit and the image)
edgeweir-node run [--manage-nginx]Run the agent without a supervisor
edgeweir-node probeRegional probe
edgeweir-node set-serverChange the node channel address after a check
edgeweir-node healthcheckExit status 0 once the data plane has a site table; prints healthy: revision N, M sites
edgeweir-node diagnose [--json]Check identity, certificate, console connectivity, clock, agent, configuration and data plane
edgeweir-node pprof PROFILEFetch a Go profile of the running agent
edgeweir-node bans [--list]Ban status of the data plane (JSON); --list lists up to 1000 bans
edgeweir-node securityChallenge keys, captcha pool and the sites' CC levels (JSON)
edgeweir-node accesslog [--site ID] [--json]Watch this node's requests live
edgeweir-node versionVersion, commit, build time, Go version and platform

Flags and usage: Node operations and Node configuration.

Supported platforms

ItemRequirement
Operating systemLinux with glibc 2.34 or later: RHEL, Rocky, AlmaLinux 9 or later, Debian 12 or later, Ubuntu 22.04 or later
Architectureamd64 (x86_64 for rpm), arm64 (aarch64 for rpm)
Service managersystemd; not needed for the container image
Install formsdeb, rpm, tar.gz (needs the edgeweir-openresty deb or rpm), container image ghcr.io/marvinli001/edgeweir-node

Versions

ItemRule
Version numbersSemantic versions vX.Y.Z on GitHub Releases; image tags X.Y.Z, X.Y and latest (newest final release)
Patch releasesFixes only
Minor releasesNew capabilities (*-vN), new commands, new optional flags
Major releasesRemoved capabilities or proto fields, an incompatible state directory or identity.json, higher system requirements, re-enrollment
With the consoleThe console sends configuration by the capabilities a node reports and does not compare version numbers; every 1.x minor release works with the current console
Edit on GitHub

On this page