Cloudflare
Connect a Cloudflare account to mlab.sh with a read-only API token: active zones and their DNS names, synced every day.
The Cloudflare connector reads your zones and DNS records through the Cloudflare API. Cloudflare has no page where you approve a third-party application, so you create a read-only API token and paste it in mlab.sh. mlab.sh then checks the token only reads, and refuses it otherwise.
Before you start
- You need a Cloudflare user that can see the zones to monitor.
- In mlab.sh, you need to be owner or admin of the organization, on the Team or Enterprise plan.
- One token is one connection. Zones in several Cloudflare accounts? A token can cover all the accounts your user belongs to, or connect each one separately.
Create the token
Open the API tokens page
In the Cloudflare dashboard, open My Profile → API Tokens and click Create Token. At the bottom, next to Custom token, click Get started.
Name it and give it two read-only policies
Name the token mlab.sh (you will look for that name to delete it). Under Policies, add:
| Policy | Resources | Permissions |
|---|---|---|
| Zone policy | Include → All zones (or the zones to monitor) | Zone Read, DNS Read |
| User policy | Your user | API Tokens Read |
When you are done, the token lists exactly these two policies and nothing else.

API Tokens Read lets mlab.sh read this token's own permissions, so it can prove the token only reads. It shows the names and permissions of your tokens, never their values. Without it, mlab.sh refuses the token.
Choose the zones
All zones monitors everything, including zones added later. To limit it, pick specific zones in the Zone policy: a zone left out is simply not synced.
Create it and copy it
Leave TTL empty for monitoring (a token that expires stops the syncs). Click Continue to summary, then Create Token, and copy the token. Cloudflare shows it only once.
Connect it in mlab.sh
Paste the token
In Inventory → Connections, click Connect an account, choose Cloudflare, give the connection a name if you have several accounts, paste the token, and click Connect Cloudflare.
Checked, then synced
mlab.sh checks the token is active and that every permission it holds is a Read permission. If one of them allows more (Edit, Write...), the token is refused and nothing is kept. Once accepted, the connection is Active and the first sync starts within a minute.
What is synced
| Cloudflare | In mlab.sh |
|---|---|
| Active zones | Domain (DNS zone), proven yours: an active zone is delegated to Cloudflare |
| A, AAAA, CNAME records | The zone's Subdomains, with their records and whether they are proxied |
Pending zones (not delegated to Cloudflare yet) are not synced: they prove nothing about who holds the domain. The addresses your records point to are not added as your IPs, since a name can point to a shared host.
The sync runs every 24 hours. In the connection page, Sync now starts one within a minute.
Troubleshooting
| What mlab.sh shows | What to do |
|---|---|
| the token needs the API Tokens Read permission | Edit the token in Cloudflare and add User · API Tokens · Read, then connect again. |
| the Cloudflare token allows ... Edit (or Write) | The token can change something. Create a new token with the three Read permissions only. |
| the Cloudflare token is expired (or disabled) | Create a new token without TTL, disconnect the old connection and connect the new token. |
| Cloudflare 403 ... Authentication error during a sync | The token was deleted or rolled in Cloudflare. Disconnect and connect a new token. |
Revoke
A read-only token cannot delete itself, so Disconnect in mlab.sh deletes the token on our side and stops the
syncs, and says the provider did not confirm. Delete the token in Cloudflare too: My Profile → API Tokens, the
mlab.sh token, Delete. That is the step that makes it unusable everywhere.
OVHcloud
Connect an OVHcloud account to mlab.sh with read-only API access: domains, DNS zones, IP blocks, dedicated servers, VPS and Public Cloud instances, synced every day.
Overview
Run a security incident in mlab.sh from the first alert to the closing report: phase, severity, owner, indicators checked against what mlab knows, tasks, affected assets, files, timeline, GDPR, NIS2 and DORA deadlines, post-mortem.