☁ïļHosting

Hosting the bot on a VPS server

We also provide hosting. We can cover the burden of hosting for you. We provide 24/7 uptime, daily backups and straightforward code updates (within 1 minute!) if you so require.

Otherwise, follow the guide below to learn how to host this bot yourself.

GitHub Repo

Prerequisites for Docker Hosting

  • Docker Installed - Windows or Linux. I prefer using WSL

  • Basic Linux command line knowledge

  • A Linux VPS server or Raspberry Pi

Hosting with Docker

  1. Follow the steps in Running with Docker but on your Linux server instead!

If the bot does not start up, view the logs with the following: docker ps -a.

Grab the CONTAINER ID and then run: docker logs <containerid>. A common issue is forgetting to enable Discord Intents.

Prerequisites for Python Hosting

Hosting with Python

Follow the steps in Running locally. You will need to install a program like tmux or screen to run the script in the background so you can exit the server without the bot going offline. You can also use systemd to control the bot as a daemon.

Hosting with Systemd

Prerequisites for Systemd Hosting

The below should work for most Linux operating systems.

The steps below assume that you have root access to your VPS server and that the InHouseQueue code lives within the /root directory. If you're using a Linux user, replace root with that user and point to whatever directory the code lives.

Install the requirements. Make sure you're inside the InHouseQueue directory and run:

pip install -r requirements.txt

Next, we want to create a systemd file.

cd /etc/systemd/system

Create a new file. Name it whatever you like but make sure it ends in .service

nano InHouseQueue.service

Paste in the code block below.

[Unit]
Description=Discord Bot
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /root/InHouseQueue/main.py
User=root
Restart=on-failure
RestartSec=30
WorkingDirectory=/root/InHouseQueue/
[Install]
WantedBy=multi-user.target

Run these commands in order

sudo chmod +x /root/InHouseQueue/main.py
sudo systemctl enable InHouseQueue.service
sudo systemctl daemon-reload
sudo systemctl start InHouseQueue.service

The bot should now be up and running!

You can start, stop or view the status of the bot. These are all pretty self-explanatory. If it's not, this should help.

sudo systemctl start/stop/status InHouseQueue.service

Setup the Bot

  1. /setchannel [channel] [game]

  2. /setwinner log [channel] [game]

  3. /top_ten [channel] [game]

  4. Start a queue inside your queue channel with /start

Last updated