Skip to main content

cfdyndns-updater

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.

Requirements

  • 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>
    domains:
      - example.org    # 'proxied: true' is implied
      - www.example.org
      - domain: ssh.example.org
        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!

    cfddns_updater
    

    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!

Metadata

Release files for cfdyndns-updater 0.1.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 cfdyndns-updater 0.1.0
File Size Uploaded
cfdyndns-updater-0.1.0.tar.gz 23.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cfdyndns-updater 0.1.0
File Interpreter ABI Platform
cfdyndns_updater-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.1 kB

Release files / cfdyndns-updater-0.1.0.tar.gz

Download URL cfdyndns-updater-0.1.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e04cd3c57008d0931e3a8fef651ca6f8f2c6315a789ff8dc1e28a2b64a8d1e79
BLAKE2b-256 checksum
How to use checksums
54569a348fcd955bf532967a8b03daaba2676d14e85f7eccf43b068394358e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

Release files / cfdyndns_updater-0.1.0-py3-none-any.whl

Download URL cfdyndns_updater-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b753a0eacbb8588a7e1402ff026eea3638086e0b0399d2703bb86d89c7814d5
BLAKE2b-256 checksum
How to use checksums
d1b44717a0a64691d2a80794b996fb5a3246f2c58994096c5cc2aa109ffea56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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