Files
Linus Gasser e27e8b7b4f Radicle node and web frontend
This allows you to run an always-on node for your radicle
projects and then synchronise with other nodes.
It offers the node and a web-frontend, which is read-only.
2026-07-21 15:02:53 +02:00

63 lines
1.5 KiB
Bash

#!/bin/bash
# Vendored config versions (must match .env.sample / compose.yml).
export NGINX_CONF_VERSION=v1
export EXPLORER_CONFIG_VERSION=v1
export NODE_ENTRYPOINT_VERSION=v1
# The helpers below drive the `rad` CLI inside the seed node. Run them against
# the `node` service, e.g.:
#
# abra app cmd <domain> node node_id
# abra app cmd <domain> node seed_repo rad:z2...
#
# RAD_HOME is set on the node service, so `rad` finds the identity and the
# node's control socket automatically.
# Print this seed's Radicle Node ID (NID). Share "<nid>@<domain>:8776" so other
# nodes can peer with and seed from you.
node_id() {
rad self --nid
}
# Full local identity: NID, DID, alias and key location.
whoami() {
rad self
}
# Node runtime status: running state, listen addresses and connected peers.
node_status() {
rad node status
}
# Repositories currently in this node's inventory (what it is seeding).
inventory() {
rad node inventory
}
# Routing table: which peers announce which repositories.
routing() {
rad node routing
}
# Explicitly seed a repository. Needed when RAD_SEEDING_SCOPE=followed or the
# policy is "block". Usage: seed_repo rad:z2...
seed_repo() {
rad seed "$1" --scope all
}
# Stop seeding a repository. Usage: unseed_repo rad:z2...
unseed_repo() {
rad unseed "$1"
}
# Connect to a specific peer. Usage: connect_peer <nid>@<host>:<port>
connect_peer() {
rad node connect "$1"
}
# Follow a peer's node. Usage: follow_peer <nid>
follow_peer() {
rad follow "$1"
}