Skip to main content

Installing Gunbot on Linux

note

This guide, written for Ubuntu 22.04.1 server version, provides step-by-step instructions for setting up Gunbot on Linux. While the focus is on Ubuntu, the steps are largely applicable to other Linux distributions. Desktop users can follow along using their integrated terminal.

Basic Linux instructions​

Download the latest Gunbot release from here. Extract gunthy_linux.zip on your computer.

In the terminal, navigate to the Gunbot folder and set permissions:

cd /home/Gunbot
chmod +x gunthy-linux

Then start running the process:

./gunthy-linux

Access the Gunbot GUI at http://localhost:3000

Setting Up a VPS (Optional)​

For those who prefer using a VPS, here are some popular choices among Gunbot users:

After signing up and ordering a Linux VPS, you'll receive an email with server access details.

Prerequisites​

For Windows:

For MacOS:

Connecting to Your VPS​

On Windows​

Use PuTTy to connect to your VPS. Enter your Server IP in the "Host Name" field and click "Open."

PuTTY connection configuration for remote Linux server

Accept any security prompts on the first connection. Log in with your VPS credentials.

On MacOS​

Connect using the Terminal:

ssh root@YOUR.IP.ADDRESS.HERE

Enter your server password when prompted.

Configuring the VPS (Optional)​

Update Your VPS​

Run the following command:

apt-get update && apt-get upgrade -y

Install NodeJS and PM2​

PM2 makes it easy to keep the bot process alive while you are not logged into the server. It also provides advanced logging capabilities.

Install necessary packages and NodeJS:

sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get install nodejs -y
apt-get install npm

In case you run into an error related to common.gypi, then the following steps could help:

sudo apt-get remove nodejs libnode-dev
sudo apt-get clean
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install nodejs
sudo dpkg --configure -a
node -v

Install PM2, a process manager:

npm i -g pm2
pm2 install pm2-logrotate

Installing PM2 process manager for Gunbot on Linux

Start Gunbot​

Start Gunbot using PM2 (optional) or directly:

pm2 start gunthy-linux

To view Gunbot logs:

pm2 logs 1

Optional Steps​

  • Custom Naming: Give a custom name to your Gunbot instance:

    pm2 start gunthy-linux --name YourCustomNameHere
  • Auto-restart on Reboot: Ensure Gunbot restarts automatically after a server reboot:

    pm2 startup
    pm2 save