Skip to content

vercel deploy

Learn how to deploy your Vercel projects.

The vercel command is used to deploy projects and can be used from either the root of the project directory or by providing a path to it.

vercel

Using the vercel command from the root of a project directory.

vercel --cwd [path-to-project]

Using the vercel command and supplying a path to the root directory of the project.

vercel deploy --prebuilt

Using the vercel command to deploy a prebuilt project, typically with vercel build. See vercel build and Build Output API for more details.

When deploying, stdout is always the Deployment URL.

vercel > deployment-url.txt

Using the vercel command to deploy and write stdout to a text file. When deploying, stdout is always the Deployment URL.

These are options that only apply to the vercel command, therefore, more information is provided.

The --build-env option, shorthand -b, can be used to provide environment variables to the build step.

vercel --build-env KEY1=value1 --build-env KEY2=value2

Using the vercel command with the --build-env option.

The --yes option can be used to skip questions you are asked when setting up a new project. The questions will be answered with the provided defaults, inferred from vercel.json and the folder name.

vercel --yes

Using the vercel command with the --yes option.

The --env option, shorthand -e, can be used to provide Environment Variables at Runtime.

vercel --env KEY1=value1 --env KEY2=value2

Using the vercel command with the --env option.

Note: The --name option has been deprecated in favor of Project Linking, which allows you to link a Vercel Project to your local codebase when you runvercel.

The --name option, shorthand -n, can be used to provide a project name for a deployment.

vercel --name foo

Using the vercel command with the --name option.

The --prod option can be used to create a deployment for a production domain specified in the project dashboard.

vercel --prod

Using the vercel command with the --prod option.

The --public option can be used to ensures the source code is publicly available at the /_src path.

vercel --public

Using the vercel command with the --public option.

The --regions option can be used to specify which regions the deployments Serverless Functions should run in.

vercel --regions sfo1

Using the vercel command with the --regions option.