Skip to main content

Requirements

  • Node.js v22+ - Download here
  • Discord Bot Token
  • Server with sufficient permissions

Installation Guide

The controller is only accessible via localhost.

Windows Installation

Start the bot with node index.js. For 24/7 operation:
npm install -g pm2
pm2 start index.js --name "roadbackup"
pm2 startup
pm2 save

Linux Installation

Create SSH tunnel for localhost access (optional for controller, can also use slash commands):
ssh -L 3030:localhost:3030 youruser@yourip
Execute in the same folder as the bot. For 24/7 operation:
sudo npm install -g pm2
pm2 start index.js --name "roadbackup"
pm2 startup systemd
sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u $USER --hp $HOME
pm2 save
sudo systemctl enable pm2-$USER
sudo systemctl start pm2-$USER

Alternative: Systemd Service

Create service file:
sudo nano /etc/systemd/system/roadbackup.service
Add configuration:
[Unit]
Description=RoadBackup
After=network.target

[Service]
ExecStart=/usr/bin/node /yourpath/mysqlbackuperv2
WorkingDirectory=/yourpath/mysqlbackuperv2
Restart=always
User=yourusername
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
Enable and start service:
sudo systemctl daemon-reload
sudo systemctl enable roadbackup
sudo systemctl start roadbackup