Vercel is a development platform that simplifies application deployments. Vercel has a marketplace for developers to discover software packages and provision applications.
The MongoDB Atlas Native Integration with Vercel allows you to:
Provision Atlas resources directly from the Vercel dashboard, with billing managed through your Vercel account.
Access resources in Atlas through a provisioned linked account.
Deploy MongoDB Atlas clusters for new and existing Vercel applications.
Choose from Free, Dedicated, and Flex MongoDB clusters, with options for every use case.
After you create MongoDB Atlas clusters, Vercel adds your Atlas cluster credentials and other settings to your Vercel environments.
Find Atlas in Vercel
If you are a Vercel user with any role, you can discover Atlas through the following methods:
Log into the Vercel UI.
Under the Overview tab locate the Add new button in the upper right corner and from the drop-down, select Integration.
Considerations
Accounts in Vercel (Personal or Team)
The integration with Vercel requires that you:
Create a new personal account or create a new team in Vercel.
Use an existing personal or team account in Vercel.
Projects in Vercel
You can link one Atlas cluster to more than one project in Vercel.
If you create a Native Integration of Atlas in Vercel, Atlas creates a new Vercel-managed organization and project in Atlas for you.
IP Access Lists in Atlas and IP Allow Lists in Vercel
Vercel deployments use dynamic IP addresses.
To connect to an Atlas cluster, the IP access list of your Atlas cluster must allow all IP addresses (0.0.0.0/0). If Atlas doesn't find an entry for 0.0.0.0/0 in your Atlas project's IP access list, Atlas adds it on your behalf, as part of the integration workflow.
Note
If you add the 0.0.0.0/0 CIDR to a project access list,
Atlas sends an alert email to all users directly
granted a role to the project, or indirectly granted a role through
team membership (if the team is granted a role to the
project).
Atlas creates a database user in the following format: Vercel-Admin-[name of resource]
in the admin database and grants the built-in readWriteAnyDatabase
MongoDB database role to all non-system databases in the Atlas cluster.
For example, if your Vercel resource is named my-first-atlas-cluster,
the database user that Atlas creates is Vercel-Admin-my-first-atlas-cluster.
Vercel Native Integration
To integrate with Vercel, locate MongoDB Atlas in the Vercel Marketplace and create a new MongoDB Atlas account with billing conducted through Vercel. A Native Integration of MongoDB Atlas in Vercel allows you to:
Provision Atlas resources directly from the Vercel dashboard and manage billing through your Vercel account. You can also directly access resources in Atlas through a provisioned linked account.
Deploy MongoDB Atlas clusters for new and existing Vercel applications.
After you create MongoDB Atlas clusters, Vercel adds your Atlas cluster credentials and other settings to your Vercel environments.
Atlas provisions the account for you if you don't have one. The Atlas account is linked to the Vercel installation. You have separate credentials for logging into Atlas.
Considerations: Native Integration
The following considerations apply to the Native Integration of Atlas in Vercel.
Resource Mapping
A "team installation" in Vercel maps to an organization in Atlas. An installed product (resource) in Vercel maps to a project and cluster in Atlas.
API Access
Vercel requires programmatic access to Atlas APIs to create and manage resources on behalf of users and to propagate environmental changes.
User Provisioning and Account Linking
Atlas provisions new Atlas user accounts for Vercel users, links existing accounts, and sends a password reset email if you don't configure Atlas credentials. User authentication requires Atlas credentials to access Atlas.
The user who initially installs the Atlas Native Integration for the Vercel team becomes the Atlas
Organization Owner.Accessing |service| from Vercel
You can navigate to Atlas UI from Vercel via an Open in Atlas button. After logging in with your Atlas credentials, Atlas redirects you to the corresponding Atlas resource.
Users with existing Atlas accounts. When accessing Atlas from Vercel, Vercel prompts users with existing Atlas accounts to confirm linking their Atlas account to their Vercel installation. After the users confirm the linkage and log in with Atlas credentials to prove their identity, Atlas links the users' Atlas accounts to their Vercel installation.
New users. Atlas provisions an account for new users and sends a password reset email so that users can configure their passwords and prove their identity. Once Atlas obtains the user's credentials, Atlas links the user's Atlas account to their Vercel installation and grants this user the
Organization Ownerrole in Atlas. Atlas keeps organization's permissions in line with the permissions in Vercel. Vercel's "Admin" and "User" roles map toOrganization OwnerandOrganization Read Onlyroles in Atlas, respectively.
If any user in the Vercel team installs additional Atlas clusters using the Native Integration, Atlas doesn't automatically add these users to the Atlas organization created for the Vercel team. The Atlas organization owner must ensure that all Vercel team users who need access to the Atlas organization have it. This also applies to new Vercel team users who join the Vercel team after the initial installation of the Native Integration.
Use one of the following methods to ensure that Atlas adds additional Vercel team's users to the Atlas Organization:
Vercel team users can access the Atlas organization in the Atlas UI through the Vercel UI. if they're not already Atlas users, Atlas provisions accounts for them, with assignment to the Atlas organization for the Native Integration.
The Atlas Organization owner can invite Atlas users to the Atlas Organization.
Environment Variables
The Native Integration automatically configures the
MONGODB_URIenvironment variable for secure database connections. For the full list of environment variables, see the Vercel UI for the Native Integration of Atlas.Billing
The Vercel Native Integration creates a new Atlas Organization from the Vercel UI which is automatically connected to a Vercel Marketplace billing plan as the active payment method for the Atlas Organization. Billing occurs per one Atlas organization and includes a collective bill for all MongoDB Atlas clusters and services in the Organization. In Vercel and Atlas, you can see a confirmation of Vercel Marketplace billing for the Atlas Organization, as well as daily usage costs.
Security
Atlas ensures secure connections via SCRAM authentication with IP allowlists for Atlas clusters that you create through the Native Integration in Vercel.
Deletion or Uninstallation of the Native Integration
After uninstalling a Vercel integration, we recommend that the Atlas Organization owner ensures that access assignments and billing methods are up-to-date, and removes stale or unwanted access to prevent automated reminders from MongoDB regarding overdue billing payments. Atlas submits a final Vercel invoice for the Atlas to Vercel, and removes the Vercel Marketplace payment method from the Atlas Organization.
This invoice is not a final Atlas invoice, as there might still be additional charges incurred by the Organization after uninstallation for the most recent usage that might not have been billed for yet. You are responsible for adding a new payment method to the Organization to ensure any outstanding usage can be paid for.
You can't uninstall or unlink the Native Integration from the Atlas UI, although you can always delete your resources in Atlas. If you delete a Vercel-linked cluster, this is reflected in the Vercel UI.
Getting Started in Vercel UI for Next.js
The Vercel UI for the Native Integration includes instructions for getting started with Next.js and Atlas.
Deployment templates
The Vercel UI for the Native Integration includes deployment templates. These templates include example code and configuration files to help you get started with your Atlas projects in Vercel.
Add a Native Integration
To add the MongoDB Atlas Native Integration in Vercel:
Install the MongoDB Atlas Native Integration.
Go to Vercel Marketplace and use search or left-side category filter for Storage to locate MongoDB Atlas in the list of Native Integrations.
Click Install in the MongoDB Atlas page for the integration, or click Install in the upper right corner of the Vercel UI page for the integration.
Choose a cluster tier.
Choose a Free, Flex, or Dedicated Atlas cluster:
Free ($0, Storage: 512 MB, RAM: Shared, vCPU: Shared)
Flex ($0.011/hour, Storage: Up to 5 GB, RAM: Shared, vCPU: Shared)
Dedicated ($0.08/hour, Storage: 10 GB, RAM: 2 GB, vCPU: 2xCPUs)
Important
Free clusters are available on all installation plans. Flex and Dedicated clusters are available only on Paid installation plans.
Choose a cluster region.
A list of Vercel regions displays. These regions map to MongoDB Atlas regions in most cases. If you choose a Vercel region that doesn't have a corresponding Atlas region, Atlas chooses the closest region to the Vercel region that you selected.
Select an installation plan: Free or Paid.
Free plan $0
No credit card is required. You can only create Free MongoDB Atlas clusters with this plan.
Paid plan
Credit card is required. You can create Free, Flex, and Dedicated clusters with this plan. You'll only be billed for Flex and Dedicated clusters.
If you choose a Flex or Dedicated Atlas cluster, the Free plan is grayed out. If any member of your Vercel team uses this Native Integration with a Free plan and chooses to create a Flex or Dedicated cluster, the plan changes to a Paid plan. Even if you uninstall a MongoDB Atlas cluster that isn't free, the plan remains as a Paid plan. To change the plan to a Free plan, uninstall the Native Integration and then install it again choosing a Free cluster and a Free plan. To learn how to uninstall any Native Integration, see the Vercel documentation.
Now you can use the Native Integration of Atlas in Vercel to:
Connect to a Vercel project.
Pull your latest environment variables.
If you no longer need this MongoDB Atlas cluster, you can uninstall the Native Integration and by doing so delete a MongoDB Atlas database. For instructions, see the Vercel documentation.
You can also delete the database (the resource), without uninstalling the whole integration. This is useful in cases when you want to keep the integration around to create other resources in the future, or if you have other resources in the same integration.
If you delete a Vercel-linked Atlas cluster, any projects that you linked to this cluster in Vercel will no longer have access to this database cluster. Before proceeding with the uninstallation and deletion of the Atlas cluster, ensure that this Atlas cluster is no longer in use by any projects or application.
Contact Support
If you run into issues while using a Vercel Native Integration with MongoDB Atlas, contact Vercel Integration Support at MongoDB vercel-integation-support@mongodb.com.
Disconnect a Vercel Integration
Before you disconnect Vercel projects from Atlas clusters, to avoid downtime to any applications connected to the same Atlas clusters, verify that the cluster's users and network access rules don't share other projects and applications connected to this Atlas cluster.
Click to uninstall or remove the integration.
Follow the Vercel UI prompts to uninstall the integration. For detailed instructions, see the Vercel documentation.
Confirm that you want to disconnect this Vercel integration.
Disconnecting the integration may result in downtime for your Vercel applications and any other applications connecting to the Atlas clusters that you linked to Vercel.
After uninstalling a Vercel integration, we recommend that the Atlas
Organization Owner ensures that access assignments and billing methods
are up-to-date, and removes stale or unwanted access to prevent automated
reminders from MongoDB regarding overdue billing payments.
Atlas submits a final Vercel invoice for the Atlas Vercel integration to Vercel, and removes the Vercel Marketplace payment method from the Atlas Organization.
This invoice is not a final Atlas invoice, as there might still be additional charges incurred by the organization after uninstallation for the most recent usage that might not have been billed for yet. You are responsible for adding a new payment method to the organization to ensure any outstanding usage can be paid for.