Improve unit files, add binary install to README

After going through the process of getting this working using the unit
files, I found a few issues that are fixed here.
This commit is contained in:
Alexis Sellier 2023-06-21 16:56:06 +02:00
parent 63ff4717dc
commit 33870572d4
No known key found for this signature in database
3 changed files with 53 additions and 8 deletions

View File

@ -19,6 +19,14 @@ and freedom.
* Git 2.34 or later * Git 2.34 or later
* OpenSSH 9.1 or later with `ssh-agent` * OpenSSH 9.1 or later with `ssh-agent`
### 📀 From binaries
> Requires `curl` and `tar`.
Run the following command to install the latest binary release:
sh <(curl -sSf https://radicle.xyz/install)
### 📦 From source ### 📦 From source
> Requires the Rust toolchain. > Requires the Rust toolchain.

View File

@ -0,0 +1,28 @@
# Example systemd unit file for `radicle-httpd`.
#
# When running radicle-httpd on a server, it should be run as a separate user.
#
# Copy this file into /etc/systemd/system and set the User/Group parameters
# under [Service] appropriately.
#
# For users wishing to run a configured version of the service, copy this
# service file into the user's systemd directory, and edit appropriately.
#
# For example:
#
# mkdir -p $HOME/.config/systemd/user/
# cp radicle-node.service $HOME/.config/systemd/user/radicle-node.service
#
[Unit]
After=syslog.target network.target
Description=Radicle HTTPd
[Service]
ExecStart=%h/.radicle/bin/radicle-httpd
Environment=RAD_HOME=%h/.radicle
KillMode=process
Restart=always
RestartSec=1
[Install]
WantedBy=default.target

View File

@ -1,27 +1,36 @@
# Example systemd unit file for `radicle-node`.
#
# When running radicle-node on a server, it should be run as a separate user. # When running radicle-node on a server, it should be run as a separate user.
#
# Copy this file into /etc/systemd/system and set the User/Group parameters # Copy this file into /etc/systemd/system and set the User/Group parameters
# under [Service] appropriately. # under [Service] appropriately.
#
# For users wishing to run a configured version of the service, copy this # For users wishing to run a configured version of the service, copy this
# service file into the user's systemd directory, and edit appropriately. # service file into the user's systemd directory, and edit appropriately.
# #
# mkdir -p $HOME/.local/share/systemd/user/ # For example:
# cp radicle-node.service $HOME/.local/share/systemd/user/radicle-node.service
# #
# You will have to set the RAD_PASSPHRASE for the node to start. # mkdir -p $HOME/.config/systemd/user/
# cp radicle-node.service $HOME/.config/systemd/user/radicle-node.service
#
# You will have to set the RAD_PASSPHRASE environment variable to the
# passphrase supplied during `rad auth`, for the node to start, eg.
# #
# [Service] # [Service]
# Environment="RAD_PASSPHRASE=[passphrase]" # Environment=RAD_PASSPHRASE=<passphrase>
#
# Also ensure RAD_HOME is set appropriately.
#
[Unit] [Unit]
After=syslog.target network.target After=syslog.target network.target
Description=Radicle Node Description=Radicle Node
[Service] [Service]
ExecStart=%h/.radicle/bin/radicle-node ExecStart=%h/.radicle/bin/radicle-node --listen 0.0.0.0:8776
Environment=RAD_HOME=%h/.radicle
KillMode=process KillMode=process
Restart=always Restart=always
RestartSec=1 RestartSec=1
[Install] [Install]
WantedBy=multi-user.target WantedBy=default.target