Skip to main content

A simple script to update CloudFlare DDNS for Synology NAS. This script can be integrated into Synology NAS UI. It largely refers to official CloudFlare's API example for Python

Installation

  1. Install Python 3.11 or newer from the Synology Package Center using the NAS web interface.
  2. Enable the SSH connection and ssh into your NAS
  3. Install pip for python3, then get python-cloudflare
sudo python3 -m ensurepip
sudo python3 -m pip install --upgrade pip setuptools
sudo python3 -m pip install "git+https://github.com/butlerx/SynologyCloudflareDDNS.git"

Usage

synology_cloudflare_ddns <email> <api_key> <hostname> <ip_address> [--log-level LEVEL] [--log-format kv|json]
  • email: (Required for Synology UI compatibility, but not used by this script)
  • api_key: Your Cloudflare API key. Find it in your Cloudflare dashboard under 'My Profile' > 'API Tokens'. Where do I find my Cloudflare API key?
  • hostname: The domain name to update (e.g., example.com).
  • ip_address: The IP address to set for the DNS record.
  • --log-level: Logging level (default: ERROR).
  • --log-format: Log output format: kv (key-value, default) or json.

Synology Integration

Integrate the script into Synology DDNS management interface by adding the following text into /etc.defaults/ddns_provider.conf:

[Cloudflare]
        modulepath=/bin/synology_cloudflare_ddns
        queryurl=https://www.cloudflare.com/

Go to DDNS management page in your NAS web UI (control->external access->DDNS). Click Add. And select Cloudflare from the drop-down menu. Fill the three necessary fields which are hostname, username, and password (CloudFlare API Key).

That's it. See if the DDNS' IP has been updated in your Cloudflare page.

Metadata

Release files for synology-cloudflare-ddns 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synology-cloudflare-ddns 0.2.0
File Size Uploaded Provenance Actions
synology_cloudflare_ddns-0.2.0.tar.gz 11.1 kB With provenance Details for synology_cloudflare_ddns-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synology-cloudflare-ddns 0.2.0
File Interpreter ABI Platform Actions
synology_cloudflare_ddns-0.2.0-py3-none-any.whl Python 3 none any Details for synology_cloudflare_ddns-0.2.0-py3-none-any.whl

Total release size: 22.3 kB

Release files / synology_cloudflare_ddns-0.2.0.tar.gz

Download URL synology_cloudflare_ddns-0.2.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e12c8eb47ec30c6c91d8f37ad35332885f338f08ec7614f1ca8989a6750c9839
BLAKE2b-256 checksum
How to use checksums
202bfbb8326e5e1050c4c21f6ef15d77d486d8f73e191d90134ffe4151dd9d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / synology_cloudflare_ddns-0.2.0-py3-none-any.whl

Download URL synology_cloudflare_ddns-0.2.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5307f530167b462c405861c4856546504eb89b3a160f8f3ef09c5785489620ba
BLAKE2b-256 checksum
How to use checksums
6c8cfbc749f797fefa7437ccb0346e7bd21d9da72d43bcc84a8cdc7cb95262e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for synology-cloudflare-ddns 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for synology_cloudflare_ddns-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page