> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nerves-hub.org/llms.txt
> Use this file to discover all available pages before exploring further.

# NervesHubLink for Nerves

> The reference NervesHub client for Nerves devices: an Elixir library that maintains the device connection, applies firmware updates, and carries the extensions.

[NervesHubLink](https://github.com/nerves-hub/nerves_hub_link) is the client for devices running [Nerves](https://nerves-project.org/). It is the reference implementation of the device protocol — the one the server is developed against, and the one the other clients are measured by.

Added to your project as an Elixir dependency, it maintains the WebSocket connection, reports the firmware the device is running, downloads and applies updates through `fwup`, serves the remote console, and carries the [extensions](/management/health-monitoring) that report health, metrics, geo and logs.

```elixir theme={null}
# mix.exs
{:nerves_hub_link, "~> 2.7"}
```

## Library documentation

The library documents itself on HexDocs, and that is the authoritative reference — it ships with the library, so it is always current for the version you are running.

<Card title="nerves_hub_link on HexDocs" icon="book" href="https://nerves-hub-link.hexdocs.pm/">
  Full documentation for the library: every configuration key, the client behaviour, the extensions, and the module reference.
</Card>

Worth knowing where things are:

| Guide                                                                                              | Covers                                                                            |
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Configuration](https://nerves-hub-link.hexdocs.pm/configuration.html)                             | Every option: connection, authentication, signing keys, update behaviour, sockets |
| [Extensions](https://nerves-hub-link.hexdocs.pm/extensions.html)                                   | Configuring health, metrics, geo and the local shell on the device                |
| [Debugging](https://nerves-hub-link.hexdocs.pm/debugging.html)                                     | Working out why a device is not connecting or not updating                        |
| [`NervesHubLink.Client`](https://nerves-hub-link.hexdocs.pm/NervesHubLink.Client.html)             | Deciding when an update is applied, deferred or refused                           |
| [`NervesHubLink.Configurator`](https://nerves-hub-link.hexdocs.pm/NervesHubLink.Configurator.html) | Supplying credentials at runtime rather than compile time                         |

## Getting a device connected

These pages cover the NervesHub side — creating the product, getting credentials, and pointing a device at them:

<CardGroup cols={2}>
  <Card title="Add to Project" icon="plus" href="/setup/add-to-project">
    Add the dependency, pick an authentication method, and configure `config/target.exs`.
  </Card>

  <Card title="Connecting" icon="plug" href="/setup/connecting">
    Point a device at NervesCloud or your own instance, and configure runtime credentials.
  </Card>
</CardGroup>

## Not running Nerves?

If your device runs Linux without Nerves, or an ESP32 under AtomVM, see [Choosing a Device Client](/integrations/overview) for the other options.
