Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.96 KB

File metadata and controls

62 lines (44 loc) · 1.96 KB
name zeabur-update-service
description Use when modifying service config without full redeploy. Use when updating env vars and restarting single service. Use when user says "change env var", "update config", "fix variable without redeploying", "upgrade service version", "update image tag", or "change service tag".

Zeabur Update Service Without Redeploy

Always use npx zeabur@latest to invoke Zeabur CLI. Never use zeabur directly or any other installation method. If npx is not available, install Node.js first.

Workflow

# 1. Get service ID
npx zeabur@latest service list --project-id <project-id> -i=false

# 2. Check current variables
npx zeabur@latest variable list --id <service-id> -i=false

# 3. Add/update variables
npx zeabur@latest variable create --id <service-id> \
  --key "KEY1=value1" \
  --key "KEY2=value2" \
  -i=false -y

# 4. Restart service
npx zeabur@latest service restart --id <service-id> -y -i=false

Caveats

Issue Solution
${VAR} references Set in Dashboard, not CLI (shell expands to empty)
variable update clears vars Use variable create instead

Update Image Tag (Upgrade Service Version)

For prebuilt/marketplace services, update the image tag to upgrade:

# 1. Get service ID
npx zeabur@latest service list --project-id <project-id> -i=false

# 2. Update tag (triggers redeploy automatically)
npx zeabur@latest service update tag --id <service-id> -t <new-tag> -y -i=false

Note: This triggers a new deployment with the updated image. The service will restart.

When to Use

  • Fix environment variable typos
  • Add missing config
  • Change ports, URLs, credentials
  • Upgrade a prebuilt service to a newer version
  • No need to redeploy entire template

See Also

  • zeabur-service-list — get service IDs needed for updates
  • zeabur-variables — detailed guide on variable management
  • zeabur-restart — restart service after config changes