Request-Response

The Full-Stack Blog

Set Up MongoDB Atlas

November 14, 2023
Disponible en español

In this guide, we'll go through the steps required to create your account and initial cluster with MongoDB Atlas.

What Is MongoDB Atlas?

MongoDB Atlas is a cloud-based database service that is created and maintained by MongoDB. It works with hosting services such as AWS, Azure, and Google Cloud to help users provision, maintain, and secure new databases for their applications.

We'll use its free service tier to host MongoDB databases for our production-ready apps when we deploy them. Learn more about it at the MongoDB Atlas website.

Set Up Account and Initial Database

To get started, you'll need a MongoDB Atlas account.

  1. To begin the sign-up process, navigate to the MongoDB Atlas sign-up page, which is shown in the following image:

The MongoDB Atlas sign up page shows us a form to create an account.

  1. Fill in the required fields.

  2. When you're done, click "Create your Atlas account".

  3. Next you will be sent an email verification. Verify your email by clicking the "Verify Email" button on that email as shown in the image below:

The MongoDB Atlas sign up page shows us a form to create an account.

  1. After verifying your email, head back to the Mongo Login page and login using your credentials.

Welcome to Atlas

Upon logging in for the first time, you will be presented with a "Welcome to Atlas!" page.

  1. For "What is your goal primary goal?", select "Learn MongoDB".

  2. For "How long have you been developing software with MongoDB??", select "Less than a year".

  3. Select "JavaScript" as your primary language.

  4. For "What kind(s) of data will your project use?" and "Will your application include any of the following architectural models?", Select "Not sure/None" .

    Your form should look like the image below:

The Welcome to Mongo Atlas form page.

Create a Cluster

Upon completing the form you will be presented with a your "Overview" page.

  1. To create a cloud database for deployment, click the "+ Create" button.

The Atlas Overview page with no created deployments.

  1. You'll be taken to the "Deploy your database" page, as shown in the following image:

MongoDB Atlas Database Creation Plans

  1. Select the free "M0 FREE" plan.

  2. Select "AWS" as the provider. For the region, select the region that is closest to you. You can accept the default cluster name provided. If after selecting your provider and nearest region your screen resembles the following image, you can click the green "Create" button:

Create a Shared Cluster Options.

Set Up Your MongoDB Atlas Dashboard

Because this is the first time you've seen this dashboard, you'll be taken directly to the "Security Quickstart". Instead of going through the quickstart, we will go through the security settings manually.

Add New Database User

To add a new database user, follow these steps:

  1. On the left-hand navigation menu, under Security, select the "Database Access" link.

  2. From there, click the "Add New Database User" button. The following image shows the resulting modal with the options you'll need to select:

The add user form allows us to create a new user with varying access to our databases.

  1. To fill out the form, follow these steps:
  • For "Authentication Method", choose Password.

  • Under "Password Authentication", create a username and password that you'll remember.

  • Under "Database User Privileges", select "Atlas admin".

  • Leave any remaining options as default.

  • IMPORTANT: Do not enable "Temporary User" unless you want to make a new user every so often.

  • When you're done, click "Add User".

Allow Your IP Address

You'll need allow your IP address. The following image shows the various parts of this step highlighted:

The modal for allowing IP addresses provides a form to enter your IP address.

To allow your IP address, follow these steps:

  • On the left-hand navigation menu, under Security, click the "Network Access" link.

  • Click the "Add IP Address" button. The "Add IP Whitelist Entry" modal will appear.

  • To make your database accessible from anywhere, click "Allow Access From Anywhere". This will set the Whitelist Entry value to "0.0.0.0/0".

  • Click Confirm.

That's it for now! You don't need to worry about adding sample data or connecting just yet.

Now that your accounts are all set up, you can move on to creating a production-ready database for deployment.

This page was updated 4 months ago
© 2022 edX Boot Camps LLC. Confidential and Proprietary. All Rights Reserved.

Category: MongoDB

Tagged under: mongodb, mongodb atlas, cloud,

All Posts