Docs Menu

Integrate with Vercel

On this page

  • Considerations
  • Add a Vercel Integration
  • Manage a Vercel Integration in the Atlas UI

You can connect your Atlas clusters to applications that you deploy using Vercel.

Use this page to complete the following tasks:

  • Connect Vercel users and teams to organizations in Atlas.
  • Create links from Vercel projects for these users and teams to Atlas clusters.

Vercel integrates with the Next.js framework.

To connect the serverless functions that you deployed in Vercel to Atlas clusters, you can also use the MongoDB Node.js driver or the Mongoose ODM library.

The integration with Vercel requires that you:

Note

You can add a Vercel integration as a personal account user and then add another Vercel integration as a team user.

You can't change the scope of an existing integration from a personal account to a team level account in Vercel.

If you use a personal Vercel account for your MongoDB integration, and want to switch to an integration for a team to the same Atlas organization, you must disconnect an existing integration in Atlas, and add a new integration with a team scope.

You can link one Atlas cluster to more than one project in Vercel.

To configure the integration, you must have one or more projects in your personal or team Vercel account.

The list of Vercel projects that you can choose for the integration depends on the user or team scope.

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.

To secure your Vercel integrations with Atlas clusters, Atlas creates a MONGODB_URI environment variable. This variable has the following characteristics. It is:

  • Set for all Vercel projects that you link this cluster to.
  • The connection string for the Atlas cluster.

This procedure allows you to create a new account in Atlas with its organization, project, and user role, and then create a new cluster, or use an existing Atlas account, organization, project, and Atlas cluster for integration with Vercel.

To integrate Vercel applications with Atlas clusters, you begin in the Vercel UI.

1

Go to MongoDB Atlas Integration in Vercel and click Add integration.

2
  1. Choose one of the Vercel scopes from the drop-down menu:

    • Personal Account
    • Team

    After you set the scope for your integration, you can't change it. To switch to a scope that differs from your chosen scope, disconnect one integration and create another one using this procedure.

  2. Click Continue.
3

You can choose specific projects or all projects. You can later edit the integration to change the projects. The project list depends on the user or team scope that you specified in the previous step.

Select one of the following options:

  • All Projects
  • Specific Projects
4
  1. Choose one of the following options:

    • If you're using your Google Accounts, follow the steps for signing into it, or create a new Google account.
    • If you're using your email, it's already filled in and grayed out.
    • If your company uses federated authentication, use your company's email address. Proceed with the verification steps required for your federated user access.
    • If you already have an Atlas account, click Log in now. See Log in to Your Atlas Account.
  2. Enter your first and last names, and choose a password. A password must contain at least 8 characters, contain unique characters, numbers, or symbols, and not contain your email address. See Register a new Atlas Account.
  3. Click the checkbox I accept the Privacy Policy and the Terms of Service.

    Review the Terms of Service and the Privacy Policy.

5
  1. Select an Atlas organization from the drop-down, or create a new Atlas organization.
  2. Click Continue.
  3. Confirm access to your Atlas organization.

    Atlas creates an organization for you. Click I Acknowledge to confirm that you grant Vercel access to your Atlas organization.

    To remove access from this Vercel integration to your MongoDB Atlas organization, you must disconnect this integration.

  4. Select an Atlas project to integrate with Vercel from the drop-down, or create a new project.
6
7

Atlas sends you a confirmation email with the details of your integration. The integration window closes and you return to the Vercel UI where you can update the Vercel projects in this integration.

To manage the integration with Vercel, use the Integrations page for your organization in Atlas.

1

To link additional clusters in your organization to projects in Vercel, use the Link clusters button on the Atlas Integrations page for Vercel.

Note

Use this procedure for an already configured integration. To configure an initial integration, see Add a Vercel Integration.

1

Select your organization from the Organizations menu in the navigation bar.

2
  1. Click Integrations in the sidebar.
  2. Select Vercel.
3

Click Link Clusters.

The Add Another Cluster Link with Vercel window opens. that shows your Atlas organization.

  1. Select an Atlas project.
  2. In the left drop-down list, select a cluster not linked to Vercel. If your project doesn't have another Atlas cluster, you can create one.
  3. In the right drop-down list, select one or more Vercel projects.
  4. Click Save.

You receive a confirmation email from Atlas with the details of your integration.

A new linked Atlas cluster appears in the linked clusters list.

To link a cluster from another Atlas project in your organization to Vercel, repeat this procedure for that project.

You can add or remove Vercel projects that you linked to an Atlas cluster.

1

Click Integrations in the sidebar.

  1. Select Vercel.
2

Atlas displays existing linked Vercel projects.

To edit existing links, in the right-side list, choose a project from the drop-down. You can:

  • Click next to a Vercel project in the list to add it to this cluster's integration.
  • Click to remove some Vercel projects from this integration.
3

Atlas asks you to confirm that you want to unlink the cluster from the projects. To confirm, click Unlink. Atlas removes the environment variables for Vercel projects that it created when you linked the projects to an Atlas cluster.

If you unlink all projects, Atlas behaves as follows. It:

  • Doesn't remove your data, database users, or IP access lists that you created for this integration.
  • Doesn't delete the cluster, or the integration, even though the Atlas UI might show that you have no linked clusters in your integration. To disable the integration, you must disconnect Vercel.
4

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.

1
  1. Click Integrations in the sidebar.
  2. Select Vercel.
2

In this step, click to request Atlas to do these optional tasks for you:

  • Delete the database users created as part of this integration
  • Delete the network access rules created as part of this integration
3

Atlas asks you to confirm that you want to disconnect your Atlas organization from Vercel.

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.

To confirm, enter the words Disconnect Vercel in capital letters and then click Disconnect Vercel.

Atlas removes the integration by removing the environment variables for Vercel projects that it created when you linked the projects to an Atlas cluster.

Vercel also removes the integration and it no longer displays in the Vercel UI.

←  Partner IntegrationsManage Billing →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.