Cloudflare Integration
One Cloudflare integration connects one Cloudflare account. It has two independent features. Use either one, or both:
Setup
Prerequisites
- The Cloudflare Account ID. It is on the overview page of the Cloudflare dashboard.
- A Cloudflare API Token for that account, with the permissions of the features you use.
Permissions
Give the token only what you use:
Set Account Resources to the account the integration connects.
Create the API token
- In the Cloudflare Dashboard, open My Profile → API Tokens → Create Token.
- Select Create Custom Token.
- Add the permissions from the table above.
- Set Account Resources to your account.
- Click Continue to Summary, then Create Token. Copy the token. Cloudflare shows it only once.
Add the integration
- In Weavestream, open Admin → Integrations → New Integration.
- Select Cloudflare as the provider.
- Enter the Cloudflare Account ID and the API Token.
- To use domain sync, also set Sync domains into company (slug). You can also do this later.
- Click Test connection, then Save.
Test connection checks the feature the integration is set up for:
- Domain sync off: it reads the Gateway lists. A token without Zero Trust access fails.
- Domain sync on: it reads the zone and registrar lists, and fails if either is not readable. It also tries the Gateway lists. If the token has no Zero Trust access, the result says so but the test still passes, because a domains-only integration never calls the Gateway API.
Schedule
One schedule runs both features. On each run, Weavestream checks every registered list and repairs drift, then runs the domain sync if it is on. A blank schedule uses the global default (every 15 minutes unless an administrator changed it).
Zero Trust Gateway IP lists
Manage Cloudflare Zero Trust Gateway IP lists from Weavestream instead of editing them in each Cloudflare dashboard. You add, update and remove IP and CIDR entries in Weavestream, and each change is pushed to Cloudflare at once.
Capabilities
- Push to Cloudflare: every entry change is sent to Cloudflare immediately.
- Drift detection and repair: each scheduled run compares Cloudflare with Weavestream and corrects changes made directly in Cloudflare.
- IPv4 and IPv6: single addresses and CIDR blocks (for example
192.168.1.0/24and2601:280:5280:7bc0::/64). - Several lists: register more than one Gateway IP list under one integration.
Managed attributes
Register a Gateway list
- Open the Cloudflare integration and select the Lists tab.
- Click Register list.
- Select a Gateway IP list from the lists found on the account.
- Click Register. Weavestream imports the existing entries and manages the list from then on.
Note
For step-by-step instructions, including Cloudflare Gateway policies and firewall rules, see the Cloudflare Zero Trust IP Lists guide.
Domain sync
Keep Domains in step with every domain on the Cloudflare account: Cloudflare Registrar registrations and DNS zones alike. Each synced domain has an orange Cloudflare tag, so it is never confused with a domain entered by hand.
What is synced
Weavestream reads Cloudflare's Registrar registrations API. The older /registrar/domains endpoints reached end of life on September 27, 2026 and are not used. The registrations API only knows domains that Cloudflare Registrar holds, so a zone whose registration is at another registrar shows no registrar facts; the domain's WHOIS check still reports its expiry.
Weavestream owns everything else on the row: the company it belongs to, the monitoring toggles and client visibility. The sync only rewrites the registrar fields above.
Turn it on
- Make sure the API token has the domain sync permissions (see
Permissions ). - Under Credentials & schedule, set Sync domains into company (slug) to the company that new domains go to. Saving checks that you can manage domains in that company. The company is then stored by id, so a later slug rename does not break the sync.
- Click Test connection. With domain sync on, it checks the zone and registrar lists. On a 401 or 403 it shows Cloudflare's own error text.
- Make sure the integration has a schedule. The Domains tab also has a Sync domains now button that queues a run at once.
Behaviour
- New domains (e.g. a domain you just bought) are created in the configured company.
- Moved domains: if you move a synced domain to a client company, it stays there; later syncs update it in place.
- Existing manual entries with the same hostname in the configured company are taken over (they turn into synced rows). Manual entries in other companies are left alone and the domain is skipped rather than duplicated.
- Nothing is deleted. A domain that leaves the account (transferred out, expired, moved to another Cloudflare account) is flagged not on account since … and keeps its history; archive it yourself when you are done with it.
- Archiving is respected. An archived synced domain is not updated or recreated, even while it is still on the Cloudflare account.
- Recreating the integration for the same Cloudflare account reclaims the domains the old one synced.
- A synced domain's hostname cannot be edited, because the sync matches on it.
- If two Cloudflare integrations report the same hostname, only one of them creates it, even when both run at the same moment; the other skips it.
- All or nothing. Both Cloudflare lists are read in full before anything is written. Any Cloudflare error (permissions, rate limit, a bad request, an outage) fails the run and changes no domain, so a failed request can never erase stored registrar facts or flag live domains as missing.
Results and failures
The Domains tab shows the latest run, manual or scheduled: queued, running, the counts when it succeeds, or the reason when it fails. It updates on its own while a run is in progress. A Cloudflare error (for example a missing permission) is shown with Cloudflare's own text. Any other failure shows a reference ID instead of technical details; search the server log for that ID.
Each successful run writes one integration.cloudflare.registrar_sync audit row listing the created, taken-over, skipped and missing hostnames. A failed run writes integration.cloudflare.registrar_sync.failed with the error.