You can get started with Atlas via the Atlas CLI using a single command: atlas setup.
This tutorial demonstrates how to use atlas setup to:
Sign up for an Atlas account.
Authenticate with the new Atlas account.
Create one free database.
Load sample data into your Atlas database.
Add your IP address to your project's IP access list.
Create a MongoDB user for your Atlas database deployment.
Connect to your new database deployment using the MongoDB Shell,
mongosh.
You can also run atlas setup if you have an Atlas account and an organization/project but you haven't set up a cluster.
Complete The Prerequisites
Before you begin, you must install the Atlas CLI.
Follow These Steps
Complete the following procedure to get started with Atlas.
atlas setup After you run the command, enter :guilabel:`Y` to open the default browser. A browser window displays the :guilabel:`Create Your Account` screen. If you want to log into an existing |service| account, click :guilabel:`Log in now` and log in. If you're already logged into an existing |service| account, proceed to step 3. .. step:: Sign up and verify your account. Enter your account information and click :guilabel:`Sign Up`. Follow the prompts to verify your email or register using third-party authentication. .. step:: Verify your Atlas CLI session. When you reach the :guilabel:`Activation` screen, copy the verification code from the Atlas CLI and paste it into the browser. Then, click :guilabel:`Confirm Authorization` and return to the terminal window. .. step:: Accept the default cluster creation settings. After you verify your Atlas CLI session, ``atlas setup`` creates an ``M0`` cluster. ``M0`` clusters have some operational :ref:`limitations <atlas-free-tier>`. If you log into an existing account and have existing organizations and projects, ``atlas setup`` prompts you to select a default organization and default project. Select a default organization and project and press :guilabel:`Enter`. When the Atlas CLI prompts ``Do you want to set up`` ``your first free database in Atlas with default`` ``settings? It's free forever!``, enter :guilabel:`Y` to create your cluster with the default settings. The command creates a sample ``M0`` shared-tier cluster with the following default settings: - Cluster name: ``Cluster<number>`` - Cloud provider and region: ``AWS - US_EAST_1`` - Database Username: ``Cluster<number>`` - Database User Password: ``abcdef12345`` - Load Sample Data: ``Yes`` - Allow connection from IP: ``<YourIPAddress>`` .. io-code-block:: .. input:: :language: sh Do you want to set up your first free database in Atlas with default settings? It's free forever! Y .. output:: :language: sh We are deploying Cluster9876543... Please store your database authentication access details in a secure location. Database User Username: Cluster9876543 Database User Password: abcdef12345 Creating your cluster... [Its safe to 'Ctrl + C']
Take the Next Steps
Congratulations! You have successfully set up your Atlas account.
Use the connection string to connect to your cluster through mongosh or your application.
To view the status of your cluster, run the atlas clusters command.