Skip to main content

DYNDNS to Hetzner

A DynDNS2 endpoint that changes DNS records using the Hetzner DNS API.

Running

Non-Docker

It is recommended to create a virtual environment for this project.

cd /opt # can be somewhere else if you prefer
python3 -m venv dyndns-to-hetzner
source dyndns-to-hetzner/bin/activate
pip install dyndns-to-hetzner
flask --app dyndns_to_hetzner init-config

The last command will print the location of the configuration file. Adjust it to your needs.

It is recommended to use a WSGI server to run this project, e.g. gunicorn:

pip install gunicorn
gunicorn -w 4 'dyndns_to_hetzner:create_app()' --access-logfile=- --bind="0.0.0.0:5000"

Setting up a reverse proxy such as nginx, apache or traefik is recommended if you want to access dyndns-to-hetzner from a different host.

Docker

There is no official image available via a repository, the provided docker-compose file builds the image when started.

You will need to clone the repository due to this.

git clone https://github.com/faeyben/dyndns-to-hetzner.git
cd dyndns-to-hetzner/docker
cp -a ../config.py.example config.py

Adjust the config.py to your liking.

docker-compose up -d

Setting up a reverse proxy such as nginx, apache or traefik is recommended if you want to access dyndns-to-hetzner from a different host.

Using

The update mechanism will be available at http://HOST_IP:5000/nic/update and expects the hostname and myip GET parameters, whereas hostname is the DNS record you want to update and myip is the IP you want the record to be set to.

Example: http://HOST_IP:5000/nic/update?hostname=home.example.com&myip=198.51.100.42

Access will only be granted after a successful HTTP Basic Authentication.

FRITZ!Box

FRITZ!Box routers allow setting up a DynDNS provider so the router sends an update to DynDNS anytime its public IP address changes. The following settings are required for that:

  1. Update-URL: http://HOST_IP:5000/nic/update?&myip=<ipaddr>&hostname=<domain> (replace HOST_IP with the IP address or hostname of the server that dyndns-to-hetzner is running on, use https instead of http if SSL/TLS is enabled via a reverse proxy on the host)
  2. Domainname: The FQDN of the record you want to have changed
  3. Username: A username you set in the config.py
  4. Password: The corresponding password you set in the config.py

After saving, the FRITZ!Box should issue a first update request within a few seconds.

Metadata

Release files for dyndns-to-hetzner 1.0.2

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

Source distribution (sdist)

Source distribution for dyndns-to-hetzner 1.0.2
File Size Uploaded
dyndns_to_hetzner-1.0.2.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dyndns-to-hetzner 1.0.2
File Interpreter ABI Platform
dyndns_to_hetzner-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / dyndns_to_hetzner-1.0.2.tar.gz

Download URL dyndns_to_hetzner-1.0.2.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
81df5f5ab988baf78e3d4cfb84e840490e74f452968c9cd8d07dfe12c85696b8
BLAKE2b-256 checksum
How to use checksums
2296b80e3d08820cf86d4762c1822cdfa64baee55d892ccad5ba59ace23a432a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / dyndns_to_hetzner-1.0.2-py3-none-any.whl

Download URL dyndns_to_hetzner-1.0.2-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
788eb7891d46bb640361972e1bd7fc42875ed16a023e73b52c9450f5ea32d9b1
BLAKE2b-256 checksum
How to use checksums
2f7d2bf608c94e00bb4b0c1d98ef0fab10bfcbc2913a331a6b790df986b761da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

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