ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop on the web portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
    Develop locally with the CLI
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
Concepts
Development
Policies
Handlers
API Keys
Rate Limiting
MCP Server
MCP Gateway
AI Gateway
Developer Portal
Monetization
Deploying & Source Control
Analytics
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
    OverviewCreate Zuplo APIAuthenticationGlobal OptionsNetwork Connectivitybucket listca-certificate createca-certificate deleteca-certificate describeca-certificate listca-certificate updatecustom-domain createcustom-domain deletecustom-domain listcustom-domain updatedeletedeploydevdocseditorinfoinitlinklistlogoutmtls-certificate createmtls-certificate deletemtls-certificate describemtls-certificate disablemtls-certificate listmtls-certificate updateopenapi convertopenapi mergeopenapi overlayproject createproject infoproject listsource migratesource upgradetesttunnel createtunnel deletetunnel describetunnel listtunnel rotate-tokentunnel services describetunnel services updatevariable createvariable updatewhoami
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
Zuplo CLI

Zuplo CLI: Deploy

Deploys current Git branch of the current directory
Code
zuplo deploy [options]

Common use cases

The following examples assume that you are passing in your --api-key either as an argument or through the ZUPLO_API_KEY environment variable.

Deploying your gateway

TerminalCode
# The following will use the current Git branch as the name of the environment git checkout -b my-new-branch zuplo deploy --project my-project
TerminalCode
# If you don't wish to use the current Git branch as the name of the # environment, you can specify one using --environment zuplo deploy --project my-project --environment my-env-name

Deploying from CI/CD

Without --environment, the CLI names the environment after the current git branch. CI systems usually check out a detached HEAD, in which case the CLI resolves the branch from the remote branches that contain the checked-out commit. Two cases break this inference:

  • On GitHub Actions pull_request events, the checkout is the pull request merge ref (refs/pull/<number>/merge) — a commit that doesn't exist on any branch — so the environment is named after that ref instead of your branch.
  • When the checked-out commit exists on more than one branch, the first match wins, which may not be the branch that triggered the build.

Always pass --environment explicitly in CI so that every trigger deploys the same, predictably named environment:

TerminalCode
# GitHub Actions: github.head_ref is the source branch on pull_request # events; github.ref_name is the branch on push events zuplo deploy --project my-project --environment "$BRANCH_NAME"

Deploying the same environment name always updates the same environment and keeps its URL stable across deploys. This matters whenever an external system must match the URL exactly — an OIDC token audience, a webhook registration, or an allowlist. Capture the URL from the deploy output (Deployed to https://...) rather than constructing it from the branch name: the URL hostname uses a normalized, truncated form of the environment name plus a unique identifier. See Branch-Based Deployments for the naming rules.

Polling timeout

By default, the deploy command polls the status of the deployment every second for up to 250 attempts (a little over four minutes). For most deployments this is enough time for the build and deploy process to complete. However, if you have a large project, this may not be enough time. You can increase the timeout by setting the following environment variables.

  • POLL_INTERVAL - The interval in milliseconds between each poll. Default is 1000 (1 second).
  • MAX_POLL_RETRIES - The maximum number of polls before the command times out. Default is 250.

The following example polls every 5 seconds for up to 300 attempts (25 minutes).

TerminalCode
POLL_INTERVAL=5000 MAX_POLL_RETRIES=300 zuplo deploy

Note, that even if the CLI times out, the deployment will continue. You can check the status of the deployment in your project in the Zuplo Portal.

Examples

Deploy the current Git branch using the branch name as the environment name

Code
zuplo deploy

Override the environment name instead of using the Git branch name

Code
zuplo deploy --environment my-env

Explicitly specify the account, project, and environment

Code
zuplo deploy --account my-account --project my-project --environment my-env

Options

--account

The account name

Type: string

--environment

The value to use for environment name, instead of the current branch name

Type: string

--self-hosted-endpoint

The endpoint of your self-hosted service to deploy to

Type: string

--fetch-environments

Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.

Type: booleanDefault: false

Global options

The following global options are available for all commands:

  • --help
  • --api-key

Additional resources

  • Custom CI/CD
Edit this page
Last modified on June 11, 2026
deletedev
On this page
  • Common use cases
    • Deploying your gateway
    • Deploying from CI/CD
  • Polling timeout
  • Global options
  • Additional resources