|
1 | 1 | ---
|
2 |
| -description: Deploy Modmail on a MacOS machine. |
| 2 | +description: Deploy Modmail on a macOS machine. (Tested with Apple Silicon M2) |
3 | 3 | ---
|
4 | 4 |
|
5 |
| -# MacOS |
6 |
| - |
7 |
| -TODO |
| 5 | +# macOS |
8 | 6 |
|
9 | 7 | ## Prerequisites
|
10 | 8 |
|
11 |
| -## Updating |
| 9 | +1. Minimum 2GB of RAM |
| 10 | +2. At least 2GB available disk space. |
| 11 | +3. Supported macOS version: |
| 12 | + - MacOS 14 Sonoma (Tested) |
| 13 | + - MacOS 11 Monterey (Tested) |
| 14 | + |
| 15 | +## Dependencies |
| 16 | + |
| 17 | +We will be using the following dependencies: |
| 18 | + |
| 19 | +* Python 3.10 |
| 20 | +* Tools: `git`, `homebrew`, `bash` or `zsh` |
| 21 | +* Additional Modmail requirements: `cairo`, `libxml2`, `libxslt`, `libffi` |
| 22 | + |
| 23 | +{% hint style="info" %} |
| 24 | +All code blocks should be executed in zsh or bash and line by line unless specified otherwise. |
| 25 | +{% endhint %} |
| 26 | + |
| 27 | +To install these dependencies, we will be using Terminal (zsh or bash): |
| 28 | + |
| 29 | +```bash |
| 30 | +brew install python3 cairo libxml2 libxslt libffi |
| 31 | +pip3 install cairosvg |
| 32 | +``` |
| 33 | + |
| 34 | +After that, install `pipenv` with: |
| 35 | + |
| 36 | +```bash |
| 37 | +python3.10 -m pip install pipenv |
| 38 | +``` |
| 39 | + |
| 40 | +## Installing Bot |
| 41 | + |
| 42 | +Clone and change directory into the Modmail folder with: |
| 43 | + |
| 44 | +```bash |
| 45 | +git clone https://github.com/modmail-dev/modmail |
| 46 | +cd modmail |
| 47 | +``` |
| 48 | + |
| 49 | +Inside the Modmail folder, install `pipenv` and its Python packages with: |
| 50 | + |
| 51 | +<pre class="language-bash"><code class="lang-bash"><strong>python3.10 -m pipenv install --python 3.10 |
| 52 | +</strong></code></pre> |
| 53 | + |
| 54 | +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](../#preparing-your-environmental-variables) to find where to obtain these. |
| 55 | + |
| 56 | +```bash |
| 57 | +cp .env.example .env |
| 58 | +nano .env |
| 59 | +``` |
| 60 | + |
| 61 | +<figure><img src="../../.gitbook/assets/image (6).png" alt=""><figcaption></figcaption></figure> |
| 62 | + |
| 63 | +After that, exit the nano editor with `Ctrl+X` and select or enter `y` when prompted to save. Press enter to maintain the exiting name of the document. |
| 64 | + |
| 65 | +{% hint style="info" %} |
| 66 | +If using the `nano` editor is a bit of a learning curve, you can edit the `.env` file manually with your preferred GUI-based editor like TextEdit. |
| 67 | +{% endhint %} |
| 68 | + |
| 69 | +After your `.env` file is ready, you can now go ahead and try running your bot with: |
| 70 | + |
| 71 | +```bash |
| 72 | +python3.10 -m pipenv run bot |
| 73 | +``` |
| 74 | + |
| 75 | +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. |
0 commit comments