Skip to main content

A script to keep the values in the Cloudflare DDNS service in sync with your local dynamic IP address.

Project description


Build Status

A script to keep the values in the Cloudflare DDNS service in sync with your local dynamic IP address. It starts an infinite loop that periodically performs checks, using an external service, whether your IP address has changed or not. If it is so, the script sends a request to Cloudflare API and updates the DNS records.


  • Python 3.6+

How to use the script

  1. Write a configuration file in the following format:

    email: <your login to Cloudflare>
    api_key: <Cloudflare API key>
    periodicity: <timeout between checks in seconds>
      -    # 'proxied: true' is implied
      - domain:
        proxied: false

    You may place it into your home directory under the name of .cloudflare-ddns-config. On Linux, a system-wide configuration file is also supported: /etc/cloudflare-ddns-config.

  2. Install the package:

    pip install cfdyndns-updater
  3. Run the script!


    It's possible to specify the path to any configuration file explicitly as the only positional argument:

    cfddns_updater config.yml

Exit codes

Exit code Explanation
2 invalid command line arguments
-1 the configuration file is not found
-2 validation of the configuration file was failed

Integration with a system manager

See Wiki pages for examples of configuration files for various system managers. If your favorite one is missing there, write your own configuration file for it and create a pull request. Any contributions are welcomed!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfdyndns-updater-0.1.0.tar.gz (23.1 kB view hashes)

Uploaded source

Built Distribution

cfdyndns_updater-0.1.0-py3-none-any.whl (9.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page