Skip to content

Installation (Self Hosting)

Luna Köpke edited this page Mar 13, 2023 · 3 revisions

This page will describe the full installation process.

All of the commands assume that your terminal is inside the project directory. (Either from release or clone)

Enviroment Variables

  • DISCORD_TOKEN: the token the bot uses to login into discord.
  • DEBUG: Recommended for development, doesn't create a sqlite file. (always Blank, few extra outputs)
  • DATABASE_ENGINE: specifies what sqlalchemy engine should be used. (postgress recommended, others have to be installed.)
  • DATABASE_URL: the path or url the database is stored at. (default is at /data.db)

Needed things before installing the Bot

  1. You need a discord account.
  2. You need to register a discord application on the discord developer page.
  3. On the page for the application, create a bot and copy the token to a save location. (This is the very important thing.)
  4. On the application page go to OAuth2/URL Generator create a link with scope bot and admin permission. (Is easiest that way.)

Which permissions the bot requires

Here a list of permissions the bot needs, which helps if you don't want to give the bot admin. (Future updates might require more permissions)

  • Send Messages is required to respond to commands!
  • Read Messages is to detect commands!
  • Ban Members is required for the !ban command.
  • Kick Members is required for the !kick command.
  • Manage Channels is required for the !nsfw command.
  • Change Nickname is required for certain filters.
  • Delete Messages is required for certain filters.

Install via Docker

only use releases or checked commits

  1. Make sure docker and docker-compose is installed.
  2. Create an .env file and put your token in there like this.
DISCORD_TOKEN=<your token here>
  1. Use the docker compose up -d (on older versions docker-compose up)
  2. The bot should now be running, if not please create an issue.

Install manually

  1. Make sure python 3.8 or higher is installed. python --version 2A. Create an .env file and put your token in there like this.
DISCORD_TOKEN=<your token here>

2B. Alternatively you can create a start.sh.

DISCORD_TOKEN=<your token here> python app.py
  1. Install the required packages pip install -r requirements.txt
  2. Run the python app python app.py (if you created a start.sh sh start.sh)