Open In App

How to Install MongoDB Atlas

Last Updated : 26 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

MongoDB Atlas is a fully-managed cloud database service provided by MongoDB. It simplifies database management by hosting your MongoDB database on the cloud, eliminating the need for local hosting. MongoDB Atlas ensures our database is accessible anytime, with robust security, powerful analytics, scalability, and technical support.

In this article, we will learn how to install MongoDB Atlas on our system. Easy step-by-step instructions are provided for a fast installation process. This tutorial is perfect for beginners and will help us get started quickly with cloud-based MongoDB.

Features of MongoDB Atlas

  • Strong Security: Built-in security features, including encryption at rest and end-to-end encryption, provide protection for our data.
  • Precise Data Analytics: Advanced analytics tools for real-time insights and efficient decision-making.
  • Easy Scalability: Automatically scale your database based on your application's needs, from small projects to large enterprise applications.
  • 24/7 Technical Support: Access to expert support to resolve any database-related issues you may encounter

Steps to Install MongoDB Atlas

Follow the steps below to install MongoDB Atlas and set up our cloud database.

Step 1: Sign Up for MongoDB Atlas

  1. Visit the MongoDB Atlas website: Go to MongoDB Atlas.
  2. Create an Account: Click on the "Sign Up" button. You can either sign up using your email address or sign up with Google by selecting the "Sign Up with Google" option.
  3. Verify Your Account: After entering your credentials, follow the instructions to verify your account.
signup at mongodb website

Step 2: Choose a Free Cluster

  1. Select the Shared Cluster Option: After signing up, choose the "Shared" option for free usage.
  2. Click on 'Create for Free': This will initiate the creation of a free-tier cluster (M0 Sandbox).
select the shared option

Step 3: Configure Your Cloud Provider and Region

  1. Select Your Cloud Provider: MongoDB Atlas supports AWS, Google Cloud, and Azure. For the free plan, select either AWS or Google Cloud.
  2. Choose a Region: Select the geographic region where you want your cluster to be hosted. The closer the region is to your user base, the faster the performance.
  3. Choose the Cluster Tier: For free usage, select the M0 Sandbox tier.
  4. Name Your Cluster: Optionally, you can rename your cluster to something more recognizable. The setup may take 4-5 minutes to complete.
 select cloud provider

Step 4: Set Up Database Access

  1. Create a Username and Password: Set up a username and password for your database access. This will be the authentication method for accessing your MongoDB Atlas database.
  2. Set Permissions: Select "atlasAdmin" for database access, and ensure network access is configured to allow connections from anywhere.
create a username and password

Step 5: Connect Using MongoDB Shell

  1. Connect to the Database: Click on "Connect" and select "Connect with MongoDB Shell".
  2. Install MongoDB Shell: If you haven't installed MongoDB shell, follow the prompts to install it.
  3. Run the Command: Once the shell is installed, MongoDB Atlas will provide a connection string. Open your terminal or command prompt, paste the connection string, and replace <password> with your password.
  4. Enter Your Password: After entering the command, type in the password that you set earlier for your database user.
connect with the mongodb shell

Step 6: Connect Your Application to MongoDB Atlas

  1. Connect Your Application: To use MongoDB Atlas in your application, go to the "Connect" tab and select "Connect Your Application".
  2. Choose Your Node.js Version: Select the appropriate version of Node.js or your preferred driver.
  3. Copy the Connection String: MongoDB Atlas will provide a connection string that you can paste into your application’s MongoDB connection settings. Ensure you replace <password> with the actual password you set for your database user.
connect your application

Now your application is connected to MongoDB Atlas, and you can begin using the cloud-hosted database for your project.

Additional Guides

Conclusion

MongoDB Atlas is a powerful cloud-based database service that takes the hassle out of managing and hosting databases. By following the simple steps outlined above, we can quickly set up a free-tier MongoDB cluster, securely connect to it, and begin using it for our application. Whether we are a beginner or experienced developer, MongoDB Atlas offers easy scalability, enhanced security, and real-time data insights, making it an ideal choice for cloud database hosting.


Next Article

Similar Reads