Ubuntu

Deploy Modmail on an Ubuntu server.

Prerequisites

  1. Root access (sudo).

  2. Minimum 1GB of RAM

  3. At least 2GB available disk space.

  4. Supported releases:

    • Ubuntu 18.04 LTS (Bionic Beaver)

    • Ubuntu 20.04 LTS (Focal Fossa)

    • Ubuntu 22.04 LTS (Jammy Jellyfish)

Dependencies

We will be using the following dependencies:

  • Python 3.10

  • Tools: git, wget, nano, software-properties-common

  • Additional Modmail requirements: libcairo2-dev, libffi-dev, g++

All code blocks should be executed in bash and line by line unless specified otherwise.

To install these dependencies, we will be using apt.

We recommend adding the deadsnakes ppa to install Python 3.10:

Now install the pre-requirements with apt, you can copy and run these 3 lines at once:

After that, install pipenv with:

Failed to install Python 3.10?

You can manually compile Python instead of adding using the Deadsnakes PPA. Compiling Python may take a while (est. 5-10 minutes). Copy and run line 2-7 all at once.

Installing Bot

Clone and change directory into the Modmail folder with:

Inside the Modmail folder, Install pipenv and its Python packages with:

Create a file named .env with nano and paste all the environmental variables (secrets) needed to run the bot via right-clicking in the nano editor. Refer to the steps in the parent Installation page to find where to obtain these.

After that, press Ctrl+O and Enter to save your changes. Exit the nano editor with Ctrl+X.

If using the nano editor is a bit of a learning curve, you can always FTP into your server using software like WinSCP to edit the .env file manually with your preferred GUI-based editor like Notepad.

After your .env file is ready, you can now go ahead and try running your bot with:

If no error shows up, it means your bot is now running correctly. You can stop the bot from running with Ctrl+C to continue using your terminal.

Last updated