# Installing Tagnect on an OpenWrt router

> Last verified: 2026-11-18 · Source: https://tagnect.com/ai/ · Tagnect LLC

Result: the router gets separate, isolated networks for customers (rotating password), staff (rotating password) and
the venue's own devices (fixed password, off until a password is created), plus the Tagnect agent. After the installer
runs, **no computer is needed on site**.

## Before starting

- Official OpenWrt is installed and working (see `openwrt-flash.md`; checklist in `gather-credentials.md`).
- The router's **WAN port** is connected to the internet. A computer is connected to one of its **LAN ports** (or to
  its Wi-Fi).
- The owner is signed in to https://console.tagnect.com as the **master manager**, with a subscription or trial.
- Decide the network names people will see in their Wi-Fi lists (up to 32 bytes each; they must differ):
  customers, staff, own devices. Optional: a Wi-Fi for the owner's administration, with its own 8–63 character password.
  Without it, manage the router by cable.
- Know the Wi-Fi country code (two letters, for example `US` or `BR`).

## Steps

1. In the console open **OpenWrt router**. Fill in the three network names, the country, and (optional) tick *Also
   create an administration Wi-Fi*.
2. Press **Generate installation line**. The console shows one line. It contains the router's private credential
   (shown once) — treat it like a password.
3. On the computer, open a terminal and connect to the router: `ssh root@192.168.1.1`
   If the router has no password yet, first set one in its web page (http://192.168.1.1 → *System* →
   *Administration*): OpenWrt does not accept SSH logins without a password.
4. Paste the line and press Enter. Wait about 2 minutes. The console screen then shows **OpenWrt router online**.
5. Still in the console, open **Rotation** and bind each group to a network: the *Default* group → the customers'
   network. A tag is written for a group, so the group must be bound to a network.
6. Open **Own devices** and create the fixed password for TVs, printers and card readers when needed (this turns that
   network on).
7. Write the first tag with the Manager app (see `nfc-tags.md`) and test with the Tagnect Wi-Fi app.

Running the line again only re-applies the settings; it is safe to repeat if something was interrupted.

## What the line looks like (template — never invent real values)

The console builds this line; always copy **the line the console shows**, because its version and values change.
Shape only:

```
T_TOKEN='<TOKEN FROM THE CONSOLE>' T_SECRET='<FROM THE CONSOLE>' T_CLI='<customers network>' T_STAFF='<staff network>' T_DEV='<own-devices network>' T_CC='<country>' sh -c 'uclient-fetch -q -O /tmp/tagnect-install.sh https://api.usetagnect.com/agent/openwrt/tagnect-install-<VERSION>.sh && sh /tmp/tagnect-install.sh'
```

Optional values the console may add: `T_ADM` and `T_ADMKEY` (administration Wi-Fi).

What the installer does, in order: checks it is OpenWrt and there is free flash; detects what each radio supports and
builds only the networks that fit; creates a subnet, DHCP and firewall for each Tagnect network (they reach only the
internet, never the owner's own network, and guests are isolated from each other); downloads the agent and **verifies
the Tagnect signature** before saving it; starts the service and waits for the cloud to recognise the router.

## Extra access points

Extra OpenWrt access points can extend the customers' network. They receive the same passwords, so people move between
them without reconnecting.

1. In the console, on the OpenWrt screen, section **Access points** → **Add access point** (give it a name such as
   "Patio") → **Generate line**.
2. On the access point: install OpenWrt; connect its WAN port to the venue's network and a computer to one of its LAN
   ports; run `ssh root@192.168.1.1`; paste the line and press Enter.
3. When it finishes, move the network cable from the WAN port to a LAN port. The access point creates only the
   customers' network and takes its address from the main router.
4. The console lists each access point as online or offline and can remove it.

## What to ask the user to show (screenshots)

Ask for a screenshot or pasted text of:
- the console **OpenWrt router** screen (status line: *No router connected yet* / *Waiting for the router…* / *online*);
- the terminal output after pasting the line (lines starting `[tagnect]`; the last lines say what failed);
- the **Rotation** screen (is a group bound to the customers' network?).

**Before sharing, the user must hide** the router credential (`T_TOKEN`, `T_SECRET`), any passwords, and Wi-Fi keys. If a
secret was shown, tell the user to generate a new line in the console.

## Common messages and what they mean

| Message in the terminal | Meaning / what to do |
|---|---|
| `isto nao e um OpenWrt` | The device is not running OpenWrt. Install official OpenWrt first. |
| `linha incompleta: gere de novo no console` | The pasted line was cut. Generate again and paste the whole line. |
| `nome de rede com mais de 32 bytes` | A network name is too long. Shorten it. |
| `a senha da rede de administracao precisa de 8 a 63 caracteres` | Adjust the administration password length. |
| `pouco espaco livre na flash` | The router is out of storage. Ask support about this model. |
| `sem internet para baixar pacotes. Ligue a porta WAN do roteador.` | The WAN port has no internet. Connect it to the venue's modem or network and run the line again. |
| `falha ao instalar o wpad completo (flash pequena?)` | The router has too little flash for the full Wi-Fi package. Ask support about this model. |
| `sem acesso a nuvem ... O roteador esta na internet? O relogio esta certo?` | No access to the Tagnect cloud: check the internet and the router's date and time. |
| `assinatura do agente INVALIDA - instalacao interrompida.` | The download was altered or incomplete. Run the line again; if it repeats, send the output to support. |

If it fails with anything else, or the console never shows the router online, collect the router model and revision,
the OpenWrt version (`cat /etc/openwrt_release`), the last 15 lines of the output and the time, and send them to
**support@tagnect.com**.
