Linux commands used to install a relay on Linux VM

The following Linux commands are used to install a relay on Linux VM:

NB: Please get in touch with our support if you require a relay to be installed on Linux.

INSTALLS THE CURL SOFTWARE THAT IS REQUIRED FOR SETTING UP A RELAY ON LINUX VM :

sudo apt update && sudo apt install curl
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt install unzip
sudo apt install wget
sudo npm install pm2 -g

CREATES THE RELAY FILE LOCATION:

sudo mkdir /synatic
cd /syantic

NB: CONFIG AND CERTIFICATE NEEDS TO BE PACKAGED WITH BASE FILES INTO A ZIP FILE – UPLOADED BY SYNATIC STAFF (TO BE ARRANGED).

ZIP FILE CREATED BY USING THE CONFIG AND THE CERTIFICATE OF THE RELAY SETUP ON SYNATIC:

sudo wget https://images.synatic.com/files/{<RELAYNAME>}.zip

UNPACKING THE ZIP FILE:

sudo unzip {<RELAYNAME>}.zip -d /synatic/{<RELAYNAME>}
cd {<RELAYNAME>}
sudo npm i

IF EDITING IS REQUIRED:

sudo vi config.json

SAME RELAY TEST AS DONE ON THE WINDOWS RELAY MANAGER:

sudo node synatic-relay.js

TO START AND STOP RELAY SERVICES:

sudo pm2 startOrRestart relay-server.json
sudo pm2 startup
sudo pm2 save