Skip to main content

๐Ÿ‘ Deploy a database cluster

Now that you have a MongoDB Atlas account, you can create your first cluster for free.

Once logged in, from the Overview page, click on the green button that says + Create.

Overview screenshot

On the cluster creation page, choose the cloud provider and region where your data will be stored. You can also choose the type of cluster you want to create. For this lab, we will use the free tier.

  1. For the cluster tier, pick M0, which is the free tier. In the Name input box, assign a name (one word, no spaces) to your cluster.
  2. Uncheck the Automate security setup box. You will set up security manually in the next steps.
  3. Uncheck the Preload sample dataset box. You will import a dataset later in this lab.
  4. Select your favorite cloud provider and the region closest to you.
  5. Finally, click on the green button that says Create Deployment.
Create cluster screenshot

Once you're done with the hardest part of the process (the captcha), you will be redirected to the security quickstart.

Security quickstartโ€‹

By default, your MongoDB Atlas deployment is completely locked-down. You need to configure the network settings and create a user to access your database.

While your deployment is being provisioned, you will see the security quickstart dialog.

Network accessโ€‹

First, you should Allow Access from Anywhere. You will see a field pre-populated with the IP address 0.0.0.0/0. This means that you can connect to your database from any IP address including the virtual environment you will use for this lab. Click Add IP Address to add this IP address to the network allowlist.

caution

It is dangerous to expose your database to the entire world. Never do this is a real production environment.

Database userโ€‹

Next, you need to create a database user. Pick any username and password you want. This will be used when you want to connect to your database. Click Create Database User to create the user.

Atlas might create the user automatically for you if you have just created your account. In this case, the username and password will match your Atlas account credentials.

tip

Make sure to remember your username and password. You will need them later. For the sake of this workshop, it might be preferable to use a simple password that you'll remember over a more secure one.

Manual network access configurationโ€‹

If you don't see a button to Allow Access from Anywhere, you should close the dialog and go to the Network Access tab under the Security section in the left sidebar. Click on the Add IP Address button, add the IP address 0.0.0.0/0 and click Confirm.

That's all!โ€‹

That's all! You have a new database cluster. If everything goes well, you should see your newly created cluster on the Database tab under the Deployment section.

Screenshot of the database deployment screen