Remote console requires
remote_iex: true in your device firmware configuration. If you publish firmware without this setting, the console option will not be available for devices running that build.Enable Remote IEx
Add the following to your firmware’s target config to enable the remote console feature in NervesHubLink:From the CLI
Open an IEx Console
Connect to a live IEx REPL on a device using thenh CLI. The device must be online and running firmware with remote_iex: true.
iex --name locally.
Open a System Shell
If you need access to the underlying Linux shell rather than the Elixir REPL:The system shell is delivered by the
local_shell extension. Enable it on the product under Settings → Extensions before using it — the IEx console does not require it.Run Code Without a Full Session
For quick one-off evaluations where you don’t need an interactive session, userun-code to send a single Elixir expression and get the result:
From the NervesCloud UI
If you prefer a browser-based workflow, every device’s Detail page in NervesCloud includes a Console tab. Click it to open an in-browser IEx terminal connected directly to that device. The browser console behaves identically to the CLI console — the same Phoenix Channel backs both. No additional configuration is needed beyond enablingremote_iex: true in your firmware.
P2P Console via Iroh
Devices behind strict NAT or firewalls that block outbound connections to NervesHub can still accept console connections using the Iroh peer-to-peer transport. Iroh establishes a direct encrypted tunnel between your machine and the device without requiring inbound firewall rules. First, register the device as an Iroh endpoint:Support Scripts
NervesHub supports reusable Elixir scripts that you can save to your organization and run on any device. This is useful for common support tasks like checking memory fragmentation, reading sensor state, or inspecting supervision tree health. List your saved scripts:Creating, editing, and deleting support scripts requires the
manage role. Running an existing script only requires view, so you can let a wider group execute vetted diagnostics without granting them the ability to change what those scripts do.
