Skip to main content

Docker and Compose deployments

Run standalone rnsd-rs and lxmd-rs in lightweight containers with persistent host-mounted state directories.

1. Base Dockerfile​

Download the rsReticulum and rsLXMF release binaries matching your container CPU architecture into ./bin/, verify checksums, and build:

# Dockerfile
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --create-home --uid 10001 operator
COPY bin/rnsd-rs bin/rnstatus-rs bin/rnpath-rs bin/rnid-rs bin/lxmd-rs /usr/local/bin/
RUN chmod 0755 /usr/local/bin/rnsd-rs /usr/local/bin/rnstatus-rs /usr/local/bin/rnpath-rs /usr/local/bin/rnid-rs /usr/local/bin/lxmd-rs
USER operator
WORKDIR /home/operator
ENTRYPOINT ["rnsd-rs"]

Make sure your host ./data/reticulum and ./data/lxmf directories exist and are owned by UID 10001 before starting.

2. Stack A: rnsd-rs + lxmd-rs (Shared Instance)​

Sharing a network namespace (network_mode: "service:rnsd") lets lxmd-rs talk to rnsd-rs over loopback 127.0.0.1:37428–37429. Always gate lxmd on a rnstatus-rs healthcheck so lxmd-rs never claims the shared instance ahead of rnsd-rs:

# docker-compose.yml
services:
rnsd:
build: .
container_name: rnsd-rs
restart: unless-stopped
command: ["--config", "/data/reticulum", "--service"]
ports:
- "4242:4242/tcp"
volumes:
- ./data/reticulum:/data/reticulum
healthcheck:
test: ["CMD", "rnstatus-rs", "--config", "/data/reticulum"]
interval: 10s
timeout: 5s
retries: 6

lxmd:
build: .
container_name: lxmd-rs
restart: unless-stopped
network_mode: "service:rnsd"
depends_on:
rnsd:
condition: service_healthy
entrypoint: ["lxmd-rs"]
command: ["--config", "/data/lxmf", "--rnsconfig", "/data/reticulum", "--service"]
volumes:
- ./data/reticulum:/data/reticulum
- ./data/lxmf:/data/lxmf
Recreating rnsd

If you recreate the rnsd container (docker compose up -d --force-recreate rnsd), restart lxmd too so it attaches to the new network namespace.

Inspect live status with docker exec rnsd-rs rnstatus-rs --config /data/reticulum.

3. Stack B: rnsd-rs + i2pd sidecar​

Run i2pd on a private internal Docker bridge network so SAM (7656) is never published to the host or internet:

services:
i2pd:
image: purplei2p/i2pd:latest
restart: unless-stopped
command: ["--sam.enabled=true", "--sam.address=0.0.0.0", "--sam.port=7656"]
volumes:
- ./data/i2pd:/home/i2pd/data
networks:
- mesh_internal

rnsd:
build: .
restart: unless-stopped
command: ["--config", "/data/reticulum", "--service"]
volumes:
- ./data/reticulum:/data/reticulum
networks:
- mesh_internal

networks:
mesh_internal:
driver: bridge

In ./data/reticulum/config, configure I2PInterface with i2p_sam_host = i2pd and i2p_sam_port = 7656. Start order does not matter — I2PInterface retries SAM until i2pd answers.

4. Physical LAN (AutoInterface) & USB RNode passthrough​

  • LAN multicast (AutoInterface): On Linux Docker Engine, set network_mode: host instead of ports: (Docker Desktop's host networking has different multicast limits).
  • USB RNode: Pass the stable host device path (devices: ["/dev/serial/by-id/usb-EXAMPLE:/dev/rnode"]) and verify serial permissions for UID 10001.
  • Logs & backups: With --service, logs write to /data/reticulum/logfile and /data/lxmf/logfile. Stop containers before backing up ./data/ so SQLite databases flush cleanly.