Mac/Linux Installation
Attention
This webserver and it’s accompanying cog is built for Red Discord Bot. It will not work with other bots. If you haven’t already, install Red here.
Warning
For safety reasons, do not install Red Dashboard with a root user. If you are unsure how to create a new user on Linux, see DigitalOcean’s tutorial: How To Create a New Sudo-enabled User.
Welcome to the Mac/Linux Installation Guide for the Red Discord Bot Dashboard Webserver. While running the below directions, the following is assumed:
You are on a Mac or Linux distribution
You have all pre-requisites of Red Discord Bot installed
You have an instance of Red Discord Bot, set up and initialized
Installing the pre-requirements
This guide recommends using the same requisites that Red - Discord Bot uses. To ensure that you have the proper software already installed, consult the installation guide for your operating system here.
Creating a virtual environment
Just like for Red - Discord Bot, Red Dashboard requires it’s own, separate virtual environment to isolate dependencies.
You have two options for creating the virtual environment, depending on how you installed Red/Python:
Using pyenv virtualenv (only available for those who installed
pyenv
when installing Red)Using venv (available to anyone)
Using pyenv virtualenv
Red Dashboard, similar to Red Discord Bot, requires a Python version of at least 3.8.1. For ease of use, we recommend to use the same exact Python version as you use for Red.
First, ensure that you are using the correct version of Python:
pyenv version
Next, create a virtual environment for the Red Dashboard installation:
pyenv virtualenv reddashenv
Warning
You cannot use your Red Discord Bot virtual environment for Red Dashboard. The two packages use different versions of the same dependencies and will conflict.
Finally, enter your virtual environment with this command:
pyenv shell reddashenv
Important
You must activate the virtual environment with the above command every time you open a new shell to run, install or update Red Dashboard. You can check out other commands like pyenv local
and pyenv global
if you wish to keep the virtualenv activated all the time.
You can continue to Installing Red Dashboard.
Using venv
Red Dashboard, similar to Red Discord Bot, requires a Python version of at least 3.8.1. For ease of use, we recommend to use the same exact Python version as you use for Red.
First, create a virtual environment using whatever Python version you use for red. For example, if Python 3.8 was installed and being used for Red:
python3.8 -m venv ~/reddashenv
Warning
You cannot use your Red Discord Bot virtual environment for Red Dashboard. The two packages use different versions of the same dependencies and will conflict.
Next, enter your virtual environment with this command:
source ~/reddashenv/bin/activate
Important
You must activate the virtual environment with the above command every time you open a new shell to run, install or update Red Dashboard.
You can continue to Installing Red Dashboard.
Installing Red Dashboard
First, make sure you are in your virtual environment that you set up earlier by running the activation command mentioned above.
Once you are inside your virtual environment, update setup packages then install:
python -m pip install -U pip setuptools wheel
python -m pip install -U Red-Dashboard
You can continue to Installing Companion Cog or Automatic Startup.