Cloudflare Integration with Zerops
Use Full (strict) SSL mode in Cloudflare for production (plain "Full" is acceptable for testing) — never "Flexible", which causes redirect loops. Shared IPv4 with Cloudflare proxy is not recommended.
DNS Configuration
CNAME (non-apex or with CNAME flattening)
DNS-Only (gray cloud)
| IP Type | Records Required |
|---|---|
| Shared IPv4 | A + AAAA (both required for SNI) |
| Dedicated IPv4 | A (AAAA optional) |
| IPv6 only | AAAA |
Wildcard Domains
Preparing a Service for Cloudflare
Any runtime service (nodejs, go, python, etc.) can be put behind Cloudflare. Steps:
- Create the service with
enableSubdomainAccess: truein import YAML: - Deploy code to the service (via
zcli pushorbuildFromGit) - Configure Cloudflare DNS to point to your Zerops project IP
- Set SSL mode to "Full (strict)" in Cloudflare dashboard
The enableSubdomainAccess: true in step 1 is the portable mechanism — the first deploy (or GUI toggle) activates the L7 route; you do not need a separate enable step. (In ZCP, zerops_deploy auto-enables it on first deploy; see the public-access guide for the eligible-mode list and the serviceStackIsNotHttp port-shape rejection in the Gotchas below.)
Internal service-to-service communication must always use http:// — never https://. SSL terminates at the Zerops L7 balancer.
Gotchas
- Wildcard SSL on Cloudflare Free: Free plan doesn't proxy wildcard subdomains — use DNS-only or upgrade
- "Service stack is not http or https":
zerops_subdomain enablereturns this when the service has no HTTP-shaped port (a worker, or a port withouthttpSupport: true) — it's about port shape, not deploy state. A READY_TO_DEPLOY service WITHhttpSupport: truecan be enabled; a deployed worker still cannot.