Install the Edge Agent
Install, enroll, and verify the URUFI Edge Agent on a Linux network gateway.
The URUFI Edge Agent runs on the Linux gateway at each location. It connects outbound to Manager, receives the location's desired configuration, and runs the enabled local services: DHCP, captive access, nftables firewall enforcement, metrics, and RADIUS/EAP-TLS.
This guide uses the supplied installer. A manual systemd installation is included for operators who need to review or reproduce every step.
Before you begin
Prepare the following:
- an x86-64 or ARM64 Linux gateway using systemd;
- two network interfaces: one client-facing LAN and one internet-facing WAN;
- root or
sudoaccess; - outbound TCP access from the gateway to Manager port
9090; - a planned static IPv4 CIDR for the LAN, such as
10.10.0.1/24; - reliable system time, preferably synchronized with NTP;
- the current
urufi-agentrelease,install.sh, and Manager CA certificate from the Network Operations Console.
The published agent is a static Linux binary. The installer supports common package
managers, but it requires systemd, nft, ip, and arping.
Plan a maintenance window
This machine becomes the clients' DHCP server and default gateway. Configure its LAN address and confirm console access before connecting production clients. A wrong LAN or WAN selection can interrupt the location's network.
1. Confirm the network topology
The gateway must sit between the client network and the internet:
Internet ─ ISP router ─ WAN ─ [ Linux gateway + URUFI Edge Agent ] ─ LAN ─ switch ─ access points- LAN is the client-facing interface. The Edge Agent binds DHCP here and applies captive-access rules to traffic arriving from this side.
- WAN is the upstream interface used for internet access and NAT masquerading.
- Access points bridge client traffic to the LAN. They must not run a competing DHCP server or NAT clients behind another gateway.
The LAN address entered during setup must match the gateway of the native logical network created later in NOC. It may already be owned by the operating system, or the agent can safely assign and restore it when Manage LAN Address is enabled.
The agent must be the default gateway
HotSpot enforcement works only when client traffic passes through this machine. A bridged container elsewhere on the network cannot enforce gateway traffic reliably.
Useful checks before installation:
ip -br address
ip route
timedatectl statusRecord the exact LAN and WAN interface names. Do not assume they are eth0 and eth1;
modern Linux systems often use names such as enp1s0.
2. Download the release and Manager CA
In the Network Operations Console:
- Open Settings → Agent Software.
- Download the latest Binary and its
install.shfile. - In Settings → Transport CA, select Download manager CA.
The CA download is named urufi-manager-ca.pem. Copy all three files to the gateway,
for example:
scp urufi-agent install.sh urufi-manager-ca.pem operator@gateway:/tmp/If your release process provides a SHA-256 checksum, verify the binary before installing it:
sha256sum urufi-agent3. Install the agent
From the directory containing the downloaded files:
chmod +x install.sh
sudo ./install.sh
sudo install -m 0644 urufi-manager-ca.pem /etc/urufi/agent/manager-ca.pemThe installer:
- installs
nftables,iproute2,kmod,arping, andca-certificates; - enables IPv4 forwarding through
/etc/sysctl.d/99-urufi.conf; - installs the versioned binary under
/var/lib/urufi-agent/releases/, points/var/lib/urufi-agent/currentat it, and keeps/usr/local/bin/urufi-agentas a compatible command symlink; - creates
/etc/urufi/agentfor configuration; - installs a restricted systemd service;
- creates a private persistent state directory for the DHCP lease journal.
It does not start the service. Registration and first-run configuration come next.
Running the installer again is safe: it replaces the binary and service definition but
keeps an existing config.yaml.
Install from a URL
The installer can download the binary directly when you have a trusted release URL:
sudo AGENT_BINARY_URL="https://downloads.example.com/urufi-agent" \
AGENT_BINARY_SHA256="expected-sha256" \
./install.shOmit AGENT_BINARY_SHA256 only when your release channel does not provide a checksum.
TLS protects the download in transit; a checksum also verifies the exact artifact.
Manual installation
Skip this section if you used install.sh.
Install the required packages, enable forwarding, and place the binary:
sudo apt-get update
sudo apt-get install -y nftables iproute2 kmod iputils-arping ca-certificates
echo 'ifb' | sudo tee /etc/modules-load.d/urufi-ifb.conf
sudo modprobe ifb
echo 'net.ipv4.ip_forward = 1' | sudo tee /etc/sysctl.d/99-urufi.conf
sudo sysctl -p /etc/sysctl.d/99-urufi.conf
sudo install -m 0755 urufi-agent /usr/local/bin/urufi-agent
sudo install -d -m 0750 /etc/urufi/agent
sudo install -m 0644 urufi-manager-ca.pem /etc/urufi/agent/manager-ca.pemFor dnf or yum systems, install the equivalent nftables, iproute, iputils,
and ca-certificates packages. Then create this unit:
# /etc/systemd/system/urufi-agent.service
[Unit]
Description=URUFI Edge Agent (DHCP · RADIUS/EAP-TLS · firewall)
Documentation=https://urufi.net/docs
After=network-online.target nftables.service
Wants=network-online.target
[Service]
Type=simple
ExecStart=/var/lib/urufi-agent/current/urufi-agent
Restart=on-failure
RestartSec=3
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/etc/urufi/agent
StateDirectory=urufi-agent
StateDirectoryMode=0750
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_PACKET
[Install]
WantedBy=multi-user.targetReload systemd after creating the file:
sudo chmod 0644 /etc/systemd/system/urufi-agent.service
sudo systemctl daemon-reload4. Register the gateway in the NOC
- Open Agents in the Network Operations Console.
- Select Register Agent.
- Choose the organization, enter a clear agent name, and enter the gateway address you want shown in inventory.
- Open the registered agent and copy its Agent ID and Auth Key.

