How to connect Cloudflare to your control panel (API token)
On this page
The Cloudflare page puts Cloudflare's network in front of your websites: faster pages worldwide and protection from attacks. It works with your own Cloudflare account, through an API token you create there.
Before you start
You need a Cloudflare account (the free plan is enough).
Step 1: create the token in Cloudflare
- In Cloudflare, open My Profile → API Tokens and click Create Token.
- Choose the Edit zone DNS template.
- Add these permissions:
- Zone · Zone Settings · Edit
- Zone · Cache Purge · Purge
- To add new domains from the panel: Zone · Zone · Edit and Account · Account Settings · Read
- Under the zone resources, choose your domains or All zones.
- Create the token and copy it. Cloudflare shows it only once.
Step 2: connect it in the panel
- Log in to the control panel (
https://your-server:2083). - Open Cloudflare in the menu (section Domains).
- Under Connect your Cloudflare account, paste the token into API token.
- Click Connect. The message Cloudflare connected. appears and your domains are listed with their state At Cloudflare: Not added, Waiting for nameservers or Active.
Good to know
- Use an API token, not the Global API Key. A Global API Key is refused with
Paste the API token created in your Cloudflare profile (not the Global API Key). - The token is checked when you connect and stored encrypted.
- The list shows your main domain, addon domains and aliases. Subdomains are managed inside their domain's Cloudflare zone.
- Disconnect removes the token from the panel only. Nothing changes at Cloudflare: your domains stay there with their settings.
Common questions
I get "The token cannot see a Cloudflare account" when adding a domain.
The token lacks Account · Account Settings · Read or Zone · Zone · Edit. Edit the token in Cloudflare, or create a new one and connect again.
Next step?
Add your domain to Cloudflare and copy its DNS records.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to add your domain to Cloudflare and copy DNS records
Add a domain to Cloudflare from the control panel, copy its DNS records from the server, switch Cloudflare's proxy per record and change the nameservers.
- How to purge Cloudflare cache and set SSL mode from the panel
Purge Cloudflare's cache, turn on development mode, set SSL to Full (strict) and Always use HTTPS for your domain directly from the control panel.
- SSL certificates for websites behind Cloudflare
How free SSL certificates are issued and renewed when your website uses Cloudflare's proxy, which SSL mode to choose, and the order to switch it on.