n0-computer/iroh-esp32-examples

Self-contained example how to run iroh on an ESP32

Rust

29

53 commits

updated Oct 14, 2026

See the code

README

Example projects for using iroh on an ESP32

This repository contains several completely separate Rust projects (no Cargo workspace). Each is one server variant — an iroh echo endpoint for a specific ESP32 — plus two clients to dial them.

Servers (one per hardware variant)

Each keeps the largest configuration that runs reliably on that board:

  • server-esp32-psram/ — ESP32-WROVER / M5StickC (LX6) with PSRAM. Enough RAM for relay + pkarr discovery.
  • server-esp32-s3-psram/ — ESP32-S3 with PSRAM. Also gets relay + pkarr discovery (same full build, S3 hardware).
  • server-esp32/ — bare ESP32 (LX6), no PSRAM. LAN-direct echo (relay doesn't fit without PSRAM).
  • server-esp32-s3/ — ESP32-S3, no PSRAM. LAN-direct.
  • server-esp32-c6/ — ESP32-C6, the RISC-V variant (riscv32imac-esp-espidf), no PSRAM. LAN-direct.
  • server-esp32-c61-psram/ — ESP32-C61, the RISC-V + PSRAM variant (2 MB). Runs the full relay + pkarr discovery build (dialable across networks), tuned to fit the C61's tighter internal SRAM — small buffers + a 96 KB stack (see its README). Needs newer tooling (ESP-IDF v5.5.2+, esp-idf-svc 0.52, espflash 4.4).
  • server-esp32-c5-psram/ — ESP32-C5, the RISC-V + PSRAM variant with dual-band WiFi 6. Tested on the Seeed Studio XIAO ESP32-C5 (8 MB PSRAM). Runs the full relay + pkarr discovery build with the C61's memory settings; same newer tooling as the C61.
  • server-esp32-p4/ — ESP32-P4, the big dual-core RISC-V application chip (riscv32imafc-esp-espidf — it has an FPU), 768 KB SRAM, 32 MB in-package PSRAM — and no radio of its own: WiFi comes from the board's ESP32-C6 companion over SDIO (ESP-Hosted + esp_wifi_remote, transparent to the code). Runs the full relay + pkarr discovery build — the roomiest iroh node in this repo. Tested on a Waveshare ESP32-P4-NANO. Same newer tooling as the C61; mind its README's chip-revision trap.

noq interop

  • noq-interop/ — an ESP32-C6 echo server that runs bare noq QUIC (no iroh endpoint) with iroh's raw-public-key TLS profile, so iroh endpoints can dial it via a long ticket. Its app image is 1.69 MiB.

WiFi provisioning

  • provisioning/ — WiFi provisioning over BLE from a web page, with the credentials encrypted to the device's iroh endpoint id. XIAO ESP32-C5; stops once WiFi is up, before binding an endpoint.

Clients

  • client/ — desktop CLI client.
  • wasm-gui/ — browser echo client (Rust → WebAssembly). Relay-only, so it talks to a PSRAM server (server-esp32-psram or server-esp32-s3-psram).

Each directory has its own Cargo.toml, lockfile, and README with build/run instructions.

Hardware variants

M5StickC PLUS2ESP32-S3 with PSRAMBare ESP32 (LX6)Bare ESP32-S3ESP32-C6-DevKitC-1XIAO ESP32-C5
M5StickC PLUS2 / ESP32-WROVER
(LX6, with PSRAM)
ESP32-S3
(with PSRAM)
Bare ESP32 (LX6)
(no PSRAM)
Bare ESP32-S3
(no PSRAM)
ESP32-C6
(RISC-V, no PSRAM)
XIAO ESP32-C5
(RISC-V, with PSRAM)
server-esp32-psram/server-esp32-s3-psram/server-esp32/server-esp32-s3/server-esp32-c6/server-esp32-c5-psram/

Which server variant?

The no-PSRAM boards are LAN-direct only: dial them with the long ticket (which carries the IP), from the same network. Relay and pkarr discovery need the RAM headroom that only PSRAM provides — see the PSRAM variants.

Run the client/ on a desktop to dial whichever server you flashed (or the wasm-gui/ in a browser, against the PSRAM server).

Limitations

There are a very large number of ESP32 variants out there. We tried to cover the most important variants in the server projects. Here is some general advice to get iroh to run on your board.

We do support both CPU architectures, XTensa for ESP32 and ESP32-S3, RISC-V for ESP32-C* and ESP32-P*. For Xtensa you will need a special tool chain, RISC-V is supported out of the box by rust.

Flash size

All eight release applications fit a 4 MiB single-app flash layout. Flash capacity does not establish runtime RAM headroom.

PSRAM

If your board does not come with PSRAM, you will need to disable the relay connection and can only dial the endpoint with long tickets containing an IP address. You will also need to tweak QUIC buffers.

n0-computer/iroh-esp32-examples

Self-contained example how to run iroh on an ESP32

Rust

29

53 commits

updated Oct 14, 2026

See the code

README

Example projects for using iroh on an ESP32

This repository contains several completely separate Rust projects (no Cargo workspace). Each is one server variant — an iroh echo endpoint for a specific ESP32 — plus two clients to dial them.

Servers (one per hardware variant)

Each keeps the largest configuration that runs reliably on that board:

  • server-esp32-psram/ — ESP32-WROVER / M5StickC (LX6) with PSRAM. Enough RAM for relay + pkarr discovery.
  • server-esp32-s3-psram/ — ESP32-S3 with PSRAM. Also gets relay + pkarr discovery (same full build, S3 hardware).
  • server-esp32/ — bare ESP32 (LX6), no PSRAM. LAN-direct echo (relay doesn't fit without PSRAM).
  • server-esp32-s3/ — ESP32-S3, no PSRAM. LAN-direct.
  • server-esp32-c6/ — ESP32-C6, the RISC-V variant (riscv32imac-esp-espidf), no PSRAM. LAN-direct.
  • server-esp32-c61-psram/ — ESP32-C61, the RISC-V + PSRAM variant (2 MB). Runs the full relay + pkarr discovery build (dialable across networks), tuned to fit the C61's tighter internal SRAM — small buffers + a 96 KB stack (see its README). Needs newer tooling (ESP-IDF v5.5.2+, esp-idf-svc 0.52, espflash 4.4).
  • server-esp32-c5-psram/ — ESP32-C5, the RISC-V + PSRAM variant with dual-band WiFi 6. Tested on the Seeed Studio XIAO ESP32-C5 (8 MB PSRAM). Runs the full relay + pkarr discovery build with the C61's memory settings; same newer tooling as the C61.
  • server-esp32-p4/ — ESP32-P4, the big dual-core RISC-V application chip (riscv32imafc-esp-espidf — it has an FPU), 768 KB SRAM, 32 MB in-package PSRAM — and no radio of its own: WiFi comes from the board's ESP32-C6 companion over SDIO (ESP-Hosted + esp_wifi_remote, transparent to the code). Runs the full relay + pkarr discovery build — the roomiest iroh node in this repo. Tested on a Waveshare ESP32-P4-NANO. Same newer tooling as the C61; mind its README's chip-revision trap.

noq interop

  • noq-interop/ — an ESP32-C6 echo server that runs bare noq QUIC (no iroh endpoint) with iroh's raw-public-key TLS profile, so iroh endpoints can dial it via a long ticket. Its app image is 1.69 MiB.

WiFi provisioning

  • provisioning/ — WiFi provisioning over BLE from a web page, with the credentials encrypted to the device's iroh endpoint id. XIAO ESP32-C5; stops once WiFi is up, before binding an endpoint.

Clients

  • client/ — desktop CLI client.
  • wasm-gui/ — browser echo client (Rust → WebAssembly). Relay-only, so it talks to a PSRAM server (server-esp32-psram or server-esp32-s3-psram).

Each directory has its own Cargo.toml, lockfile, and README with build/run instructions.

Hardware variants

M5StickC PLUS2ESP32-S3 with PSRAMBare ESP32 (LX6)Bare ESP32-S3ESP32-C6-DevKitC-1XIAO ESP32-C5
M5StickC PLUS2 / ESP32-WROVER
(LX6, with PSRAM)
ESP32-S3
(with PSRAM)
Bare ESP32 (LX6)
(no PSRAM)
Bare ESP32-S3
(no PSRAM)
ESP32-C6
(RISC-V, no PSRAM)
XIAO ESP32-C5
(RISC-V, with PSRAM)
server-esp32-psram/server-esp32-s3-psram/server-esp32/server-esp32-s3/server-esp32-c6/server-esp32-c5-psram/

Which server variant?

The no-PSRAM boards are LAN-direct only: dial them with the long ticket (which carries the IP), from the same network. Relay and pkarr discovery need the RAM headroom that only PSRAM provides — see the PSRAM variants.

Run the client/ on a desktop to dial whichever server you flashed (or the wasm-gui/ in a browser, against the PSRAM server).

Limitations

There are a very large number of ESP32 variants out there. We tried to cover the most important variants in the server projects. Here is some general advice to get iroh to run on your board.

We do support both CPU architectures, XTensa for ESP32 and ESP32-S3, RISC-V for ESP32-C* and ESP32-P*. For Xtensa you will need a special tool chain, RISC-V is supported out of the box by rust.

Flash size

All eight release applications fit a 4 MiB single-app flash layout. Flash capacity does not establish runtime RAM headroom.

PSRAM

If your board does not come with PSRAM, you will need to disable the relay connection and can only dial the endpoint with long tickets containing an IP address. You will also need to tweak QUIC buffers.

Significant stargazers

d1

225 followers · starred Jun 2026