{"id":22064484,"url":"https://github.com/josef-friedrich/dyndns","last_synced_at":"2025-10-12T13:47:25.326Z","repository":{"id":43393833,"uuid":"140106325","full_name":"Josef-Friedrich/dyndns","owner":"Josef-Friedrich","description":"A dynamic DNS HTTP based update server using Python and the Flask web framework.","archived":false,"fork":false,"pushed_at":"2024-10-26T00:08:25.000Z","size":711,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-15T06:49:43.377Z","etag":null,"topics":["dynamic-dns","dyndns","dyndns-server","flask","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dyndns/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Josef-Friedrich.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-07T17:58:43.000Z","updated_at":"2024-10-20T07:15:34.000Z","dependencies_parsed_at":"2023-10-03T16:37:34.393Z","dependency_job_id":"172669f0-189f-4f53-8159-b89b0e813c9a","html_url":"https://github.com/Josef-Friedrich/dyndns","commit_stats":{"total_commits":267,"total_committers":3,"mean_commits":89.0,"dds":"0.011235955056179803","last_synced_commit":"697996562ebd8ceae8c5bec7dbb36139fbe5470e"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josef-Friedrich%2Fdyndns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josef-Friedrich%2Fdyndns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josef-Friedrich%2Fdyndns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josef-Friedrich%2Fdyndns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Josef-Friedrich","download_url":"https://codeload.github.com/Josef-Friedrich/dyndns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227403073,"owners_count":17774069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamic-dns","dyndns","dyndns-server","flask","python3"],"created_at":"2024-11-30T19:12:01.259Z","updated_at":"2025-10-12T13:47:20.291Z","avatar_url":"https://github.com/Josef-Friedrich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: http://img.shields.io/pypi/v/dyndns.svg\n    :target: https://pypi.org/project/dyndns\n    :alt: This package on the Python Package Index\n\n.. image:: https://github.com/Josef-Friedrich/dyndns/actions/workflows/tests.yml/badge.svg\n    :target: https://github.com/Josef-Friedrich/dyndns/actions/workflows/tests.yml\n    :alt: Tests\n\n.. image:: https://readthedocs.org/projects/dyndns/badge/?version=latest\n    :target: https://dyndns.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\nAbout\n-----\n\n`dyndns \u003chttps://pypi.org/project/dyndns\u003e`_  is a HTTP based API to\ndynamically update DNS records (DynDNS). It’s uses Python and the\nFlask web framework to accomplish this task.\n\nInstallation\n------------\n\nBind9 installation\n^^^^^^^^^^^^^^^^^^\n\n``apt install bind9``\n\n``vim /etc/bind/named.conf``\n\n.. code-block:: text\n\n    zone \"dyndns.example.com\" {\n      type master;\n      file \"/var/cache/bind/dyndns.example.com.db\";\n      allow-update { key \"dyndns.example.com.\"; };\n    };\n\n``tsig-keygen -a hmac-sha512 dyndns.example.com``\n\n``vim /etc/bind/named.conf.local``\n\n.. code-block:: text\n\n    key \"dyndns.example.com.\" {\n      algorithm hmac-sha512;\n      secret \"nbB5i/5pyFywRPaUpEkzxtS0she1JOuZlASceu0lLU8Pe7dYpzuVDn9vbGvof2wjGkVsSZBG2DlaM3RwPHkd9g==\";\n    };\n\n``vim /var/cache/bind/dyndns.example.com.db``\n\n.. code-block:: text\n\n    $ORIGIN dyndns.example.com.\n    $TTL 300 ; 5 minutes\n\n    ;; NAME IN SOA MNAME RNAME\n    ; NAME: name of the zone\n    ; IN: zone class (usually IN for internet)\n    ; SOA: abbreviation for Start of Authority\n    ; MNAME: Primary master name server for this zone\n    ; RNAME: Email address of the administrator responsible for this zone. address is encoded as a name. (john\\.doe.example.com.)\n\n    @\tIN SOA\tns1.example.com. admin.example.com. (\n        1  ; SERIAL: Serial number for this zone.\n        3600       ; REFRESH: number of seconds after which secondary name servers should query\n        1000       ; RETRY: number of seconds after which secondary name servers should retry to request\n        3600000    ; EXPIRE: number of seconds after which secondary name servers should stop answering request\n        300        ; TTL: Time To Live for purposes of negative caching\n        )\n          NS\tns1.example.com.\n          NS\tns2.example.com.\n          A\t185.11.138.33\n          AAAA\t2a03:2900:7:96::2\n\n``systemctl enable named.service``\n\n``systemctl start named.service``\n\nTest Bind9 setup\n^^^^^^^^^^^^^^^^\n\n.. code-block:: text\n\n    echo \"server ns1.example.com\n    debug\n    update add debug.dyndns.example.com. 10 IN TXT \\\"$(date)\\\"\n    send\n    quit\n    \" | nsupdate -y 'hmac-sha512:dyndns.example.com:nbB5i/5pyFywRPaUpEkzxtS0she1JOuZlASceu0lLU8Pe7dYpzuVDn9vbGvof2wjGkVsSZBG2DlaM3RwPHkd9g=='\n\nShow all records of the zone ``dyndns.example.com``\n\n``dig @ns1.example.com. dyndns.example.com. axfr``\n(axfr = Asynchronous Xfer Full Range)\n\ndyndns installation\n^^^^^^^^^^^^^^^^^^^\n\nInstall ``dyndns`` into the directory\n``/usr/local/share/python-virtualenv/dyndns`` using a virtual\nenvironment.\n\n.. code-block:: text\n\n    python3 -m venv /usr/local/share/python-virtualenv/dyndns\n    source /usr/local/share/python-virtualenv/dyndns/bin/activate\n    pip3 install dyndns\n\nThe working directory of our flask web API is in the directory\n``/var/www/dyndns.example.com``. Create a file\n``/var/www/dyndns.example.com/dyndns.ini``.\n\n.. code-block:: ini\n\n    [uwsgi]\n    module = dyndns.wsgi:app\n\n    master = true\n    processes = 5\n\n    socket = /var/www/dyndns.example.com/dyndns.sock\n    chmod-socket = 664\n    uid = www-data\n    gid = www-data\n    vacuum = true\n\n    die-on-term = true\n\nExample configuration file for nginx:\n``/etc/nginx/sites-available/dyndns.example.com.``\n\n.. code-block:: text\n\n    server {\n      server_name dyndns.example.com;\n      listen 80;\n      listen [::]:80;\n      return 301 https://$host$request_uri;\n    }\n\n    server {\n      listen 443 ssl;\n      listen [::]:443 ssl;\n      server_name dyndns.example.com;\n      ssl_certificate /etc/letsencrypt/live/dyndns.example.com/fullchain.pem;\n      ssl_certificate_key /etc/letsencrypt/live/dyndns.example.com/privkey.pem;\n\n      location / {\n        include uwsgi_params;\n        uwsgi_pass unix:/var/www/dyndns.example.com/dyndns.sock;\n      }\n\n    }\n\n``vim /etc/systemd/system/dyndns.service``\n\n.. code-block:: text\n\n    [Unit]\n    Description=uWSGI instance to serve dyndns\n    After=network.target\n\n    [Service]\n    User=www-data\n    Group=www-data\n    WorkingDirectory=/var/www/dyndns.example.com\n    Environment=\"PATH=/usr/local/share/python-virtualenv/dyndns/bin\"\n    ExecStart=/usr/local/share/python-virtualenv/dyndns/bin/uwsgi --ini uwsgi.ini\n\n    [Install]\n    WantedBy=multi-user.target\n\n``systemctl enable dyndns.service``\n\n``systemctl start dyndns.service``\n\nConfiguration\n-------------\n\n``dyndns`` requires a configuration file in the YAML markup language.\n\n``dyndns`` looks on three places for its configuration. It picks the\nfirst existing configuration file and ignores the later in this order:\n\n1. Custom path specified in the environment variable\n   ``dyndns_CONFIG_FILE``\n2. Current working directory of the ``dyndns`` app (cwd):\n   ``\u003ccwd\u003e/.dyndns.yml``\n3. ``/etc/dyndns.yml``\n\n.. code-block:: yaml\n\n    ---\n    secret: '12345678'\n    nameserver: 127.0.0.1\n    port: 53\n    zones:\n      - name: dyndns.example.com\n        tsig_key: tPyvZA==\n\n* ``secret``: A password-like secret string. The secret string must be at least\n  8 characters long and only alphanumeric characters are permitted.\n* ``nameserver``: The IP address of your nameserver. Version 4 or\n  version 6 are allowed. Use ``127.0.0.1`` to communicate with your\n  nameserver on the same machine.\n* ``port``: The port to which the DNS server listens. If the DNS server listens\n  to port 53 by default, the value does not need to be specified.\n* ``zones``: At least one zone specified as a list.\n    * ``name``: The domain name of the zone, for example\n      ``dyndns.example.com``.\n    * ``tsig_key``: The tsig-key. Use the ``hmac-sha512`` algorithm to\n      generate the key:\n      ``tsig-keygen -a hmac-sha512 dyndns.example.com``\n\nUsage\n-----\n\n``dyndns`` offers two HTTP web APIs to update DNS records: A simple API\nand a more flexible API.\n\nThe simple API uses path segments\n(``\u003cyour-domain\u003e/update-by-path/secret/fqdn/ip_1`` see section “Update\nby path”) and the more flexible API uses query strings\n(``\u003cyour-domain\u003e/update-by-query?secret=secret\u0026fqdn=fqdn\u0026ip_1=1.2.3.4``\nsee section “Update by query”).\n\nUpdate by path\n^^^^^^^^^^^^^^\n\n1. ``\u003cyour-domain\u003e/update-by-path/secret/fqdn``\n2. ``\u003cyour-domain\u003e/update-by-path/secret/fqdn/ip_1``\n3. ``\u003cyour-domain\u003e/update-by-path/secret/fqdn/ip_1/ip_2``\n\nUpdate by query\n^^^^^^^^^^^^^^^\n\n``\u003cyour-domain\u003e/update-by-query?secret=secret\u0026fqdn=fqdn\u0026ip_1=1.2.3.4``\n\nArguments for the query string\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n* ``secret``: A password like secret string. The secret string has to\n  be at least 8 characters long and only alphnumeric characters are\n  allowed.\n* ``fqdn``: The Fully-Qualified Domain Name (e. g. ``www.example.com``).\n  If you specify the argument ``fqdn``, you don’t have to specify the\n  arguments ``zone_name`` and ``record_name``.\n* ``zone_name``: The zone name (e. g. ``example.com``). You have to\n  specify the argument ``record_name``.\n* ``record_name``: The record name (e. g. ``www``). You have to\n  specify the argument ``zone_name``.\n* ``ip_1``: An IP address, can be version 4 or version 6.\n* ``ip_2``: A second IP address, can be version 4 or version 6. Must\n  be a different version than ``ip_1``.\n* ``ipv4``: A version 4 IP address.\n* ``ipv6``: A version 6 IP address.\n* ``ttl``: Time to live. The default value is 300.\n\nDelete by path\n^^^^^^^^^^^^^^\n\nHit this url to delete a DNS record corresponding to the ``fqdn``.\nBoth ipv4 and ipv6 entries are deleted.\n\n``\u003cyour-domain\u003e/delete-by-path/secret/fqdn``\n\nUpdate script\n^^^^^^^^^^^^^\n\nTo update the ``dyndns`` server you can use the corresponding shell\nscript `dyndns-update-script.sh\n\u003chttps://github.com/Josef-Friedrich/dyndns-update-script.sh\u003e`_.\n\nEdit the top of the shell script to fit your needs:\n\n.. code-block:: text\n\n    #! /bin/sh\n\n    VALUE_DYNDNS_DOMAIN='dyndns.example.com'\n    VALUE_SECRET='123'\n    VALUE_ZONE_NAME='sub.example.com'\n\nThis update shell script is designed to work on OpenWRT. The only\ndependency you have to install is `curl`.\n\nUse cron jobs (``crontab -e``) to periodically push updates to the\n``dyndns`` server:\n\n.. code-block:: text\n\n    */2 * * * * /usr/bin/dyndns-update-script.sh -S 5 -d br-lan -4 nrouter\n    */2 * * * * /usr/bin/dyndns-update-script.sh -d br-lan -4 nuernberg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosef-friedrich%2Fdyndns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosef-friedrich%2Fdyndns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosef-friedrich%2Fdyndns/lists"}