# Set up an Edge gateway (/docs/guides/edge-setup)



A Xentr Edge sits on your factory LAN, speaks the proprietary protocols your machines already use (FOCAS, OPC-UA, Modbus TCP, MTConnect), and forwards normalised telemetry to `api.xentr.ai`. You get one per site by default — bigger factories run several for network segmentation.

This guide walks through the 10-minute customer flow. If you're a Xentr support engineer, see the internal ops runbook (`docs/edge-runbook.md` in the monorepo) for deeper troubleshooting; customers who get stuck can contact Xentr support.

## What you need [#what-you-need]

* A Xentr Edge (CL210 rugged kit we ship, **or** your own Ubuntu 22.04+ server for the BYO tier)
* An Ethernet cable
* Access to your factory LAN, reachable from the same subnet as your machines
* A phone or laptop signed in to `app.xentr.ai` with the **Organization Admin** role
* Outbound HTTPS to `*.xentr.ai` (port 443) and MQTT over TLS to `mqtt.xentr.ai:8883`

## 1. Unbox and power on [#1-unbox-and-power-on]

Your paper Quickstart card is inside the box. Keep it — you'll need the claim code.

1. Plug the edge into a Gigabit Ethernet port on your factory LAN.
2. Plug in power. The CL210 has no power button; it boots as soon as power lands.
3. Wait for the LED sequence: **amber** (booting) → **blue** (contacting cloud) → **green** (ready to claim). Takes \~60 seconds.

If the LED stays amber past two minutes, see [LED reference](#led-reference) below.

## 2. Claim the edge [#2-claim-the-edge]

Two ways; either works.

**From a phone:** scan the QR on the paper Quickstart card. You'll land on `app.xentr.ai/edges/claim?serial=...` with the serial pre-filled. Enter the 6-character claim code and click **Claim**.

**From the dashboard:** go to **Settings → Edge Gateways → Add edge**. Enter the claim code from the paper card.

Within \~30 seconds you'll see the edge flip from **pending** → **claimed** → **live**. If it stalls on **pending**, see [troubleshooting](#troubleshooting).

## 3. Scan for machines [#3-scan-for-machines]

1. Click the newly-claimed edge.
2. Click **Scan network**.
3. Keep the default subnet (usually `192.168.1.0/24`) and click **Scan**.

The edge probes common industrial ports — FOCAS 8193 for Fanuc, 4840 for OPC-UA, 502 for Modbus, 5000 for MTConnect — across every host on the subnet. Reads only; nothing is written to your machines.

Most scans finish in \~30 seconds and return a table with:

* Vendor + model (when we can detect it)
* Protocol + port
* Host IP
* Suggested template (e.g. *Fanuc 31i-B Machining Center*)

## 4. Enroll a machine [#4-enroll-a-machine]

For each discovered machine:

1. Click **Enroll**.
2. Pick the auto-matched template (or a different one if the machine is unusual).
3. Optionally adjust the poll interval (default 1 second is right for most shops).
4. Click **Save**.

Within 10 seconds of save the edge has its new config and starts polling. Readings begin flowing into the dashboard immediately.

## 5. Verify data is flowing [#5-verify-data-is-flowing]

Open `app.xentr.ai` → **Workstations** → click the newly-enrolled machine. You should see live readings within 30 seconds.

If not, the edge's local diagnostics page will tell you why. Point a browser at `http://<edge-ip>:3002/diagnostics` (reachable on the same LAN as the edge). The page auto-refreshes every 3 seconds and shows:

* Cloud connection state
* Buffered vs flushed readings
* Config revision (should be non-zero after claim)
* Recent scan hits

## LED reference [#led-reference]

| Colour                 | Meaning                                          |
| ---------------------- | ------------------------------------------------ |
| Off                    | No power                                         |
| **Amber** (solid)      | Booting, running self-checks                     |
| **Amber** (slow blink) | Waiting for network (plug in Ethernet)           |
| **Blue** (solid)       | Contacting Xentr cloud                           |
| **Blue** (fast blink)  | First-time enrollment in progress                |
| **Green** (solid)      | Ready — claim or serving data                    |
| **Green** (slow blink) | Polling machines, data flowing                   |
| **Red** (solid)        | Faulted — see diagnostics at `:3002/diagnostics` |
| **Red** (fast blink)   | Cert rotation failed; support needed             |

## Troubleshooting [#troubleshooting]

### Edge stays on **pending** after claiming [#edge-stays-on-pending-after-claiming]

* **Is the edge online?** `ping <edge-ip>` from your laptop. No response → check Ethernet.
* **Can the edge reach our cloud?** Browse to `http://<edge-ip>:3002/diagnostics`. The **Cloud link** row shows connection state; if *Disconnected*, your firewall likely blocks `mqtt.xentr.ai:8883` outbound.
* **Is the claim code expired?** Codes are valid for 30 days. Regenerate one from the dashboard and try again.

### Scan returns no machines [#scan-returns-no-machines]

* Check the subnet. If your machines are on `10.0.1.0/24` but the edge defaults to `192.168.1.0/24`, edit the subnet field.
* Make sure the edge is on the same VLAN as the machines — most factory LANs segment PCs from CNCs. Ask IT.
* Confirm the machines actually expose their data ports. FOCAS on port 8193 is usually off by default on older Fanuc controllers; your operator may need to enable it via parameter 8701.

### Machines enrolled but no data arriving [#machines-enrolled-but-no-data-arriving]

* Open `/diagnostics` on the edge. Is the buffer growing? Then the edge is reading fine but can't reach the cloud.
* Is the buffer empty and the device count correct? The plugin may be connected but the machine isn't producing data (e.g. the CNC is off).
* Check **Workstations → machine → Data points** — the template may define points your model doesn't expose. Remove unsupported points or switch templates.

### Edge needs to be moved to another factory [#edge-needs-to-be-moved-to-another-factory]

Staff-only. Contact support; we remotely revoke the current OpCert and re-issue for the new site.

## Next steps [#next-steps]

* [Connect a machine manually](./connect-machine) if your controller isn't auto-discovered
* [Ingest telemetry](./ingest-telemetry) to understand the data model
* [Work orders + scheduling](./work-orders) to tie machine data into production
