| 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". |
Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
# 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| Issue | Solution |
|---|---|
${VAR} references |
Set in Dashboard, not CLI (shell expands to empty) |
variable update clears vars |
Use variable create instead |
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=falseNote: This triggers a new deployment with the updated image. The service will restart.
- 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
zeabur-service-list— get service IDs needed for updateszeabur-variables— detailed guide on variable managementzeabur-restart— restart service after config changes