Comment on page
☁
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.
Prerequisites for Docker Hosting
- 1.
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
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.
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
Last modified 1mo ago