Docs

Deploying a Clerk app to Vercel

Warning

This guide assumes that you have already installed Clerk in your application locally and are ready to deploy. If you haven't installed Clerk yet, see the setup guide.

If you haven't set up your application in Vercel yet, set up a new Vercel project.

If you already have a Vercel project for your application and need to integrate Clerk, add Clerk API keys to an existing Vercel project.

Set up a new Vercel project

  1. To set up a new Vercel project, start by going to your Vercel Dashboard. Here, you'll see a list of your projects or, if you don't have any projects yet, a prompt to create a new project.
  2. Create a new project by pressing the Add New button in the top right corner of the screen or by pressing this link. You'll be redirected to a page where you can import a Git repository.
  3. Find the Git repository you want to use and press Import. You'll be redirected to the Configure Project page.
  4. Fill out the necessary information. And most importantly, ensure to add your Clerk API keys to the Environment Variables. You can find your Clerk API keys by navigating to the Clerk Dashboard and in the navigation sidebar, selecting API Keys.

Warning

If you would like to deploy to production, you will need to add your production API keys to your Vercel project. Refer to the Deploy to production guide for more information.

Add Clerk API keys to existing Vercel project

  1. To add your Clerk API keys to an existing Vercel project, start by selecting your project from your Vercel dashboard.
  2. Select Settings in the navigation bar at the top.
  3. In the sidebar, select Environment Variables and add your Clerk API keys. You can find your Clerk API keys by navigating to the Clerk Dashboard and in the navigation sidebar, selecting API Keys.
  4. When adding Environment Variables, you can select which keys associate with which Vercel deployment environments. Using this, you can have your production Vercel environment use your production Clerk API keys while having your preview and development Vercel deployments use your development Clerk API keys.

Warning

If you would like to deploy to production, you will need to add your production API keys to your Vercel project. Refer to the Deploy to production guide for more information.

Vercel preview environment

To configure Clerk within your Vercel preview environment, see the guide for configuring a preview environment.

Deploy to production

If you would like to deploy your Vercel project to production, you will need to add your production API keys to your Vercel project. You will also need a domain that you own, as you cannot use a *.vercel.app domain for production. Refer to the Deploy to production guide for more information.

Feedback

What did you think of this content?

Last updated on