Setting up the Database
The database is a really important part of your ModMail, as it saves your configuration and your logs. We will be using MongoDB, which offers a free hosting tier.
- Go to MongoDB Atlasopen in new window and create an account if you do not have one.
- Give your project a name and select JavaScript as you preferred language.
- Select the Shared Cluster option (the free one).
- Select the region that fits the best for you and click on Create Cluster.
- Enter a username and a password and write them down, you will need them later!
This username and password are different to your Atlas account's password, this is the one to access the DB. - Add the IP
0.0.0.0/0
to the IP Access List. This will allow every IP to connect to your database, including your host's one.
- Wait until your Cluster has been created. This operation can take up to 5 minutes.
- Click on CONNECT and select the application option.
- Copy the link and replace
<password>
with the password you created before. You also need to replacemyFirstDatabase?retryWrites=true&w=majority
withModMail
. - Write down the link in a secure place, you will need it later.