Skip to main content

A simple way to serve pages and files over the Reticulum network.

Project description

RNS Page Node

Русский | 中文 | 日本語 | Italiano | Deutsch

A simple way to serve pages and files over the Reticulum network. Drop-in replacement for NomadNet nodes that primarily serve pages and files.

Features

  • Serves pages and files over RNS
  • Dynamic page support with environment variables
  • Form data and request parameter parsing

Installation

From PyPI

pip install rns-page-node
# or
pipx install rns-page-node

From Gitea Packages

# Pip
pip install --index-url https://git.quad4.io/api/packages/RNS-Things/pypi/simple/ --extra-index-url https://pypi.org/simple rns-page-node

# Pipx
pipx install --pip-args "--index-url https://git.quad4.io/api/packages/RNS-Things/pypi/simple/ --extra-index-url https://pypi.org/simple" rns-page-node

Permanent Configuration for Gitea (Optional):

To avoid typing the index URLs every time when using the Gitea registry, add them to your pip.conf:

# ~/.config/pip/pip.conf
[global]
index-url = https://git.quad4.io/api/packages/RNS-Things/pypi/simple/
extra-index-url = https://pypi.org/simple

Then you can simply use:

pip install rns-page-node
# or
pipx install rns-page-node

Manual Download (Latest Release):

You can download the wheel file directly from the latest release and install it:

# Wget
wget https://git.quad4.io/RNS-Things/rns-page-node/releases/download/v1.5.0/rns_page_node-1.5.0-py3-none-any.whl
pip install rns_page_node-1.5.0-py3-none-any.whl

# Curl
curl -O -L https://git.quad4.io/RNS-Things/rns-page-node/releases/download/v1.5.0/rns_page_node-1.5.0-py3-none-any.whl
pip install rns_page_node-1.5.0-py3-none-any.whl
# Pip
pip install git+https://git.quad4.io/RNS-Things/rns-page-node.git --break-system-packages
# Pipx via Git
pipx install git+https://git.quad4.io/RNS-Things/rns-page-node.git
# UV
uv venv
source .venv/bin/activate
uv pip install git+https://git.quad4.io/RNS-Things/rns-page-node.git

Usage

# will use current directory for pages and files
rns-page-node

or with command-line options:

rns-page-node --node-name "Page Node" --pages-dir ./pages --files-dir ./files --identity-dir ./node-config --announce-interval 360

or with a config file:

rns-page-node /path/to/config.conf

Configuration File

You can use a configuration file to persist settings. See config.example for an example.

Config file format is simple key=value pairs:

# Comment lines start with #
node-name=My Page Node
pages-dir=./pages
files-dir=./files
identity-dir=./node-config
announce-interval=360

Priority order: Command-line arguments > Config file > Defaults

Docker/Podman

docker run -it --rm -v ./pages:/app/pages -v ./files:/app/files -v ./node-config:/app/node-config -v ./reticulum-config:/home/app/.reticulum git.quad4.io/rns-things/rns-page-node:latest

Docker/Podman Rootless

mkdir -p ./pages ./files ./node-config ./reticulum-config
chown -R 1000:1000 ./pages ./files ./node-config ./reticulum-config
podman run -it --rm -v ./pages:/app/pages -v ./files:/app/files -v ./node-config:/app/node-config -v ./reticulum-config:/home/app/.reticulum git.quad4.io/rns-things/rns-page-node:latest

Mounting volumes are optional, you can also copy pages and files to the container podman cp or docker cp.

Build

make build

Build wheels:

make wheel

Build Wheels in Docker

make docker-wheels

Development

poetry install
bash tests/run_tests.sh
ruff check .

make test runs the same script as tests/run_tests.sh.

Pages

Supports dynamic executable pages with full request data parsing. Pages can receive:

  • Form fields via field_* environment variables
  • Link variables via var_* environment variables
  • Remote identity via remote_identity environment variable
  • Link ID via link_id environment variable

This enables forums, chats, and other interactive applications compatible with NomadNet clients.

Options

Positional arguments:
  node_config             Path to rns-page-node config file

Optional arguments:
  -c, --config            Path to the Reticulum config file
  -n, --node-name         Name of the node
  -p, --pages-dir         Directory to serve pages from
  -f, --files-dir         Directory to serve files from
  -i, --identity-dir      Directory to persist the node's identity
  -a, --announce-interval Interval to announce the node's presence (in minutes, default: 360 = 6 hours)
  --page-refresh-interval Interval to refresh pages (in seconds, 0 = disabled)
  --file-refresh-interval Interval to refresh files (in seconds, 0 = disabled)
  -l, --log-level         Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)

License

This project incorporates portions of the NomadNet codebase, which is licensed under the GNU General Public License v3.0 (GPL-3.0). As a derivative work, this project is also distributed under the terms of the GPL-3.0. See the LICENSE file for full license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rns_page_node-1.5.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rns_page_node-1.5.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file rns_page_node-1.5.0.tar.gz.

File metadata

  • Download URL: rns_page_node-1.5.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for rns_page_node-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d07a3111520d65d980bd126daffc5d32ef68f321cce1cc5397b06bf664ae3061
MD5 cd8af15d2c9bd23efe10b591cd2af763
BLAKE2b-256 ca88b0e126967eda6862a887661e3084516c794d30bbfee9464b8dc7a271fe99

See more details on using hashes here.

File details

Details for the file rns_page_node-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: rns_page_node-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for rns_page_node-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b370aebdbd0dae022ede463ef953c0b0ba750c435a98becd5f7a63e8beae1241
MD5 81a912d223b53e648624b511cde75eb7
BLAKE2b-256 9d283b24fe0070929b9b5db6f40cb00eeea63fcebdaded206300b31274f8489a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page