Repository navigation
01. Install
gitopenssldockerdocker-compose
-
Clone the repository
$ git clone https://github.com/yukimochi/Activity-Relay.git -b v2.0.9
Note: Check the latest version for yourself here
-
Copy and write
config.ymlThe
config.ymlformat should follow this$ cp config.yml.example config.yml $ vim config.yml
-
Generate an actor RSA certificate to
./actor.pem$ openssl genrsa -traditional | tee actor.pem $ chmod 600 actor.pemNote: If you use OpenSSL version <3, type
openssl genrsainstead ofopenssl genrsa -traditional -
Build the image and run services
$ docker compose build $ docker compose up -d
Verify that it is running
$ docker compose ps
Stop services
$ docker compose down
openssl-
relaybinary that you build from source -
systemctl --version232 or newer -
sudoprivileges
-
Move the relay binary into your
$PATH$ sudo mv relay /usr/bin
-
Test that it worked
$ relay
-
Create a group named
relay$ sudo groupadd --system relay
-
Create a user named
relay, with a writeable home folder$ sudo useradd --system \ --gid relay \ --create-home \ --home-dir /var/lib/relay \ --shell /usr/sbin/nologin \ --comment "YUKIMOCHI Activity-Relay" \ relay -
Place
config.ymlin/var/lib/relay/config.ymlThe
config.ymlformat should follow this$ sudo mv config.yml /var/lib/relay
-
Generate an actor RSA certificate in
/var/lib/relay/actor.pem$ openssl genrsa -traditional | sudo tee /var/lib/relay/actor.pem $ sudo chmod 600 /var/lib/relay/actor.pem $ sudo chown relay:relay /var/lib/relay/actor.pemNote: If you use OpenSSL version <3, type
openssl genrsainstead ofopenssl genrsa -traditional -
Place systemd service files and start services
Download the systemd service files from here and check the ExecStart directive. Make sure the binary's location is correct for your installation.
$ sudo mv relay-api.service /etc/systemd/system $ sudo mv relay-worker.service /etc/systemd/system
After saving your service file, you can start the service for the first time with the usual systemctl command
$ sudo systemctl daemon-reload $ sudo systemctl enable relay-api $ sudo systemctl enable relay-worker $ sudo systemctl start relay-api $ sudo systemctl start relay-worker
Verify that it is running
$ systemctl status relay-api $ systemctl status relay-worker
Stop services
$ sudo systemctl stop relay-api $ sudo systemctl stop relay-worker