Requirements
- A device running
nerves_hub_linkwithremote_iex: true. It is off by default. - The device is online.
- The
device:consolepermission. The built-in Manage and Admin roles hold it. The View role does not. A custom role can be given it. See Roles.
Enable it in firmware
remote_iex_timeout, in seconds:
Open a console in the browser
1
Open the device
In your product, select Devices, then the device.
2
Select the Console tab
The tab is dimmed while the device is offline. When the device is online and its firmware has
remote_iex: true, the terminal connects.remote_iex. If it shows “You don’t have the required permissions to access a Device console”, your role lacks device:console.
The session is shared. Everyone who has the Console tab open for the device sees the same console.
Send a file to the device
Drop a file on the console to send it to the device. NervesHub shows the upload, then the device receiving and saving the file. This needsnerves_hub_link 2.1.0 or later.
Open a console from the CLI
nh needs an interactive terminal. The session stays open until the device’s console ends or you press Ctrl-C.
Send code without a session
run-code sends Elixir code to the device’s console:
System shell
A shell on the device, as opposed to IEx, is a separate, optional extension with its own permission. It is mostly for devices that are not Nerves devices. See Local shell.Console over iroh
nh can also open an IEx console over a peer-to-peer iroh connection, instead of through NervesHub’s WebSocket.
Requirements
- The device runs
iroh_console. - The device reports its iroh endpoint to NervesHub through the network identity extension, which needs
nerves_hub_link2.13.0 or later.nhreads where to reach the device from that report. See Network identity. - Your role can register network identities (
network_identity:create). The built-in Manage and Admin roles can.
Connect
nh keeps one iroh key per organization in its data directory. The first time you connect, it registers that key with the organization, attached to you, under an instance named for your machine (nh-<host>-<key prefix>).
The device authenticates you however its IrohConsole.Auth adapter is configured. nh prompts when the device challenges, or you can answer up front:
Which of the device’s iroh endpoints to connect to, for a device that runs more than one.
Manage iroh endpoints
Devices record their own endpoint ids when they connect.nh device iroh-console registers your machine’s. You only need to manage endpoints by hand for anything else.
ORG_IROH_ENDPOINTS_UI_ENABLED=true. See Feature prerequisites.

