-
Notifications
You must be signed in to change notification settings - Fork 0
Self hosting Reto
So! You've decided to self-host Reto. Whether that is to make the bot feel a bit more like yours, modify its behaviour, not depend on the official hosting, adapt it to your server's necessities, or for whatever other reason - congratulations! Here's a handy guide on how to host your very own instance on your local machine.
To install Reto, you can clone this repository (assuming you're using Git Bash or the Linux terminal) with the command git clone https://github.com/despedite/reto.git
.
After that, you might want to fetch the project's dependencies. Assuming you've got Python running on your machine, simply run pip install .
on the command line (while on the Reto folder).
The bot won't run without a bit of fiddlin' around with its settings. In the json/ folder you may find a file named config-PLEASE-EDIT.json
- this needs to be opened in a text editor, its variables changed, and renamed accordingly. Here's what each variable does:
- key: The bot automatically encrypts its databases, so not you nor anyone else can access them. This is the encryption key the bot uses to encrypt said databases. This string can be anything, but it's recommended to use a strong, randomly-chosen password, just in case. DO NOT SHARE THIS KEY.
- bottoken: This is the bot token Discord generates for you when you've created a bot on the Discord Developer Portal. Here's an in-depth guide on how to create a Discord bot, if you haven't done so already. DO NOT SHARE THIS TOKEN.
- botname: Replaces all instances of the bot's name (in this case, Reto) to its own. Change this if you'll name your bot anything other than Reto, otherwise feel free to leave as is.
- prefix: The default prefix Reto uses on DMs and all servers that haven't set their own custom prefix. Feel free to leave as is.
- support: Links to the support server shown on the ?setup command, error messages, et cetera. If you don't have one (say, you're selfhosting this for a couple friends), feel free to leave as is.
- botver: The bot's current version. Appears on its Activities and other places. Leave blank, as is, or write your own.
- botowner: An array of the people that are the bot's developers. You should fill this out with your user ID to gain access to certain bot owner specific commands (and a badge on your ?profile).
-
debug: Boolean (True/False) that's useful if you wanna test certain commands alone. Its main use is letting you vote on your own posts. Make sure this is set as
"False"
when you're done coding.
Finally, when you're done modifying the .json file, save it and rename it to config.json
. Run the bot with python reto.py
from your command line - copy the invite link from the command line, invite the bot to your server, run the ?setup command and you're ready to go!
Read this wiki page on how to migrate to encrypted databases. If this is your first time installing Reto, it's most likely a false-positive.