This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Install – Self Hosting
Patrix87 edited this page Jan 19, 2022
·
27 revisions
- Download source code from https://github.com/DiscordGSM/DiscordGSM/releases and extract it.
- Install Python dependencies: From the bot folder us the cmd:
pip install -r requirements.txt
- Install Node dependencies: From the bot folder us the cmd:
npm install -g gamedig
- Rename
servers_template.json
toservers.json
and configure it - Rename
dot_env
to.env
and configure it - Edit both files with your configurations, details about the config files are in this wiki.
- Run the bot with command
python bot.py
- Connect as root.
- Update Linux
apt update -y && apt upgrade -y && apt dist-upgrade -y
- Install Python3-Pip and NodeJS 17 and gamedig:
apt install software-properties-common -y
curl -sL https://deb.nodesource.com/setup_17.x | bash -
apt install -y nodejs
node -v
npm install gamedig -g
apt install python3-pip -y
- Create a user called discordgsm and switch to that user:
adduser discordgsm
su - discordgsm
- Download source code from https://github.com/DiscordGSM/DiscordGSM/releases:
git clone https://github.com/DiscordGSM/DiscordGSM.git
cd DiscordGSM
- Install Python dependencies:
python3 -m pip install -r requirements.txt
- Rename
servers_template.json
toservers.json
and configure it - Rename
dot_env
to.env
and configure it - Edit both files with your configurations, details about the config files are in this wiki.
- Run the bot with command
python bot.py
orpython3 bot.py
on linux to test it.
Type exit to logout of the discordgsm user session to return to root
- Create a service to run the bot automatically on boot and auto-restart it.
nano /etc/systemd/system/discordgsm.service
11.1 Paste the following content and save:
[Unit]
Description=DiscordGSM
After=network.service
[Service]
Type=simple
WorkingDirectory=/home/discordgsm/DiscordGSM
ExecStart=sh /home/discordgsm/DiscordGSM/bot.sh
User=discordgsm
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
11.2 Reload the service daemon:
systemctl daemon-reload
11.3 Enable your service:
systemctl enable discordgsm.service
11.4 Start your service:
systemctl start discordgsm.service
11.5 Check that it works:
systemctl status discordgsm.service
The bot will output it's invite link to the console on startup.
https://discord.com/api/oauth2/authorize?client_id={clientid}&permissions=93184&scope=bot
Wiki of DiscordGSM | Discord: https://discord.gg/Cg4Au9T