This is a quick installation guide for the Strfry Nostr relay. This process has been tested on Ubuntu Server 22.04 however is likely to work on other recent versions of Ubuntu and Debian. This guide assumes that the operating system has already been installed.
Installation of HAProxy
HAProxy is used as a reverse proxy in front of the strfry process to terminate the SSL connections. Run the following CLI commands to install HAProxy version 2.6:
add-apt-repository ppa:vbernat/haproxy-2.6 -y
apt install -y haproxy=2.6.\*
**TODO: HAProxy config and SSL cert**
Set HAProxy to run on boot, and start it:
systemctl enable haproxy
systemctl start haproxy
Installation of Strfry
Install the prerequisite packages:
sudo apt install -y git build-essential libyaml-perl libtemplate-perl libssl-dev zlib1g-dev liblmdb-dev libflatbuffers-dev libsecp256k1-dev libb2-dev
Add a user for strfry, download strfry and compile:
adduser --gecos "" --disabled-password strfry
su - strfry
git clone https://github.com/hoytech/strfry.git
cd strfry
git submodule update --init
make setup-golpe
make -j4
Modify the strfry configuration file and test strfry **TODO**
Create a systemd unit file to start strfry on boot:
vi /etc/systemd/system/strfry.service
Paste the following into the strfry.service file:
[Unit]
Description=Strfry Relay
After=network.target
[Service]
WorkingDirectory=/home/strfry/strfry
ExecStart=/home/strfry/strfry/strfry relay
KillSignal=SIGINT
Type=simple
Restart=always
RestartSec=30
TimeoutSec=240
LimitNOFILE=1000000
User=strfry
[Install]
WantedBy=multi-user.target