CLI

vercel deploy
vercel
vercel deploy
The vercel deploy command deploys Vercel projects, executable from the project's root directory or by specifying a path. You can omit 'deploy' in vercel deploy, as vercel is the only command that operates without a subcommand. This document will use 'vercel' to refer to vercel deploy.
Vercel automatically detects eligible static deployments and makes them ready without a build step. This optimization supports deployments containing only HTML (.html, .htm) or Markdown (.md) files, with up to 10 files and a total size of up to 5 MB.
You can reach our customer support team by emailing info@yourcompany.example.com, calling +1 555-555-5556, or using the live chat on our website. Our dedicated team is available 24/7 to assist with any inquiries or issues.
We’re committed to providing prompt and effective solutions to ensure your satisfaction.
We offer a 30-day return policy for all products. Items must be in their original condition, unused, and include the receipt or proof of purchase. Refunds are processed within 5-7 business days of receiving the returned item.
vercel deploy--prebuilt
Using the vercel command to deploy a prebuilt Vercel project, typically with vercel build. See vercel build and Build Output API for more details.
Standard output usage
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.
In the following example, you create a bash script that you include in your CI/CD workflow. The goal is to have all preview deployments be aliased to a custom domain so that developers can bookmark the preview deployment URL. Note that you may need to define the scope when using vercel alias
# save stdout and stderr to files
code=$?
if [ $code -eq0 ]; then
# check the exit code
# Now you can use the deployment url from stdout for the next step of your workflow
errorMessage=`cat error.txt`
vercel deploy>deployment-url.txt2>error.txt
else
fi
# Handle the error
echo"There was an error: $errorMessage"
deploymentUrl=`cat deployment-url.txt`
vercel alias $deploymentUrl my-custom-domain.com
The script deploys your project and assigns the deployment URL saved in stdout to the custom domain using vercel alias.
Standard error usage
If you need to check for errors when the command is executed such as in a CI/CD workflow, use stderr. If the exit code is anything other than 0, an error has occurred. The following example demonstrates a script that checks if the exit code is not equal to 0:
# save stdout and stderr to files
code=$?
if [ $code -eq0 ]; then
# check the exit code
echo $deploymentUrl
errorMessage=`cat error.txt`
# Now you can use the deployment url from stdout for the next step of your workflow
else
fi
# Handle the error
echo"There was an error: $errorMessage"
deploymentUrl=`cat deployment-url.txt`
vercel deploy>deployment-url.txt2>error.txt
Unique options
These are options that only apply to the vercel command.
Prebuilt
When using the --prebuilt flag, System Environment Variables will be missing at build time, so frameworks that rely on them at build time may not function correctly.
When not to use --prebuilt
For Next.js projects, Skew Protection is supported with --prebuilt by configuring a custom deployment ID. See Custom Deployment ID for setup instructions. Prebuilt deployments cannot use dpl_ as a user-configured deployment ID prefix.
The --prebuilt option can be used to upload and deploy the results of a previous vc build execution located in the .vercel/output directory. See vercel build and Build Output API for more details.
If you need System Environment Variables at build time, do not use the --prebuilt flag or use Git-based deployments.
vercel --prebuilt
# Deploy the pre-built project, archiving it as a .tgz file
You should also consider using the archive option to minimize the number of files uploaded and avoid hitting upload limits:
vercel build
# Build the project locally
vercel deploy--prebuilt--archive=tgz
The --yes option can be used to skip questions you are asked when setting up a new Vercel project. The questions will be answered with the provided defaults, inferred from vercel.json and the folder name.
You can reach our customer support team by emailing info@yourcompany.example.com, calling +1 555-555-5556, or using the live chat on our website. Our dedicated team is available 24/7 to assist with any inquiries or issues.
We’re committed to providing prompt and effective solutions to ensure your satisfaction.
We offer a 30-day return policy for all products. Items must be in their original condition, unused, and include the receipt or proof of purchase. Refunds are processed within 5-7 business days of receiving the returned item.
vercel --yes
The --env option, shorthand -e, can be used to provide environment variables at runtime.
Using the vercel command with the--yes option.
vercel --envKEY1=value1--envKEY2=value2
Using the vercel command with the--env option.
The --name option, shorthand -n, can be used to provide a Vercel project name for a deployment.
vercel --namefoo
vercel --prod
Vercel project linking, which allows you to link
a Vercel project to your local codebase when you run
vercel.
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 Vercel project dashboard.
Skip Domain
first deployment of a
new project is always a production deployment, even when you omit --prod.
Use --prod for later production deployments after that first one exists.
vercel --prod--skip-domain
Auto-assign Custom Production
Domains
project setting.
Must be used with --prod. The --skip-domain option will disable the automatic promotion (aliasing) of the relevant domains to a new production deployment. You can use vercel promote to complete the domain-assignment process later.
Using the vercel command with the--prod option.
Using the vercel command with the--skip-domain option.
Public
vercel --public
vercel --regionssfo1
The --regions option can be used to specify which regions the deployments Vercel functions should run in.
Using the vercel command with the--public option.
Using the vercel command with the--regions option.
The --no-wait option does not wait for a deployment to finish before exiting from the deploy command.
vercel --no-wait
The --force option, shorthand -f, is used to force a new deployment without the build cache.
vercel --force
The --with-cache option is used to retain the build cache when using --force.
Archive
vercel --force--with-cache
In some cases, --archive makes deployments slower. This happens because the caching of source files to optimize file uploads in future deployments is negated when source files are archived.
vercel deploy--archive=tgz
The --archive option compresses the deployment code into one or more files before uploading it. This option should be used when deployments include thousands of files to avoid rate limits such as the files limit.
The --logs option, shorthand -l, also prints the build logs.
vercel deploy--logs
Using the vercel deploy command with the --logs option, to view logs from the build process.
The --meta option, shorthand -m, is used to add metadata to the deployment.
vercel deploy--metaKEY1=value1
Use the keys for your project's Git provider:
Provider
GitHub
Deployment marker
githubDeployment=1
Branch key
githubCommitRef
GitLab
Bitbucket
gitlabDeployment=1
bitbucketDeployment=1
gitlabCommitRef
bitbucketCommitRef
Use the branch name, such as feature-checkout, rather than a pull request merge ref. These values describe the deployment; they do not check out the branch or connect a Git repository. Other provider metadata keys are not interchangeable by changing their prefix.
Confirm that the environment variable is assigned to Preview and the same branch, and that the branch domain is configured on this project. A production deployment uses Production settings even if you attach branch metadata. A named custom environment requires its own target, such as --target=staging.
For a local or prebuilt deployment, fetch the branch's variables before building:
vercel pull--environment=preview--git-branch=feature-checkout
vercel build
vercel deploy--prebuilt--metagithubDeployment=1--metagithubCommitRef=feature-checkout
Adding metadata at upload time cannot change values already embedded in build output. For a custom environment, use matching commands: vercel pull --environment=staging, vercel build --target=staging, and vercel deploy --prebuilt --target=staging. After deploying, verify the environment and assigned domains in the dashboard.
vercel deploy--target=staging
Use the --target option to define the environment you want to deploy to. This could be production, preview, or a custom environment.
vercel deploy--guidance
Using the vercel deploy command with the--guidance option to receive command suggestions.
The following global options can be passed when using the vercel deploy command:
The --guidance option displays suggested next steps and commands after deployment completes. This can help you discover relevant CLI commands for common post-deployment tasks.
Last updated September 17, 2026
For more information on global options and their usage, refer to the options section.
Previous
Was this helpful?
Cross-link map: vercel deploy (/docs/cli/deploy)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesvercel list — Learn how to list out all recent deployments for the current Vercel Project using the vercel list CLI command.vercel redeploy — Learn how to redeploy your project using the vercel redeploy CLI command.Vercel CLI Global Options — Global options are commonly available to use with multiple Vercel CLI commands. Learn about Vercel CLI's global optionsDeploying Projects from Vercel CLI — Learn how to deploy your Vercel Projects from Vercel CLI using the vercel or vercel deploy commands.vercel curl — Learn how to make HTTP requests to your Vercel deployments with automatic deployment protection bypass using the vercelThis page links to (16)Build Output API — The Build Output API is a file-system-based specification for a directory structure that can produce a Vercel deploymentConfiguring a Build — Vercel automatically configures the build settings for many front-end frameworks, but you can also customize the build avercel build — Learn how to build a Vercel Project locally or in your own CI environment using the vercel build CLI command.Vercel CLI Global Options — Global options are commonly available to use with multiple Vercel CLI commands. Learn about Vercel CLI's global optionsvercel list — Learn how to list out all recent deployments for the current Vercel Project using the vercel list CLI command.Linking Projects with Vercel CLI — Learn how to link existing Vercel Projects with Vercel CLI.vercel promote — Learn how to promote an existing deployment using the vercel promote CLI command.Environments — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produTroubleshooting Build Errors — Learn how to resolve common scenarios you may encounter during the Build step, including build errors that cancel a deplAssigning a domain to a Git branch — Learn how to assign a domain to a different Git branch with this guide.Environment variables — Learn more about environment variables on Vercel.System environment variables — System environment variables are automatically populated by Vercel, such as the URL of the deployment or the name of theVercel Functions — Build API routes, webhooks, and agent request handlers with Vercel Functions, then test and debug them with Vercel CLI.Limits — Look up account limits, usage summaries, rate limits, and resource constraints for every Vercel plan.Global network and regions — View the list of regions supported by Vercel's CDN and learn about our global infrastructure.Skew Protection — Learn how Vercel's Skew Protection ensures that the client and server stay in sync for any particular deployment.Pages that link here (31)By site: vercel-changelog (4) · vercel-kb (2) · vercel-web (1) · vercel-docs (24)From vercel-changelogCLI archive deployments are now up to 30% faster with split-tgz archive optionDry-run deployments with Vercel CLIImprovements to command line logsSplit-tgz is now the default CLI archive deployment behaviorFrom vercel-kbDeploy to Vercel with Self-Hosted Git Pipelines \(GitLab & Bitbucket\) — Learn how to use GitLab Pipelines to deploy to Vercel including support for self-managed GitLab.How to alias a preview deployment using the CLI — Learn how to automatically alias a Vercel preview deployment.From vercel-webDeploying safely on Vercel without merge queuesFrom vercel-docsManaging Builds — Vercel allows you to increase the speed of your builds when needed in specific situations and workflows.Vercel CLI Overview — Learn how to use the Vercel command-line interface \(CLI\) to manage and configure your Vercel Projects from the commandvercel alias — Learn how to apply custom domain aliases to your Vercel deployments using the vercel alias CLI command.vercel curl — Learn how to make HTTP requests to your Vercel deployments with automatic deployment protection bypass using the vercelDeploying Projects from Vercel CLI — Learn how to deploy your Vercel Projects from Vercel CLI using the vercel or vercel deploy commands.vercel httpstat — Learn how to visualize HTTP request timing statistics for your Vercel deployments using the vercel httpstat CLI command.Linking Projects with Vercel CLI — Learn how to link existing Vercel Projects with Vercel CLI.vercel target — Work with custom environments using the --target flag in Vercel CLI.Accessing Deployments through Generated URLs — When you create a new deployment, Vercel will automatically generate a unique URL which you can use to access that partiTroubleshooting Build Errors — Learn how to resolve common scenarios you may encounter during the Build step, including build errors that cancel a deplExpress on Vercel — Deploy Express applications to Vercel with zero configuration. Learn about middleware and Vercel Functions.Deploy a FastAPI app on Vercel — Deploy a FastAPI app on Vercel. Learn how the Python runtime, ASGI, static assets, and Vercel Functions work together.Fastify on Vercel — Deploy Fastify applications to Vercel with zero configuration.Deploy a Flask app on Vercel — Deploy a Flask app on Vercel. Learn how the Python runtime, WSGI, static assets, and Vercel Functions work together.Koa on Vercel — Deploy Koa applications to Vercel with zero configuration.NestJS on Vercel — Deploy NestJS applications to Vercel with zero configuration.Create React App on Vercel — Deploy Create React App projects to Vercel and add Preview Deployments, Web Analytics, Speed Insights, and ObservabilityDeploy a Django app on Vercel — Deploy a Django app on Vercel. Learn how the Python runtime, WSGI, ASGI, static assets, and Vercel Functions work togethConfiguring regions for Vercel Functions — Learn how to configure regions for Vercel Functions.Container Images — Deploy OCI container images with a Dockerfile or Containerfile on Vercel Functions.Security settings — Configure security settings for your Vercel project, including Logs and Source Protection, Vercel Support Code VisibilitDeploying a project from the CLI — Set up and deploy a Vercel project using the CLI, from linking to production.Performing a rolling release deployment — Gradually roll out a production deployment using traffic stages, monitoring, and automated abort.Skew Protection — Learn how Vercel's Skew Protection ensures that the client and server stay in sync for any particular deployment.