Table of Contents

RADIUSdesk Wireguard Agent

Overview


Installation

Please double check

sudo apt-get install iptables
sudo sysctl -p

The Rest

sudo apt update
sudo apt install wireguard
sudo apt-get install -y curl lua-socket lua-cjson luarocks
sudo luarocks install inifile
cd /var/www
sudo git clone https://github.com/RADIUSdesk/rdcore.git
#Link the wireguard agent's files to /etc directory.
#(btw the accel-ppp folder is correct and part of the history of the project)
sudo ln -s /var/www/rdcore/cake4/rd_cake/setup/accel-ppp/MESHdesk /etc/MESHdesk

Configuration

Startup and additional required files

#config file for the agent
sudo cp /etc/MESHdesk/files/wireguard-rd.conf /etc/
#Smart Queue Management (SQM) and throttling scrip
sudo cp /etc/MESHdesk/files/cake-wg.sh /usr/local/sbin/
#Startup files
sudo cp /etc/MESHdesk/files/rd-wireguard-init.service /etc/systemd/system/
sudo cp /etc/MESHdesk/files/rd-wireguard-heartbeat.service /etc/systemd/system/

Config File

[internet]
disabled=0
dns=cloud.radiusdesk.com
url=cake4/rd_cake/nodes/get-config-for-node.json
status_url=cake4/rd_cake/node-reports/submit_report.json
actions_url=cake4/rd_cake/node-actions/get_actions_for.json
protocol=https
http_port=80
https_port=443
ip=164.160.89.129
interface=eth0
 
[wireguard]
interface=eth0

Startup Files

sudo systemctl disable wg-quick@wg0.service
sudo systemctl disable wg-quick@wg1.service
sudo systemctl disable wg-quick@wg2.service
sudo systemctl disable wg-quick@wg3.service
sudo systemctl daemon-reload
 
sudo systemctl enable rd-wireguard-init
sudo systemctl enable rd-wireguard-heartbeat
 
sudo systemctl start rd-wireguard-init
sudo systemctl start rd-wireguard-heartbeat
sudo journalctl -u rd-wireguard-init -f
sudo journalctl -u rd-wireguard-heartbeat -f