Install and configure the Cloudflare module
To install the Cloudflare module:
- Log in as Administrator.
- Navigate to Modules → select Cloudflare → click Install.
- Register in Cloudflare and generate the API-token which you will need at Step 6.
- Navigate to Modules.
- Click Settings.
- Specify the generated token in the Api Token field.
- Click Save.
If a token is specified under the Administrator, all users will use this token.In order for users to use their own tokens, you need to leave the Api Token field empty in the plugin settings.
Generating Api Token
- Create an account and log in to Cloudflare.
- Click My Profile.
- Select the tab API Tokens.
- In the form that opens, click on Create Token.
- At the bottom of the templates list, click Get Started opposite Create Custom Token.
- Set the token name in the field Token name and add the necessary permissions.
- After adding the necessary settings, click Continue to summary at the bottom.
- The form will open with a description of all the added permissions for the token.
- If everything is correct, click Create Token, otherwise click Edit token and add permissions.
- After clicking on the Create Token button, a page with a ready-to-use token will open.
For the correct work of the Cloudflare plugin, select the following permissions:
- Account, Account Firewall Access Rules, Read
- Zone, Cache Rules, Edit
- Zone, Zone Settings, Read, Edit
- Zone, Zone DNS, Read, Edit
- Zone, Zone, Edit
- Zone, Cache Purge, Purge
- Zone, Firewall Services, Read, Edit
After adding the necessary permissions, the plugin functions should work. It may take some time to update the token data on Cloudflare servers.