> For the complete documentation index, see [llms.txt](https://docs.widgelix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.widgelix.com/lorawan-network-server/overview.md).

# Overview

Run your own LoRaWAN network inside Widgelix - gateways, device profiles and end devices.

The **LoRaWAN Network Server** (LNS) module lets your organization run LoRaWAN infrastructure directly in Widgelix, without an external network server such as The Things Stack or ChirpStack Cloud. Open it from the sidebar: **LoRaWAN Server**.

The page header shows the server status (**Active** once activated) and a main button that changes with the selected tab (**+ Add gateway**, **+ Add device profile** or **+ Add device**).

| Tab                 | Purpose                                                                         | Page                                                                                   |
| ------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| **Gateways**        | Register and monitor LoRaWAN gateways (base stations).                          | [Gateways](https://docs.widgelix.com/lorawan-network-server/gateways.md)               |
| **Device profiles** | Region, MAC version, activation and class settings shared by groups of devices. | [Device Profiles](https://docs.widgelix.com/lorawan-network-server/device-profiles.md) |
| **Devices**         | Register end devices and their OTAA or ABP keys.                                | [Devices](https://docs.widgelix.com/lorawan-network-server/devices.md)                 |

Every tab has a search field, **Fit screen / Expand** to size the table, and a **Refresh** button that reloads the data (e.g. Last seen timestamps) without reloading the page.

## Access requirements

A user needs:

1. **Menu access**: *LoRaWAN Server* enabled for their role.
2. **Module permissions** on the **LoRaWAN** module:

| Action                                            | Required permission  |
| ------------------------------------------------- | -------------------- |
| View gateways, profiles and devices               | LoRaWAN → **Read**   |
| Activate the network server, add or edit entities | LoRaWAN → **Write**  |
| Delete gateways, profiles or devices              | LoRaWAN → **Delete** |

The default **Viewer** role does not include LoRaWAN access. See [Roles & Permissions](https://docs.widgelix.com/roles-and-permissions/user-guide.md).

## Activating the network server

The network server is activated once per organization:

1. Open **LoRaWAN Server**.
2. If it is not active yet, click **Activate** on the *Activate LoRaWAN Network Server* screen.

Activation provisions the network server tenant and application for your organization and requires **Write** permission. Afterwards the status shows **Active** and the three tabs become available.

## Recommended setup order

1. Activate the network server.
2. Create at least one [device profile](https://docs.widgelix.com/lorawan-network-server/device-profiles.md) with the correct region and MAC version.
3. Register your [gateways](https://docs.widgelix.com/lorawan-network-server/gateways.md) and point their packet forwarders to the network server.
4. Register the [devices](https://docs.widgelix.com/lorawan-network-server/devices.md) with their keys.
5. Make sure each device also exists as an [asset](https://docs.widgelix.com/assets/assets-list.md) with the same DevEUI, so that its data is decoded and shown on dashboards.

## How it connects to the rest of Widgelix

* **Assets**: an LNS device is the radio registration; the **asset** with the same DevEUI holds the decoded data, dashboards and actions. When adding an LNS device you can pick it directly from your platform assets. In the asset's [Settings → Connectivity](https://docs.widgelix.com/assets/asset-page/settings.md) select the Widgelix LoRaWAN Network Server.
* **Actions**: the condition option **Gateway connectivity alert** (*Gateway goes offline / online*) is available when the network server is used. See [Creating an Action](https://docs.widgelix.com/actions-formerly-rule-engine/creating-an-action.md).
* **Downlinks**: downlinks created on the asset are queued through the network server.
* **Troubleshooting**: see [Troubleshooting](https://docs.widgelix.com/lorawan-network-server/troubleshooting.md) for common problems and a setup checklist.
