> This page location: /docs.md > /docs/tools-and-connectors.md > /docs/atlas/cli/current.md > /docs/atlas/cli/current/atlas-cli-tutorials.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

<!--
Tab options on this page. Append to the .md URL to filter:
  ?tabs=<id,...>   select specific tabs (e.g. ?tabs=nodejs,shell)
  ?allTabs=true    include every tab
  (no param)       default: one tab per tabset

Available tabs:
  other tabs: default, interactive, noninteractive
-->

# Create and Configure an Atlas Cluster

This tutorial demonstrates how to use the [atlas setup](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-setup.md#std-label-atlas-setup) command to:

1. Create one cluster in your Atlas project.

2. Load [sample data](https://www.mongodb.com/docs/atlas/sample-data/available-sample-datasets/) into your Atlas cluster.

3. Add your IP address to your project's IP access list.

4. Create a MongoDB user for your Atlas cluster.

5. Connect to your new cluster using the MongoDB Shell, [`mongosh`.](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh)

To perform all of these steps while also creating a new Atlas account, see [Get Started with Atlas.](https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-getting-started.md#std-label-atlas-cli-onboarding)

To create a cluster using a configuration file, run the [atlas clusters create](https://www.mongodb.com/docs/atlas/cli/current/command/atlas-clusters-create.md#std-label-atlas-clusters-create) command with the `--file` option instead of `atlas setup`. To learn more about the configuration file for an Atlas cluster, see [Cluster Configuration File.](https://www.mongodb.com/docs/atlas/cli/current/reference/json/cluster-config-file.md#std-label-atlas-cli-cluster-config-file)

You can also use `atlas setup` to create an Atlas account and authenticate with Atlas. To learn more, see [Get Started with Atlas.](https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-getting-started.md#std-label-atlas-cli-onboarding)

## Prerequisites

Before you begin, complete the following tasks:

- Create an [Atlas organization](https://www.mongodb.com/docs/atlas/organizations-projects/)

- [Install or Update the Atlas CLI](https://www.mongodb.com/docs/atlas/cli/current/install-atlas-cli.md#std-label-install-atlas-cli)

- [Connect from the Atlas CLI](https://www.mongodb.com/docs/atlas/cli/current/connect-atlas-cli.md#std-label-connect-atlas-cli)

Confirm outbound access on port 443 (HTTPS) for the Atlas API and on port 27017 for MongoDB connections.

## Configure an Atlas Cluster

Use the `atlas setup` command to create an `M0` cluster in Atlas. `M0` clusters have some operational [limitations.](https://www.mongodb.com/docs/atlas/reference/free-shared-limitations.md#std-label-atlas-free-tier)

You can run this command in the following ways:

- **Default settings mode**: the command creates a sample shared-tier cluster with the default settings.

- **Interactive mode**: the command prompts you for the cluster settings and provides default values.

- **Noninteractive mode**: you run the command with the options.

Click the tab to see the command for your preferred mode.

### Default Settings Mode

The command creates a sample shared-tier cluster with the following default settings:

- Cluster name: `Cluster<number>`

- Service provider: `AWS`

- Provider region: `US_EAST_1`

- Cluster tier: `M0`

- Disk size: `0.5` GB

- Database Username: `Cluster<number>`

- Database User Password: `abcdef12345`

- Allow connections from IP Address: `<YourIPAddress>`

- Load Sample Data: `Yes`

- Open Shell: `No`

**Note:**

The password is a random autogenerated value. `abcdef12345` is an example value.

```sh
atlas setup --force
```

**Output:**

```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']
Cluster created.
Your connection string: mongodb+srv://cluster9876543.example.mongodb.net

Loading sample data into your cluster... [Its safe to 'Ctrl + C']

Now you can connect to your Atlas cluster with: mongosh -u Cluster9876543 -p abcdef12345 mongodb+srv://cluster9876543.example.mongodb.net
```

## Verify the Deployment

After the cluster provisions, confirm it is ready before connecting.

| Checkpoint | Verification Step |
| --- | --- |
| CLI installed | Run `atlas --version`. The command returns version information. |
| Authenticated | Run `atlas auth whoami`. The command returns your authenticated user. |
| Cluster created | CLI output shows `Cluster created.` with a connection string. |
| IP access list updated | CLI output confirms your IP address was added. |
| Connection succeeds | Run `atlas clusters connect <cluster-name>` or connect with [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) using the connection string. |

## Next Steps

After you create and verify your Atlas cluster, you can:

- **Connect your application**: Use the connection string with [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) or a [MongoDB driver.](https://www.mongodb.com/docs/manual/reference/connection-string/#connection-string-options)

- **Configure security**: Add IP addresses to your access list, create application-specific database users, or enable private endpoints for production workloads.

- **Load data**: Use the `--loadSampleData` flag during setup, or load your own data with [mongoimport](https://www.mongodb.com/docs/database-tools/mongoimport/) or [mongorestore.](https://www.mongodb.com/docs/database-tools/mongorestore/)

- **View cluster status**: [Log in to the UI](https://www.mongodb.com/docs/atlas/tutorial/create-atlas-account.md#std-label-atlas-account-login) or run an `atlas clusters` command in the Atlas CLI.

- **Scale or modify your cluster**: See [Modify a Cluster.](https://www.mongodb.com/docs/atlas/scale-cluster/)
