nupaas deploy — NuPaaS Docs
CLI reference

nupaas deploy

platform deploy creates, inspects, waits on and rolls back deployments. A deployment is one attempt to build and run a project at a specific commit or container image.

Command name

platform deploy has four subcommands: list, create, wait and rollback. Running platform deploy with no subcommand prints their descriptions.

deploy list

Lists deployments for your organization, most recent first. Omit --project to see every project's deployments in one table.

List deployments
platform deploy list
platform deploy list --project prj_01H8XK2M4Q
platform deploy list --project prj_01H8XK2M4Q --json
ParameterTypeDescription
--orgstringOrganization ID. Defaults to the organization in your config.
--projectstringRestrict the list to one project. Omit to list all.
--jsonbooleanEmit raw JSON instead of a table. Default: false.

The table shows a shortened deployment ID, branch, status, commit SHA and age. Those shortened IDs are accepted anywhere this page takes a deployment ID as a positional argument.

deploy create

Starts a new deployment. There are two shapes: build from a Git branch, or run an existing container image. --project is the only always-required flag.

Create a deployment
# Build and deploy a branch
platform deploy create --project prj_01H8XK2M4Q --branch main

# Deploy a prebuilt image and block until it settles
platform deploy create --project prj_01H8XK2M4Q --image nginx:alpine --port 8080 --wait
ParameterTypeDescription
--projectstringRequired. The project to deploy.
--orgstringOrganization ID. Defaults to the organization in your config.
--branchstringGit branch to build from, for a source build.
--imagestringContainer image reference to run instead of building, e.g. nginx:alpine.
--portintegerContainer port to route traffic to. Default: 8080.
--health-check-pathstringHTTP path polled for readiness. Default: /health.
--waitbooleanPoll until the deployment reaches a terminal status. Default: false.

Without --wait the command prints the new deployment ID and status and returns immediately. With --wait it polls every three seconds, printing each status transition, and exits non-zero if the deployment ends in anything other than active. That makes it usable directly as a CI gate.

deploy wait

Blocks on a deployment that is already running. Use it when you triggered the deployment elsewhere — from a Git push, from the control panel, or from a deploy create without --wait.

Wait for a deployment
platform deploy wait dep_01H8XK2M4Q7Z6YB3V9NRWTC5AF
platform deploy wait dep_01H8

The deployment ID is a positional argument, not a flag. A short prefix copied out of deploy list is resolved automatically. The command prints each status change as it happens and stops at the first terminal status — active, failed, crashed, rolled_back or superseded. It gives up after roughly ten minutes and exits non-zero rather than hanging forever.

deploy rollback

Rolls back from a deployment to the previous known-good one for the same project. The deployment you name is the one you are rolling back from.

Roll back
platform deploy rollback --deployment dep_01H8XK2M4Q7Z6YB3V9NRWTC5AF
ParameterTypeDescription
--deploymentstringRequired. The deployment ID to roll back from.

Note the asymmetry with deploy wait: rollback takes the ID as a --deployment flag and expects a full ID, while wait and logs take a positional argument and accept short prefixes.

A rollback is itself a new deployment. It returns a new deployment ID, which you can pass to deploy wait to block until the rollback finishes.

Build logs

platform logs is a top-level command rather than a subcommand of deploy, but it operates on a deployment.

Read build logs
platform logs dep_01H8XK2M4Q7Z6YB3V9NRWTC5AF
platform logs dep_01H8 --tail 100
platform logs dep_01H8 --follow
ParameterTypeDescription
deploymentIdargumentRequired positional argument. A full ID or a short prefix from deploy list.
--tailintegerPrint only the last N lines.
--follow, -fbooleanKeep polling for new lines until the deployment reaches a terminal status. Default: false.

Environment variables

Environment variables belong to a project and an environment, not to an individual deployment. Set them with platform env before deploying.

Manage project environment variables
platform env list --project prj_01H8XK2M4Q
platform env set --project prj_01H8XK2M4Q --env production DATABASE_URL=postgres://...
platform env unset --project prj_01H8XK2M4Q --env production DATABASE_URL
ParameterTypeDescription
--projectstringThe project whose variables you are reading or writing.
--envstringTarget environment on set and unset. Defaults to production.
--orgstringOrganization ID. Defaults to the organization in your config.
--cibooleanOperate on organization-level CI secrets instead of project variables. No --project needed.
--jsonbooleanOn list, emit raw JSON instead of a table.

env set takes the assignment as a positional KEY=VALUE argument and env unset takes a bare KEY. The --ci flag switches to a different store entirely: organization-level secrets synced to your CI provider, which are not project-scoped and therefore need no --project.