Skip to main content
Skip to main content

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)​

CNAME <domain> <project-cname-target>

DNS-Only (gray cloud)​

IP TypeRecords Required
Shared IPv4A + AAAA (both required for SNI)
Dedicated IPv4A (AAAA optional)
IPv6 onlyAAAA

Wildcard Domains​

Method A: A *.<domain> + AAAA *.<domain>
Method B: CNAME *.<domain> <domain>
ACME: CNAME _acme-challenge.<domain> <domain>.zerops.zone

Preparing a Service for Cloudflare​

Any runtime service (nodejs, go, python, etc.) can be put behind Cloudflare. Steps:

  1. Create the service with enableSubdomainAccess: true in import YAML:
    services:
    - hostname: myapp
    type: nodejs@22
    enableSubdomainAccess: true
    minContainers: 1
  2. Deploy code to the service (via zcli push or buildFromGit)
  3. Configure Cloudflare DNS to point to your Zerops project IP
  4. 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​

  1. Wildcard SSL on Cloudflare Free: Free plan doesn't proxy wildcard subdomains — use DNS-only or upgrade
  2. "Service stack is not http or https": zerops_subdomain enable returns this when the service has no HTTP-shaped port (a worker, or a port without httpSupport: true) — it's about port shape, not deploy state. A READY_TO_DEPLOY service WITH httpSupport: true can be enabled; a deployed worker still cannot.