styrened
The core of the Styrene mesh. A daemon, shared library, and TUI — everything needed to be a full peer on the Reticulum network.
Status: Alpha
Source: GitHub
Install: pipx install styrene
What It Does
Every running instance of styrened is a full LXMF peer — it participates in mesh transport and message propagation simply by existing. Most mesh users connect transiently; styrened devices are persistent infrastructure, growing mesh reliability as a side effect of being online.
Standard LXMF clients (Sideband, MeshChat, NomadNet) see styrened as a normal messaging peer. The Styrene wire protocol rides inside LXMF FIELD_CUSTOM_TYPE, invisible to non-Styrene participants.
Identity Management
Styrene takes over Reticulum cryptographic identity generation to make it approachable. styrened handles identity creation, storage, and announcement automatically. Identities can be:
- Ephemeral — generated on first run, anonymous by default
- Persistent — backed by hardware tokens (YubiKey) for long-term verifiable identity
- Configurable — display name and icon for ecosystem compatibility with Sideband/MeshChat
Community Hub
New installs connect to the Styrene Community Hub (rns.styrene.io:4242) by default. The hub serves dual roles:
- RNS Transport Node — relays announces between peers on the public network, connecting clients that would otherwise be invisible to each other
- LXMF Propagation Node — provides store-and-forward message delivery so messages reach offline peers when they come back online
The OPERATOR profile default sets lxmf.propagation_destination to the community hub’s stable propagation hash, derived from PVC-backed identity. Every new install gets store-and-forward delivery out of the box.
The TUI’s Network tab exposes a STYRENE COMMUNITY HUB toggle (default ON) that controls both the transport peer connection and the LXMF propagation destination in a single control. Operators can toggle it off and configure custom propagation nodes or run their own hub.
As Daemon
On edge devices, styrened runs as a permanent systemd service. On operator workstations, the TUI manages it as a subprocess (or via launchd on macOS).
- RPCServer — handles fleet management requests (status, exec, reboot, config)
- AutoReplyHandler — responds to NomadNet/MeshChat users
- Device Discovery + NodeStore — tracks mesh topology via RNS announces
- ConversationService — chat history, delivery tracking, threading
- LXMFService — LXMF messaging with optional propagation node mode
- IPC Control Server — Unix socket for local CLI/TUI communication
- TerminalService — remote shell via PTY over RNS Link
- HTTP API — optional REST endpoints for local status/control
As TUI
The TUI is bundled as a subpackage (styrened.tui), installed via the [tui] extra. It provides the operator interface — fleet dashboard, mesh device discovery, encrypted chat, settings management, and an in-app upgrade flow.
styrene # Launch TUI
styrene --upgrade # Self-update to latest version
Key TUI screens: Dashboard (fleet overview + mesh device table), Chat (encrypted LXMF conversations), Settings (tabbed: Identity, Network, Fleet, System), Device Detail (mesh node info + actions), Exploration (non-Styrene RNS announces).
The Network settings tab has 7 panels: Community Hub (toggle), Transport, Peers (dynamic add/remove), Propagation (LXMF destination hash), Local Discovery (AutoInterface), Server, and BATMAN-adv Mesh.
As Library
Other consumers use styrened as a Python library:
- RPC client/server implementations
- Wire protocol v2 encoding/decoding (msgpack over LXMF)
- Message models and data structures
- Service lifecycle management
Installation
pipx install styrene # Recommended (daemon + TUI, isolated env)
pip install styrened # Daemon + library only (no TUI, for edge devices)
nix run github:styrene-lab/styrened # Nix flake
Upgrading
styrene --upgrade # Self-update from within TUI
pipx upgrade styrened # Manual upgrade via pipx
NixOS (Styrix)
{
imports = [ ../common/styrened.nix ];
styrene.daemon.enable = true;
}
Wire Protocol
styrened instances communicate using a custom binary protocol over LXMF:
[PREFIX: "styrene.io:"][VERSION: 1 byte][TYPE: 1 byte][REQUEST_ID: 16 bytes][PAYLOAD: msgpack]
Request/response correlation uses 16-byte random IDs. Fire-and-forget messages use zero bytes. See Architecture for full protocol documentation.
Entry Points
styrened provides two console scripts:
| Command | Entry Point | Purpose |
|---|---|---|
styrened | styrened.__main__:main | Daemon CLI (headless) |
styrene | styrened.tui.__main__:main | TUI launcher |
See Also
- styrene-edge — device provisioning
- Architecture — system design and protocols
- Components — detailed component reference