How to set up PhantomBot on a Linux VPS/server

About

PhantomBot is an open-source Twitch bot which runs on your own computer (unlike web-based bots like Nightbot)

However, some people might like to keep the bot on a separate computer. This way it uses no resources on your gaming/streaming PC and can be left on 24/7 without keeping your PC on.

This guide will show you how to set up PhantomBot on a Linux (Debian-based) VPS

It should work on a VPS/dedicated server with most providers, but I recommend using Vultr as they are a solid provider, with ultra fast hardware and network, and have locations all over the World.

VPS/Requirements

The VPS I will be using is a 512MB RAM VPS from Vultr running Debian 9 (Stretch). Using the latest version of the OS is important as it includes the required version 8 of openjdk. However this guide should work on any OS based on Debian (i.e. Ubuntu)

Creating and connecting to the VPS

Note: you can skip this bit if you know how to connect to your server

Once you have signed up at Vultr, you will be able to create a VPS. Just go to Servers then click the plus sign (+) and choose your location by clicking on the flag (choose the country nearest to you, then click Debian and select 9 x64 then under Server Size choose the specs you want. You should be able to easily run Phantombot on the smallest 512MB RAM package, so choose this one for now. Once you click deploy, wait a few minutes for the server to be created.

Next, download PuTTY from this link. This is the program you will use to connect to your server and run commands. Open the file once it’s done downloading, and set it up like this

Host Name (or IP Address): the IP address given to you by Vultr on the “servers” page (or your VPS provider’s website/control panel)
Port: 22
Saved Sessions: in this box, type a name for your server like “PhantomBot”

After that, click Save, then click Open

Once you click that, a window should pop up and ask you for a password. This is the root password of your server, and will have been emailed to you by Vultr (or you can click on your server in the control panel, and click the eye next to Password.

Once you’ve logged in to your VPS you should see something similar to this

root@vultr:~#

If you see that, move onto the next step. If not, try again or post a comment below and I will try to help.

Setting up the VPS

Note: to paste something in PuTTY, just right click inside the window

Now we need to update our server and install some things. First, you may want to change the password.

To change your password type passwd and press enter. Then it will ask you to choose a password, and after pressing enter it will ask you to confirm it. Type it in again and press enter, it should say passwd: password updated successfully

Next, run the following command to update your server and install unzip (to unzip some files), nano (a commandline text editor which we will use later), openjdk-8 (version 8 of the open Java Development Kit, needed for PhantomBot to run), screen (used to run PhantomBot in the background when you disconnect from the server) and unattended-upgrades (to help keep your server secure)

apt-get update && apt-get -y dist-upgrade && apt-get -y install screen unattended-upgrades unzip openjdk-8-jdk-headless nano

If you used Vultr, it will most likely be updated and already have some of these installed, so shouldn’t take long.

Installing PhantomBot

Note: to paste something in PuTTY just right click inside the window

 

Visit the PhantomBot website and find the “Stable” release. Right click on “Download” and choose “copy link address” then type in the following command, replacing the link below with the link you got from the website

wget https://github.com/PhantomBot/PhantomBot/releases/download/v2.3.9/PhantomBot-2.3.9.zip --no-check-certificate

Next we need to extract the folder from the zip file. Type in the following

unzip PhantomBot*.zip && rm PhantomBot*.zip

Next we need to navigate to the PhantomBot folder, and then make some files executable so we can run them. Type (or copy/paste) the following command to change to the folder

cd PhantomBot*

Then type the following command to make the files executable

chmod u+x launch-service.sh launch.sh

Now we’re ready to start up a screen session and run PhantomBot. First type the following command to start up a screen session

screen -S bot

Now we can start PhantomBot, and it will keep running when we disconnect from the server! Type the following command to start PhantomBot

./launch.sh

Answer the questions asked by PhantomBot and press enter

Once you have set up the bot, do the following

Hold Ctrl + A, then press D while still holding them

You can now close, PuTTY down and disconnect from the server

To configure PhantomBot, open your web browser and visit the following address, where (YOURIP) is the IP address of your VPS (for example, it might be something like http://1.1.1.1:25000/panel)

http://YOURIP:25000/panel

The username and password is the username and password you specified during the set up of PhantomBot

Tips/things to note

For song requests, instead of /panel you would use /ytplayer and for the song request list it’s /playlist so you can link to this in your chat by making a command called !playlist (easily done in PhantomBot)

Any issues/problems

If you have any issues at all, please leave a comment below.

admin

Leave a Reply

Your email address will not be published. Required fields are marked *