Alma Linux
Deploy Modmail on RHEL / Alma Linux / CentOS server.
For safety reasons, DO NOT install Modmail with a root user. A misbehaving or malicious plugin installed on your Modmail bot can easily access your entire system. If you are unsure how to create a new user on Linux, see DigitalOcean’s tutorial: How To Create a New Sudo-enabled User.
Alma Linux 8, 9 and CentOS Stream 8, 9 are based on Red Hat Enterprise Linux (RHEL) 8 and 9 respectively so you can essentially follow this guide if you're running any of the OS mentioned above.
Prerequisites
Root access (
sudo
).Minimum 1GB of RAM
At least 2GB available disk space.
Supported releases:
Alma Linux 9
Alma Linux 8
CentOS Stream 9
CentOS Stream 8
Red Hat Enterprise Linux (RHEL) 9
Red Hat Enterprise Linux (RHEL) 8
Dependencies
Python 3.9
Tools:
git
,nano
All code blocks should be executed in bash and line by line unless specified otherwise.
RHEL 9 / Alma Linux 9 / CentOS Stream 9
RHEL 9 and its derivatives have all required packages available in official repositories. Install them with dnf
:
RHEL 8 / Alma Linux 8 / CentOS Stream 8.4-8.x
RHEL 8 and its derivatives have all required packages available in official repositories. Install them with dnf
:
Installing Bot
Clone and change directory into the Modmail folder with:
Inside the Modmail folder, ensure pip
is installed correctly and is defaulting to Python 3.9 with:
And then, install pipenv
and the bot dependencies 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