Get started

One-click deploy

Pick a deploy backend, configure a profile, and ship one project with one deploy. The shortest path.

6 min readUpdated 3 days agoEdit on GitHub

This tutorial walks one project to one target. The full menu — all 10 deploy backends, per-project flags, multi-environment trees — lives in Multi-backend deploy (advanced).

We'll pick the deploy backend that matches your project's template default. Each template ships with a sensible default; you can override later.

Your project's templateDefault deploy backendPick this path
nextjs-app, astro-site, react-spa, starlight-docsStatic / serverlessPath A: Vercel
nestjs-api, go-apiContainer + KubernetesPath B: Kubernetes via kustomize

If you're using a backend that's not listed (S3, Cloudflare, EdgeOne, OSS, COS, MinIO, R2), the shape is the same: configure a profile, then one deploy. The one configure reference lists the credential fields for each.

Path A: Vercel (for frontends)

1. Get a Vercel token

Vercel dashboard → Settings → Tokens → Create. Note the token, your team slug, and the project id (or let One CLI create the project for you).

2. Configure the profile

one configure add deploy/vercel --profile prod \
  --token <VERCEL_TOKEN> \
  --team-slug <TEAM_SLUG> \
  --use

This writes to ~/.config/one/config.json + credentials.json (machine-local, mode 0600). It does not touch the repo.

3. Make sure the project's manifest entry has deploy.kind: vercel

cat one.manifest.json | jq '.projects[] | select(.name == "web") | .domains.deploy'

If --deploy-provider vercel was passed at one add time, it's already there. Otherwise add it:

{
  "name": "web",
  "domains": {
    "deploy": {
      "kind": "vercel",
      "config": { "projectId": "prj_xxx" }
    }
  }
}

(projectId is optional. One CLI creates the Vercel project on first deploy if it's missing.)

4. Deploy

one deploy -p web --env prod

Output points you at the Vercel deployment URL. Subsequent deploys reuse the same Vercel project.

Path B: kustomize (for services)

The kustomize path has two steps because Kubernetes runs containers: you build + push the image, then one deploy applies the manifests.

1. Configure a container registry

Pick a registry (Docker Hub, GHCR, ACR, Harbor, etc.) and create an access token there.

one configure add container/docker --profile prod \
  --registry ghcr.io \
  --username <USER> \
  --password <TOKEN> \
  --use

2. Configure kustomize

one configure add deploy/kustomize --profile prod \
  --kubeconfig-path ~/.kube/config \
  --context production \
  --namespace default \
  --use

kubeconfig-path and context together pick which cluster you're deploying to. namespace defaults to default.

3. Build and push the image

one container build -p api
one container push -p api

The build version is inferred from git / package.json (or pass --build-version). See Build & push images for details.

4. Deploy

one deploy -p api --env prod

one deploy reads services/api/k8s/overlays/<env>/ (the template scaffolds these) and runs kustomize build | kubectl apply -f - against the cluster from the default profile.

Verify:

kubectl --context production get pods

Override the profile at runtime

By default, one deploy uses the default profile. To force a specific one (e.g. for a staging cluster):

one deploy -p api --env staging --profile staging

Profile resolution order:

  1. --profile flag (this command only)
  2. Local project binding in ~/.config/one/config.json#workspaces
  3. Local workspace binding in ~/.config/one/config.json#workspaces
  4. The machine's default profile for the matching (domain, backend) pair

Common errors

CodeSymptomFix
BACKEND_NOT_ENABLEDThe project's domains.deploy is emptyAdd the deploy block to one.manifest.json for that project
PROFILE_NOT_FOUNDThe profile referenced doesn't exist on this machineone configure list deploy/<backend> to see what's available
REGISTRY_CREDENTIAL_MISSINGone container push ran without a default container/docker profileone configure add container/docker ... --use
IMAGE_TAG_NOT_FOUNDone deploy for kustomize couldn't find the pushed imageRun one container build && one container push first
VERCEL_DEPLOY_FAILEDVercel rejected the deployInspect Vercel UI logs; the message in context.vercel_error usually says why

Full table: error codes.

Next