MongoDB Setup
Setup and configure MongoDB
Step 1: Create an Account
Visit MongoDB Cloud:
Open your web browser and navigate to MongoDB Cloud.
Sign Up:
Click on the Sign Up button.
Enter your email address and create a password.
Alternatively, you can sign up using your Google account.
Accept Privacy Policy & Terms:
Read through the Privacy Policy & Terms.
Check the box to accept them and proceed.
Answer "Getting to Know You" Questions:
You will be presented with a few questions to help MongoDB understand your needs.
You can answer these questions randomly as they do not affect your setup.
Step 2: Deploy Your Cluster
Choose the Free Tier:
After logging in, you will be directed to the MongoDB Atlas dashboard.
Click on Build a Cluster.
Select the M0 (Free) tier option.
Cluster Configuration:
Name Your Cluster:
You can leave the default name as Cluster0 or choose a custom name.
Cloud Provider & Region:
Choose AWS as your cloud provider.
Select a region closest to you. (Frankfurt is recommended for European users).
Click Create Cluster to begin the deployment process.
Step 3: Set Up a Database User
Create a Database User:
While your cluster is being created, you will need to set up a database user.
Go to the Database Access tab.
Click on Add New Database User.
Set a Username & Password:
Enter a username of your choice.
Create a strong password and make a note of it as you will need it later.
Click Add User to create the database user.
Step 4: Choose a Connection Method
Connect to Your Cluster:
Once your cluster is created, go to the Clusters view.
Click on the Connect button for your cluster.
Choose a Connection Method:
Select Connect Your Application.
Drivers:
Select Drivers
Copy the connection string provided.
Note: Ensure the connection string starts with mongodb+srv://
.
Update Your Configuration File:
Open your config.yml file (Drako Bot config.yml).
Paste the connection string into the file.
Replace
<password>
in the connection string with the password you noted down earlier.
Step 5: Configure Network Access
Add IP Address:
Navigate to the Network Access tab.
Click on Add IP Address.
Enter the IP address of the server where you will be hosting your bot or application.
If you want to allow access from anywhere, you can add
0.0.0.0/0
, but this is not recommended for security reasons.Click Confirm to add the IP address.
Common Issues and Troubleshooting
Buffer Timeout
Whitelist IP Address:
Ensure your server's IP is whitelisted under the Network Access tab.
Correct Password:
Verify that the password you are using in the connection string is correct.
If you have forgotten your password, you can reset it in the Database Access tab:
Go to Database Access.
Click Edit next to the user.
Enter a new password and save the changes.
Last updated