Guide for Ubuntu - 8BitJosh/JukeBot GitHub Wiki

Ubuntu 16.04+

1: Dependencies

The bot requires other software installed on your Ubuntu machine. Run these commands in your terminal window.

sudo apt-get update
sudo apt-get install git build-essential python3-pip vlc-nox -y
sudo apt-get upgrade -y

2: Clone

Run the following commands to download MusicBot. This will place it in a new folder called JukeBot, which we will immediately enter.

git clone https://github.com/8BitJosh/JukeBot.git
cd JukeBot

3: Start

Firstly, ensure pip is up to date.

python3 -m pip install --upgrade pip

Before starting your bot, update the Python dependencies using pip. To do that, use this command (you may have to run it using sudo):

python3 -m pip install -U -r requirements.txt

You can test that your bot works by running this command:

./JukeBot.sh -f

If you close your SSH session/console, the bot will stop running.

3.a: Start permanently

If you're already running the bot, press CTRL + C a few times to stop it from running and get you back to being able to use console commands.

There are a number of options that can allow you to run the bot permanently, so that it continues even if you are not connected to your Ubuntu machine through an SSH client.

Running in the background

The script also comes with functionality to run the bot as a background process. The process will then persist after the session ends. Start the bot with:

./JukeBot.sh -b

The bot can then be stopped with:

./JukeBot.sh -e

Tmux

Run this command to make a tmux console and then run the bot:

tmux new -s bot

./JukeBot.sh -f

Now that the bot is running, press CTRL+B then d separately to 'detach' from the tmux session. If you ever want to have a look at the bot's console logs, SSH back into the machine and run tmux a.

Screen

Run this command to make a screen console and run the bot:

screen -S bot

./JukeBot.sh -f

Now that the bot is running, press Ctrl+A then d separately to 'detach' from the screen. If you ever want to have a look at the bot's console logs, SSH back into the machine and run screen -r bot.

⚠️ **GitHub.com Fallback** ⚠️