### Enable and Start Caddy Service Source: https://radicle.xyz/guides/seeder Enables the Caddy service to start on boot and starts it immediately. This command assumes the systemd unit file and Caddyfile have been correctly configured. ```shell systemctl enable --now caddy ``` -------------------------------- ### Setup Tor Onion Service Directory (macOS) Source: https://radicle.xyz/guides/user Creates the directory for the Tor Onion Service on macOS using the `brew` installation path. The `-p` flag ensures parent directories are created if they don't exist, and `-m 700` sets restrictive permissions. ```bash mkdir -p -m 700 ~/.tor/radicle ``` -------------------------------- ### Enable and Run Radicle HTTPD Service Source: https://radicle.xyz/guides/seeder Enables the radicle-httpd service to start on boot and starts it immediately. This command assumes the systemd unit file has been correctly placed and configured. ```shell systemctl enable --now radicle-httpd ``` -------------------------------- ### Start Radicle Node in Foreground Source: https://radicle.xyz/guides/seeder Command to initiate the Radicle node process directly in the terminal. Useful for initial setup and troubleshooting, displaying logs in real-time. No external dependencies beyond the Radicle CLI. ```bash rad node start --foreground ``` -------------------------------- ### Install Radicle CLI Source: https://radicle.xyz/guides/user Installs Radicle and its associated binaries (`rad`, `git-remote-rad`, `radicle-node`, `radicle-httpd`) and man pages. This script identifies your OS, downloads appropriate binaries, places them in `~/.radicle/bin`, and updates your `PATH`. It can also be configured with a custom prefix using the `--prefix` flag. ```bash $ curl -sSLf https://radicle.xyz/install | sh ``` ```bash $ curl -sSLf https://radicle.xyz/install | sh --prefix=/usr/local ``` -------------------------------- ### Start Radicle Node Daemon Source: https://radicle.xyz/guides/user This command starts the Radicle node as a background daemon. This is necessary if the node is not currently running and you wish to connect to the Radicle Network. It operates without requiring additional input after execution. ```bash $ rad node start ``` -------------------------------- ### Radicle Identity Creation Output Example Source: https://radicle.xyz/guides/user An example of the output generated during the `rad auth` process, showing the prompts for alias and passphrase, key pair generation, and the resulting Radicle DID (Decentralized Identifier). It also indicates if the key has been added to the ssh-agent. ```bash $ rad auth Initializing your radicle 👾 identity ✓ Enter your alias: paxel ✓ Enter a passphrase: ******** ✓ Creating your Ed25519 keypair... ✓ Adding your radicle key to ssh-agent... ✓ Your Radicle DID is did:key:z6Mkhp7VUnuufpvuQ3PdysShAjL86VDRUpPpkesqiysDBGs9. This identifies your device. Run `rad self` to show it at all times. ✓ You're all set. ... ``` -------------------------------- ### Install Caddy Web Server (Debian/Ubuntu) Source: https://radicle.xyz/guides/seeder Installs the Caddy web server on Debian or Ubuntu-based systems using the apt package manager. Caddy is used here to provide HTTPS support for the Radicle HTTP Daemon. ```shell apt-get install caddy ``` -------------------------------- ### Verify Radicle Installation Source: https://radicle.xyz/guides/user Checks if the Radicle CLI has been successfully installed by displaying its current version. This command should be run after the installation script completes. ```bash $ rad --version ``` -------------------------------- ### Verify Caddy Installation Source: https://radicle.xyz/guides/seeder Checks the installed version of Caddy to confirm successful installation. This command is useful for verifying the installation before proceeding with configuration. ```shell caddy version ``` -------------------------------- ### Enable and Start Radicle Node Systemd Service Source: https://radicle.xyz/guides/seeder Enables the Radicle node service to start automatically on boot and starts it immediately. Manages the node as a background service. Requires `systemctl` and root privileges. ```bash systemctl enable --now radicle-node ``` -------------------------------- ### Radicle Identity Details Output Example Source: https://radicle.xyz/guides/user An example output of the `rad self` command, detailing various aspects of a user's Radicle identity such as Alias, DID, Node ID, SSH status, SSH key information, and home directory paths for configuration and storage. ```bash $ rad self Alias paxel DID did:key:z6Mkhp7VUnuufpvuQ3PdysShAjL86VDRUpPpkesqiysDBGs9 └╴Node ID (NID) z6Mkhp7VUnuufpvuQ3PdysShAjL86VDRUpPpkesqiysDBGs9 SSH running (3817) ├╴Key (hash) SHA256:YCmRe6BkDOp45lYg0m5DeYxgRcPKftQZb4RmQD1nkjQ └╴Key (full) ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO9xo9DHlsZJeZWnZaaawsnKFjcQxN4LQ… Home /home/paxel/.radicle ├╴Config /home/paxel/.radicle/config.json ├╴Storage /home/paxel/.radicle/storage ├╴Keys /home/paxel/.radicle/keys └╴Node /home/paxel/.radicle/node ``` -------------------------------- ### Download and Install Radicle Node systemd Service File Source: https://radicle.xyz/guides/seeder Fetches the systemd unit file for the Radicle node and saves it to the systemd directory. This enables management of the node as a system service. Requires `curl` and appropriate write permissions to `/etc/systemd/system/`. ```bash curl -sSL https://seed.radicle.xyz/raw/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/570a7eb141b6ba001713c46345d79b6fead1ca15/systemd/radicle-node.service -o /etc/systemd/system/radicle-node.service ``` -------------------------------- ### Download Caddy systemd Unit File Source: https://radicle.xyz/guides/seeder Downloads the systemd unit file for the Caddy service from its GitHub repository. This file is used to manage the Caddy web server process. ```shell curl https://raw.githubusercontent.com/caddyserver/dist/master/init/caddy.service -o /etc/systemd/system/caddy.service ``` -------------------------------- ### Switch to Radicle Seed User Source: https://radicle.xyz/guides/seeder This command switches the current user to 'seed', which is typically used for running Radicle seed nodes. This is a necessary step before proceeding with certain installation and configuration tasks. ```bash sudo su seed ``` -------------------------------- ### Inspect Repository Seeding Policy (CLI) Source: https://radicle.xyz/guides/seeder Retrieves the seeding policy for a specific repository. If no specific policy is set, it returns the node's default policy. ```bash rad inspect rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 --policy ``` -------------------------------- ### Example DID Node Identifier Source: https://radicle.xyz/guides/protocol This snippet shows an example of a Radicle Node ID encoded as a Decentralized Identifier (DID) using the `did:key` method. DIDs are crucial for verifying message authenticity and providing consistent identification within the Radicle network. ```text did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK ``` -------------------------------- ### Create Seed User and Group (Linux) Source: https://radicle.xyz/guides/seeder Creates a system group named 'seed' and a system user named 'seed' with its home directory. This isolates Radicle services for enhanced security. ```bash sudo groupadd --system seed sudo useradd --system --gid seed --create-home seed ``` -------------------------------- ### Example Signed References Blob Source: https://radicle.xyz/guides/protocol This snippet shows the format of a blob found under the `refs/rad/sigrefs` branch, which contains signed Git references. Each line lists a commit SHA and its corresponding reference name, similar to the output of `git show-ref`. These signed references are crucial for verifying the canonical state of a Radicle repository. ```text 9767b485c2aad1e23097d2b5165287ba84cfa452 refs/heads/master f3eaa7454e3a4714885905ae99f616fc7895b5fa refs/cobs/xyz.radicle.patch/fe31d5b6049583a42c21a543545d182b893aa4a0 0590b78ee42b39087983e4de04164065e5aa11bc refs/cobs/xyz.radicle.patch/ffbb812ad6e7fe1c5c610b1246ca5ca9d7d16027 ``` -------------------------------- ### Download Radicle HTTPD systemd Unit File Source: https://radicle.xyz/guides/seeder Downloads the systemd unit file for the radicle-httpd service. This file is used to manage the radicle-httpd background process. Ensure the URL is correct and the destination path is appropriate for your system. ```shell curl -sSL https://seed.radicle.xyz/raw/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/570a7eb141b6ba001713c46345d79b6fead1ca15/systemd/radicle-httpd.service -o /etc/systemd/system/radicle-httpd.service ``` -------------------------------- ### Example Radicle Repository Identity Document Source: https://radicle.xyz/guides/protocol This JSON document defines the metadata for a Radicle repository, including its delegates, the required signature threshold for changes, and project-specific information like name, description, and default branch. It is stored within the Git repository under the `refs/rad/id` reference. ```json { "delegates": ["did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi"], "threshold": 1, "payload": { "xyz.radicle.project": { "name": "heartwood", "description": "Radicle Heartwood Protocol & Stack ❤️🪵", "defaultBranch": "master" } } } ``` -------------------------------- ### Configure Caddyfile for Radicle Proxy Source: https://radicle.xyz/guides/seeder Sets up the Caddyfile to proxy HTTPS requests to the Radicle HTTP Daemon. This configuration directs traffic from a specified domain on port 443 to the daemon running on localhost:8080. Remember to replace `seed.radicle.example` with your actual domain name. ```caddy seed.radicle.example { reverse_proxy 127.0.0.1:8080 } ``` -------------------------------- ### Create Alias for Running Radicle Commands as Seed User Source: https://radicle.xyz/guides/seeder Sets up a shell alias to simplify running Radicle CLI commands as the 'seed' user without needing to prefix with `sudo -u seed`. Add this to your admin shell's init scripts (e.g., `.bashrc`, `.zshrc`). ```bash alias rad='sudo -u seed -- rad' ``` -------------------------------- ### Create and Commit Changes for a Patch Source: https://radicle.xyz/guides/user This snippet demonstrates the initial steps to prepare for creating a patch. It involves checking the current Radicle repository, creating a new Git branch, copying necessary log files, staging the changes, and committing them with a descriptive message. ```bash $ rad . rad:z3cyotNHuasWowQ2h4yF9c3tFFdvc $ git checkout -b anomalous-data-897af $ cp /var/run/897af.log data/897af.log $ git add data/ $ git commit -m "Add anomalous data from ship 897AF" ``` -------------------------------- ### Initialize and Publish Git Repository to Radicle Source: https://radicle.xyz/guides/user Initializes a local Git repository for publishing on the Radicle network. It prompts for repository details like name, description, default branch, and visibility, then generates a unique Repository ID (RID) and announces the project to the network. It also creates a 'rad' Git remote for pushing changes. ```bash $ rad init Initializing radicle 👾 project in . ✓ Name: dark-star ✓ Description: Decoding data from the dark star to establish a model of the universe ✓ Default branch: main ✓ Visibility: public ✓ Project dark-star created. Your project's Repository ID (RID) is rad:z31hE1wco9132nedN3mm5qJjyotna. You can show it any time by running `rad .` from this directory. ✓ Project successfully announced to the network. Your project has been announced to the network and is now discoverable by peers. You can check for any nodes that have replicated your project by running `rad sync status`. To push changes, run `git push`. ``` -------------------------------- ### Change Directory Ownership for Radicle Installation Source: https://radicle.xyz/guides/seeder This command changes the ownership of the /usr/local/bin, /usr/local/man, and /usr/local/man/man1 directories to the current user and group, which is necessary for installing Radicle binaries. ```bash $ sudo chown $(whoami): /usr/local/{bin,man,man/man1} ``` -------------------------------- ### Radicle Private Repository Initialization Output Source: https://radicle.xyz/guides/user Demonstrates the output upon successful initialization of a private Radicle repository. It includes the Repository ID (RID) and confirms that the repository is private and only visible to authorized peers. It also provides commands to switch visibility or push changes. ```bash rad init --private Initializing private radicle 👾 repository in /home/paxel/src/schrödingers-paradox.. ... Your Repository ID (RID) is rad:z3jEQE4VMzkR1UVeSLiN9E8AMtV6a. You can show it any time by running `rad .` from this directory. You have created a private repository. This repository will only be visible to you, and to peers you explicitly allow. To make it public, run `rad publish`. To push changes, run `git push`. ``` -------------------------------- ### Get Node Addresses (CLI) Source: https://radicle.xyz/guides/seeder Outputs the node's external addresses, which are a combination of the Node ID and the configured External Address. This information is used by others to connect to the node. ```bash rad node config --addresses ``` -------------------------------- ### Get Radicle Seeding Policy Configuration Source: https://radicle.xyz/guides/seeder This command retrieves and displays the current default seeding policy configured for the Radicle node. This setting determines which repositories the node fetches and replicates. ```bash rad config get node.seedingPolicy ``` -------------------------------- ### Update README for Radicle Clone Instructions (Diff) Source: https://radicle.xyz/guides/user Shows the changes made to the README.md file, adding instructions on how to clone the repository using Radicle. ```diff diff --git a/README.md b/README.md index 91b304791..70ef6efc9 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ +## Radicle + +To clone this repository on Radicle, simply run: + + rad clone rad:z31hE1wco9132nedN3mm5qJjyotna + ``` -------------------------------- ### Initialize a Private Radicle Repository Source: https://radicle.xyz/guides/user Initializes a new repository as private in Radicle. This ensures the repository is not announced or published on the network, making it visible only to explicitly authorized peers. It leverages the `--private` flag during initialization. ```bash cd schrödingers-paradox git init cp ~/secrets/897af-captain.log data/897af-captain.log git commit -a -m "Add captain's log from ship 897AF" rad init --private ``` -------------------------------- ### View All Issues in a Repository Source: https://radicle.xyz/guides/user Displays a table of all issues associated with the current repository. Each issue entry includes its status, ID, title, and author. This command works within the repository's working directory. ```shell rad issue ``` -------------------------------- ### Seed a Private Repository on a Seed Node Source: https://radicle.xyz/guides/user This command instructs a seed node to replicate a specified private repository. It requires the repository ID and the '--from' flag to indicate the source node's DID. This ensures the private repository is available on the trusted seed node for authorized peers. ```bash $ rad seed rad:z3jEQE4VMzkR1UVeSLiN9E8AMtV6a --from z6MkvZwzK64f3GuDcAs6dEcje89ddfHkBjS1v9Dkh7aCGq3C ``` -------------------------------- ### Add and Commit Changes, then Push to Radicle (Bash) Source: https://radicle.xyz/guides/user This sequence demonstrates adding a modified file, committing the changes with a message, and then pushing the commit to the local Radicle remote ('rad'). ```bash $ git add README.md $ git commit -m "Add instruction on cloning with Radicle" $ git push rad master ✓ Synced with 1 node(s) To rad://z31hE1wco9132nedN3mm5qJjyotna/z6MkvZwzK64f3GuDcAs6dEcje89ddfHkBjS1v9Dkh7aCGq3C ecb1bf0..74fb8d2 master -> master ``` -------------------------------- ### List All Radicle Repositories with `rad ls` Source: https://radicle.xyz/guides/user Lists all repositories that your node is involved with, including those you have contributed to (e.g., by pushing branches or commenting on issues), in addition to seeded repositories. When run without arguments, it shows repositories you've interacted with beyond just seeding. ```bash $ rad ls ``` -------------------------------- ### Check Radicle HTTPD Service Status Source: https://radicle.xyz/guides/seeder Verifies the running status of the radicle-httpd service. This is useful for troubleshooting and confirming that the daemon is active. ```shell systemctl status radicle-httpd ``` -------------------------------- ### Open an Issue with Command-Line Arguments Source: https://radicle.xyz/guides/user Opens a new issue by specifying the title and description directly via command-line flags, bypassing the need to open a text editor. This is an alternative to using the interactive editor. ```shell rad issue open --title "Your Issue Title" --description "Your issue description." ``` -------------------------------- ### Query Radicle HTTPD API Source: https://radicle.xyz/guides/seeder Makes a request to the radicle-httpd API endpoint to ensure it is accessible and responding. This tests the basic functionality of the daemon. ```shell curl http://127.0.0.1:8080/api/v1 ``` -------------------------------- ### Restart Tor Daemon (Linux) Source: https://radicle.xyz/guides/user Restarts the Tor service to apply the new configuration changes, including the setup of the onion service. This command ensures the daemon reloads its configuration files. ```bash $ sudo systemctl restart tor ``` -------------------------------- ### List Seeded Radicle Repositories with `rad ls --seeded` Source: https://radicle.xyz/guides/user Lists all repositories that are currently being seeded by your node. This command helps you keep track of the repositories you are actively replicating and sharing on the network. ```bash $ rad ls --seeded ``` -------------------------------- ### Follow Radicle Node Logs Source: https://radicle.xyz/guides/seeder Streams the systemd journal logs for the Radicle node service in real-time. Useful for monitoring activity and diagnosing issues. Requires `journalctl`. ```bash journalctl --unit radicle-node --follow ``` -------------------------------- ### List Private Repositories on Seed Node Source: https://radicle.xyz/guides/user This command lists the private repositories currently seeded by the Radicle node. It's used after successfully replicating a private repository to verify its presence on the seed node. This confirms that the repository is accessible for authorized peers. ```bash $ rad ls --private ``` -------------------------------- ### Allow Specific Repository Seeding (CLI) Source: https://radicle.xyz/guides/seeder Overrides the default seeding policy to explicitly allow a specific repository to be seeded. This command is used when the default policy is 'block'. ```bash rad seed rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 ``` -------------------------------- ### Configure Git Alias for Opening Patches Source: https://radicle.xyz/guides/user This configuration command sets up a Git alias named 'patch' to simplify the process of pushing to `refs/patches`. By running `git patch`, users can execute `git push rad HEAD:refs/patches` without typing the full command, making patch creation more efficient. The `--global` flag adds this alias to the user's global Git configuration. ```bash $ git config alias.patch 'push rad HEAD:refs/patches' # To add globally: # $ git config --global alias.patch 'push rad HEAD:refs/patches' ``` -------------------------------- ### List Private Radicle Repositories Source: https://radicle.xyz/guides/user Lists all private repositories accessible from the current directory. The output displays the repository name, its unique Repository ID (RID), and its visibility status, confirming it as 'private'. ```bash rad ls --private ``` -------------------------------- ### Publish Repository (Private to Public) Source: https://radicle.xyz/guides/user Transforms a private Radicle repository into a public one. This is achieved by running the `rad publish` command within the repository's working copy. This action makes the repository accessible to anyone without requiring specific permissions. ```bash rad publish ``` -------------------------------- ### Configure External Node Addresses (JSON) Source: https://radicle.xyz/guides/seeder Sets the external addresses for the Radicle node, which are public DNS names pointing to the node. Multiple addresses can be configured up to a limit of 16. ```json { "node": { "externalAddresses": ["seed.radicle.example:8776"] } } ``` -------------------------------- ### Replication via Git Source: https://radicle.xyz/guides/protocol Explains how repository data is transferred via replication using the Git protocol over the established secure connection. ```APIDOC ## Replication via Git ### Description Repository data is transferred using the Git protocol. After receiving a relevant announcement, a node establishes a secure connection to a repository's seed and initiates a Git fetch protocol. Objects are downloaded and stored locally, then made available to other nodes. Multiple concurrent Git fetches can occur over a single connection. ### Method Git Protocol (over established secure session) ### Endpoint Peer-to-peer connection ### Parameters N/A (Git protocol negotiation) ### Request Example (Git fetch protocol commands) ### Response Repository objects ### Response Example (Git packfile data) ``` -------------------------------- ### Unseed Repository (CLI) Source: https://radicle.xyz/guides/seeder Removes a previously configured seeding override for a specific repository, reverting it to the node's default seeding policy. This can be used for both 'seed' and 'block' overrides. ```bash rad unseed rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 ``` -------------------------------- ### Exit Radicle Seed Session Source: https://radicle.xyz/guides/seeder Command to gracefully terminate the current 'seed' session and return to the parent shell. Used after foreground node startup or other interactive 'seed' commands. No dependencies. ```bash exit ``` -------------------------------- ### Block Specific Repository Seeding (CLI) Source: https://radicle.xyz/guides/seeder Overrides the default seeding policy to explicitly block a specific repository from being replicated on the node. This command is used even if the default policy is 'allow'. ```bash rad block rad:z9DV738hJpCa6aQXqvQC4SjaZvsi ``` -------------------------------- ### Configure Selective Seeding Policy (JSON) Source: https://radicle.xyz/guides/seeder Sets the default seeding policy to 'block', requiring manual allowance for repositories to be seeded. This is suitable for limiting hosted data or requiring authentication. ```json { "node": { "seedingPolicy": { "default": "block" } } } ``` -------------------------------- ### Displaying Patch Information Source: https://radicle.xyz/guides/user This snippet illustrates how to display detailed information about a specific patch using the 'rad patch show' command. It provides details such as the patch title, current revision, author, branches, commits, status, and a commit timeline. ```shell $ rad patch show e5f0a5a ``` -------------------------------- ### Restart Radicle Node Systemd Service Source: https://radicle.xyz/guides/seeder Restarts the Radicle node service, applying any configuration changes. This is necessary when modifying the node's configuration file. Requires `systemctl` and root privileges. ```bash systemctl restart radicle-node ``` -------------------------------- ### Check Radicle Node Systemd Service Status Source: https://radicle.xyz/guides/seeder Displays the current status of the Radicle node systemd service, including whether it is active, enabled, and recent log entries. Requires `systemctl`. ```bash systemctl status radicle-node ``` -------------------------------- ### Connect to a Radicle Peer via Tor Source: https://radicle.xyz/guides/user Use this command to establish a direct connection to a peer using their NID and .onion address. This requires the peer to be running a Tor-enabled node. ```bash $ rad node connect z6Mkhp7VUnuufpvuQ3PdysShAjL86VDRUpPpkesqiysDBGs9@odmmeotgcfx65l5hn6ejkaruvai222vs7o7tmtllszqk5xbysolfdd.onion:8776 ``` -------------------------------- ### Extract Radicle Binaries Source: https://radicle.xyz/guides/seeder This command extracts the downloaded Radicle archive to the /usr/local/ directory. The --strip-components=1 option removes the top-level directory from the archive, and -C /usr/local/ specifies the extraction destination. ```bash $ tar -xvJf --strip-components=1 -C /usr/local/ ```