zeabur-domain-url
Zeabur Domain URL Configuration
Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
Symptom
- Redirects go to wrong URL (missing domain suffix, or has trailing slash)
- CORS errors due to URL mismatch
${ZEABUR_WEB_URL}has trailing slash causing path issues
System Variables
| Variable | Example | Note |
|---|---|---|
ZEABUR_WEB_URL |
https://app.zeabur.app/ |
Has trailing slash |
ZEABUR_WEB_DOMAIN |
app.zeabur.app |
Domain only, no protocol |
Solution
Expose URL from entry service to others:
- name: entry-service
domainKey: PUBLIC_DOMAIN
spec:
env:
APP_URL:
default: https://${ZEABUR_WEB_DOMAIN}
expose: true
- name: backend
spec:
env:
WEB_URL:
default: ${APP_URL}
Use https://${ZEABUR_WEB_DOMAIN} not ${ZEABUR_WEB_URL} to avoid trailing slash.
CLI Domain Management
List domains
npx zeabur@latest domain list --id <service-id> -i=false
Create a generated domain (*.zeabur.app)
Use -g to create a Zeabur-managed subdomain. With -g, --domain takes only the prefix (not the full domain):
npx zeabur@latest domain create --id <service-id> -g --domain myapp -y -i=false
# Suffix is auto-appended by backend based on region:
# Default: myapp.zeabur.app
# Aliyun (China): myapp.preview.aliyun-zeabur.cn
# Tencent (China): myapp.preview.tencent-zeabur.cn
# Huawei (China): myapp.preview.huawei-zeabur.cn
# China suffixes require completed identity verification on Zeabur.
Validation rules for generated domain prefix:
- At least 3 characters
- No dots allowed — only alphanumeric and hyphens
- Error
DOMAIN_NAME_TOO_SHORTif less than 3 chars - Error
UNSUPPORTED_DOMAIN_NAMEif prefix contains dots
Create a custom domain
Without -g, --domain takes a full domain name:
npx zeabur@latest domain create --id <service-id> --domain example.com -y -i=false
After creating a custom domain, use the zeabur-domain-dns skill to configure the required DNS records. For dedicated servers, find the IP with:
npx zeabur@latest server list -i=false
# Note the IP address of the server running your service
Then at your DNS provider:
Type: A
Name: <your subdomain or @>
Value: <server IP from above>
Do not guess DNS values. Always retrieve the actual server IP from
server listoutput before configuring DNS.
Delete domain
npx zeabur@latest domain delete --id <service-id> --domain <domain> -y -i=false
Caution
--domainis always required in non-interactive mode. Without it the CLI returnsINVALID_DOMAIN_NAME.- With
-g, provide only the prefix (e.g.,myapp), not the fullmyapp.zeabur.app. - Without
-g, provide the complete domain (e.g.,example.com).
More from zeabur/zeabur-claude-plugin
zeabur-deployment-logs
Use when viewing service runtime or build logs. Use when user says "show logs", "why did deploy fail", "check build output", or "debug runtime error".
54zeabur-template
Use when creating, editing, validating, or troubleshooting a Zeabur template YAML. Use when converting docker-compose to Zeabur template. Do NOT use for deploying templates (use zeabur-template-deploy instead).
53zeabur-restart
Use when restarting a Zeabur service. Use when user says "restart", "reboot service", or "service is stuck/frozen".
53zeabur-variables
Use for ALL Zeabur environment variable operations — create, list, update, delete, or troubleshoot. Use when user says "set env var", "add variable", "create variable", "update variable", "delete variable", "change env var", or "why is my variable empty". Also use when variables are empty or SERVICE_NOT_FOUND errors.
51zeabur-update-service
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".
49zeabur-startup-order
Use when service fails with Connection refused to database or redis. Use when API crashes because DB not ready.
47