Sync Plesk DNS records with Cloudflare using token-scoped access, per-user settings, API logs, and background sync jobs.
Cloudflare Pro is a Plesk extension for connecting Plesk DNS zones to Cloudflare zones and keeping records aligned. It stores Cloudflare API tokens per logged-in Plesk user, discovers matching Cloudflare zones, compares local Plesk records with Cloudflare records, and provides import, export, sync, delete, proxy, and API log tools from the Plesk UI.
The extension is built for the Plesk extension pattern: PHP/Zend controllers in plib, static assets in htdocs, extension metadata in meta.xml, and React UI compiled into htdocs/public/assets.
- Name: Ghost Compiler
- GitHub: ghostcompiler/cloudflare-pro
- Profile: github.com/ghostcompiler
Developer and operator documentation lives in docs:
- Plesk UI Library based interface with Domains, Tokens, API Logs, Settings, and About tabs.
- Per-user Cloudflare API token storage with token name, status, validation, update, and delete actions.
- Cloudflare zone discovery that only shows zones matching accessible Plesk domains.
- Domain record viewer with search, pagination, type sorting, proxy toggles, and record status.
- Import all records from Cloudflare to Plesk.
- Export all local Plesk records to Cloudflare.
- Sync all records through persisted background jobs with Plesk progress toasts.
- Automatic DNS push on Plesk domain, DNS, record, site, and subdomain events when Auto Sync is enabled.
- Per-user settings saved as one JSON payload row.
- API Logs table with search, pagination, detail drawer, request/response copy actions, and remove logs action.
- Plesk service-plan permission hook for controlling extension visibility.
- SQLite storage removed during extension uninstall.
- View: Opens the domain record page for the linked Cloudflare zone.
- Export: Pushes all local Plesk DNS records to Cloudflare.
- Import: Pulls all Cloudflare DNS records into Plesk.
- Sync: Runs a Cloudflare sync job using the current local Plesk DNS source.
- Auto Sync: Enables automatic event-based pushing for that linked domain.
- Back: Returns to the Domains tab.
- Import: Imports all Cloudflare records for the zone into Plesk.
- Export: Exports all local Plesk records for the domain to Cloudflare.
- Sync All: Starts a persisted sync job and shows progress in a Plesk toaster.
- Search records: Searches all displayed records, not only the current page.
- Type sorting: Sorts records by DNS type and then name.
- Proxy: Toggles Cloudflare proxy status for A, AAAA, and CNAME records.
- Push: Appears for local-only or mismatched records and pushes the local record to Cloudflare.
- Pull: Appears for Cloudflare-only or mismatched records and pulls the Cloudflare record into Plesk.
- Delete: Deletes the record from both Plesk and Cloudflare where it exists.
- Add Token: Opens a Plesk Drawer for credentials.
- Token name: Human label for the stored token.
- API token: Password field. Paste only the token value, not
Bearer .... - Validate: Calls Cloudflare
/user/tokens/verify, stores status, and logs the API request. - Edit: Updates token name or replaces the token value.
- Delete: Removes the token and linked domain rows for that token.
- Search logs: Searches all API log rows server-side.
- View: Opens a drawer with request, response, route, HTTP status, duration, and error message.
- Copy: Copies request and response data.
- Remove Logs: Clears stored API call logs for the current user.
Settings are per user and stored in one JSON row.
- Enable Autosync: Allows automatic DNS pushes from Plesk events.
- Remove records automatically on domain delete: Enables Cloudflare cleanup for concrete deleted child hostnames. Ambiguous apex events are skipped so a subdomain delete cannot remove every zone record.
- Validate token before sync: Verifies token status before sync jobs.
- Log Cloudflare API calls: Stores request/response metadata in API Logs.
- Create www record for subdomains: When autosync handles a subdomain, also creates matching
www.<subdomain>records in Cloudflare without requiring that hostname to exist in Plesk. When that subdomain is deleted, the companionwww.<subdomain>record is removed only if this toggle is enabled. - Enable proxy for A records: Default Cloudflare proxy state for A records.
- Enable proxy for AAAA records: Default Cloudflare proxy state for AAAA records.
- Enable proxy for CNAME records: Default Cloudflare proxy state for CNAME records.
- Plesk Obsidian 18.0.0 or newer.
- PHP with PDO SQLite and cURL available to the Plesk PHP runtime.
- Node.js 20 or newer for local frontend builds and GitHub Actions runners.
- A Cloudflare API token with zone access, including DNS edit permissions for zones that should be synced.
Recommended Cloudflare token permissions:
Zone:Zone:ReadZone:DNS:ReadZone:DNS:Edit
Install the latest runner-built package directly from GitHub:
plesk bin extension --install-url https://github.com/ghostcompiler/cloudflare-pro/releases/download/latest/cloudflare-pro.zipThis URL points to the rolling latest pre-release asset. The Package Latest workflow rebuilds cloudflare-pro.zip from the current main branch on every push and whenever it is started manually.
Pinned version installs are available after publishing a versioned release:
plesk bin extension --install-url https://github.com/ghostcompiler/cloudflare-pro/releases/download/v1.0.5/cloudflare-pro-1.0.5.zipBuild the extension ZIP locally:
sh packaging/build.shInstall the local archive through Plesk CLI:
plesk bin extension --install cloudflare-pro-1.0.5.zipOr install through Plesk UI:
- Open Plesk Admin.
- Go to Extensions.
- Click Upload Extension.
- Upload
cloudflare-pro-1.0.5.zip. - Open Cloudflare Pro from the Plesk sidebar.
Run the same local checks used by the CI runner:
npm install --ignore-scripts --legacy-peer-deps
npm test
find plib htdocs \( -name '*.php' -o -name '*.phtml' \) -print0 | sort -z | xargs -0 -n1 php -l
xmllint --noout meta.xml
node -e "JSON.parse(require('fs').readFileSync('packaging/manifest.json', 'utf8'))"
sh -n packaging/build.sh
sh packaging/build.sh
zip -T cloudflare-pro-1.0.5.zipGitHub Actions runners are included:
- CI runs on every branch push, pull request, and manual dispatch. It validates PHP, frontend build, docs, metadata, packaging script, ZIP build, and uploads package artifacts.
- Package Latest runs on
mainand manual dispatch. It builds and publishescloudflare-pro.zipto the rollinglatestGitHub pre-release. - Release runs on
v<version>tags and manual dispatch. It verifies the tag matchesmeta.xml, buildscloudflare-pro-<version>.zip, and publishes the versioned release. - Pages runs when docs change on
mainand manual dispatch. It validates thedocs/folder and deploys it to GitHub Pages.
- Open a service plan or subscription.
- Enable Cloudflare Pro access.
- Add a Cloudflare API token in the Tokens tab.
- Validate the token.
- Open the Domains tab and confirm matching Cloudflare zones are linked.
- Enable Auto Sync for domains that should push Plesk DNS changes automatically.
- Use View to inspect record status and run Import, Export, or Sync All as needed.
When the UI reports a 500 error or autosync does not trigger, check:
tail -n 200 /var/log/plesk/panel.log
tail -n 200 /var/log/sw-cp-server/error_logOn some Plesk builds, the panel log is stored at:
tail -n 200 /usr/local/psa/admin/logs/panel.logAutosync writes messages with the Cloudflare Pro autosync prefix.