The Agent ID identifies this registration. The Auth Key is the secret used to prove the agent's identity during every Manager connection.
Protect the Auth Key
Do not place the Auth Key in tickets, chat messages, screenshots, or shell history. If you believe it has been exposed, replace the agent registration and issue a new key.
5. Run first-time setup
Start the terminal wizard:
sudo urufi-agent initial
Use Tab and Shift+Tab to move between fields. Use Space or the arrow keys for the TLS and LAN-address-management toggles. Use the arrow keys on an interface field to cycle through interfaces detected from the kernel.
| Field | Value |
|---|---|
| Agent Name | A recognizable name for this gateway |
| Agent ID | The UUID copied from the registered agent |
| Manager Host | A hostname or IP address this gateway can reach |
| Manager Port | 9090, unless your Manager listener uses another port |
| Auth Secret (Key) | The Auth Key copied from the registered agent |
| Secure Link to Manager (TLS) | Enabled for production |
| Manager CA Certificate | /etc/urufi/agent/manager-ca.pem |
| LAN / DHCP Interface | The client-facing interface |
| LAN Port Mode | access for untagged, trunk for tagged VLANs, or hybrid for both |
| Native LAN Address | The untagged gateway CIDR; optional only on a pure trunk |
| Manage LAN Address | Enable when URUFI should assign and restore the address; disable when the OS or container owns it |
| Allowed Managed VLANs | Local safety boundary such as 100,200-299; shown for trunk/hybrid |
| WAN Interface (internet) | The upstream interface |
| Save Configuration | Validate, securely write the configuration, and finish setup |
LAN and WAN must be different networks
The wizard rejects a missing interface, identical LAN/WAN selections, unusable host addresses, and overlapping LAN/WAN subnets. Select a real client-facing interface; kernel control files and loopback are not valid interfaces.
Choose who owns the LAN address
Enable Manage LAN Address on a native gateway when URUFI should own the address.
Before assignment, the wizard performs an ARP duplicate-address check. It then adds
the exact CIDR and records ownership in config.yaml. Every subsequent agent start
restores that address if it is missing.
Leave the toggle disabled when NetworkManager, netplan, systemd-networkd, OpenWrt, or Docker already configures the address. In this mode, setup requires the exact CIDR to already exist and the agent never removes or replaces it.
The Manager host does not need to match the generated certificate's DNS name. The agent
verifies the fixed URUFI Manager identity against the downloaded CA. Deployments using
a custom Manager certificate can set tls.server_name manually in the generated file.
The wizard writes /etc/urufi/agent/config.yaml and exits. It does not start the systemd
service. Tighten the file permissions before continuing:
sudo chmod 0600 /etc/urufi/agent/config.yamlThe generated configuration has this structure:
agent:
id: "agent-uuid-from-the-noc"
hostname: "cafe-downtown-01"
manager:
host: "manager.example.com"
port: 9090
reconnect_interval: 5
heartbeat_interval: 30
metrics_interval: 10
auth_secret: "agent-auth-key-from-the-noc"
network:
wan_interface: "enp1s0"
lan:
interface: "enp2s0"
mode: "trunk"
native_address: null
manage_native_address: false
allowed_vlan_ids:
- "100-299"
radius:
bind: "0.0.0.0:1812"
logging:
level: "info"
tls:
enabled: true
ca_cert: "/etc/urufi/agent/manager-ca.pem"The NOC cannot override physical LAN/WAN, port mode, or the allowed VLAN list. These are
local safety controls from config.yaml; changing them requires an agent restart. The NOC
manages only logical native/VLAN networks inside that boundary. Older dhcp and firewall
blocks remain readable when they agree, but conflicting old/new topology fails startup.
6. Check configuration before starting
Confirm all of the following:
- the native LAN CIDR is present, or
manage_native_addressistrueso the agent owns it; - the LAN and WAN interfaces are different and their IPv4 networks do not overlap;
- the WAN has a working default route;
- no other service is listening on DHCP UDP port
67on the LAN; - Manager is reachable on TCP port
9090; - every managed VLAN is carried tagged by the switch/AP uplink;
- logical network gateways and pools are in the same bounded subnet and do not overlap.
Example connectivity checks:
ip -br address
ip route
nc -vz manager.example.com 9090
sudo nft list rulesetIf nc is unavailable, use another TCP connectivity tool provided by your distribution.
7. Start and verify the agent
Enable and start the service:
sudo systemctl enable --now urufi-agent
sudo journalctl -u urufi-agent -fA successful connection includes these log messages:
UFP: connecting to manager.example.com:9090 (tls=true)
UFP: authenticated with manager
UFP: received config update from managerThe agent should now appear under the NOC's Connected tab. Open its details to confirm the reported version, interfaces, status, and metrics.
When manage_native_address: true, startup first verifies that the configured LAN CIDR is
safe and restores it before DHCP, firewall, or captive services can start. When it is
false, a missing address is a startup error rather than an invitation to modify an
OS-owned interface.
| Check | Command or action | Expected result |
|---|---|---|
| Service state | systemctl status urufi-agent | active (running) |
| Recent logs | journalctl -u urufi-agent -e | Successful authentication and config update |
| IPv4 forwarding | sysctl net.ipv4.ip_forward | net.ipv4.ip_forward = 1 |
| Local state | sudo ls -l /var/lib/urufi-agent | Private state directory; lease file appears after allocations |
| Firewall state | sudo nft list ruleset | URUFI table appears after firewall is enabled |
Service selection remains centrally controlled. Review the switches in the agent details and enable each service only after its network and policy prerequisites are ready.
8. Enable guest access
Before enabling HotSpot for this agent:
- Create and converge the native or VLAN networks, including DHCP pools, DNS, MTU, and Captive portal access policy.
- Configure the tenant's HTTPS captive destination in HotSpot.
- Configure free-trial, OTP, package, and branding policy in the Business Portal.
- Open Agents, select this agent, and verify its read-only LAN and WAN interfaces.
- Enable HotSpot and save the service settings.
Enabling HotSpot also enables its required DHCP and firewall services. Connect a test device to the open SSID and verify that it receives the expected address, gateway, and DNS values before testing the portal.
Use an HTTP URL to test captive detection
URUFI does not intercept HTTPS. If a device does not open its captive assistant, browse to an ordinary HTTP page and confirm that the agent redirects it to your HTTPS portal.
9. Enable secure WiFi
Configure the central side first:
- Open EAP-TLS → Certificates and select Initialize EAP-TLS.
- Switch to RADIUS & SSID and save the organization's secure SSID.
- In the same tab, add the access point as a NAS client for this Edge Agent. Enter the access point's source IP and a strong RADIUS shared secret.
- Open the agent details, enable EAP-TLS, and save. RADIUS is enabled with it.
Then configure the access point's secure SSID:
| Access-point setting | Value |
|---|---|
| Security mode | WPA2-Enterprise or WPA3-Enterprise using 802.1X |
| RADIUS server | Edge Agent LAN IP, such as 10.10.0.1 |
| Authentication port | UDP 1812 |
| Shared secret | The secret from the NOC RADIUS client |
The RADIUS shared secret authenticates the access point to the Edge Agent. Client devices use their individual EAP-TLS certificates instead of this secret.
An account must be active before it can download a device profile from the captive portal. Complete the open-SSID flow first, install the downloaded profile, and then join the secure SSID.
10. Troubleshooting
| Symptom | Check |
|---|---|
| Agent stays offline | Gateway DNS/routing, outbound TCP 9090, Manager listener, and system time |
| TLS handshake fails | Correct Manager CA path, readable CA file, system clock, and optional custom tls.server_name |
| Authentication is rejected | Agent ID and Auth Key must come from the same current registration |
| Setup lists a non-interface entry | Upgrade the agent; current releases accept only kernel entries with a valid interface index |
| LAN address is not assigned | Enable Manage LAN Address, or configure the exact CIDR through the operating system before setup |
| Duplicate-address check fails | Another device is using that LAN IP; choose the intended unused gateway address instead of bypassing the check |
| DHCP does not start | Correct LAN interface/CIDR, no competing DHCP service, and UDP port 67 availability |
| Client receives no internet | IPv4 forwarding, WAN default route, NAT/firewall service, and the receiving network's gateway/subnet |
| Portal does not open | HotSpot enabled, valid HTTPS portal setting, local DHCP lease, and an HTTP test request |
| EAP-TLS fails | EAP initialized, NAS source IP and secret correct, UDP 1812 reachable, and device certificate valid |
Start with the current boot logs:
sudo journalctl -u urufi-agent -b --no-pagerAfter editing /etc/urufi/agent/config.yaml, restart the service explicitly:
sudo systemctl restart urufi-agent11. Upgrade or roll back
The agent reports its version and build target to NOC. Upload a verified release in Settings → Agent Software, then choose Update from the agent details. The running agent streams the candidate, verifies its size and SHA-256, confirms the candidate's reported version and architecture, installs a versioned release slot, and asks systemd to restart into it.
The process restart causes a brief packet-service interruption but does not lose durable
network state. The new process restores the last-known-good snapshot before reconnecting,
then reports health.
If the candidate does not become healthy, the updater restores the previous current
slot and restarts it.
For the first upgrade from an agent installed before managed release slots existed, run
the current install.sh once with the new binary. Future releases can then use the NOC
update flow.
Manual fallback is simply a verified installer rerun:
sha256sum urufi-agent
sudo ./install.sh
sudo systemctl restart urufi-agent
sudo systemctl status urufi-agentThe installer preserves /etc/urufi/agent/config.yaml and the durable state directory.
Do not roll back across an explicitly incompatible release without checking its release
notes and configuration requirements.