https://github.com/kutzilla/docker-hetzner-ddns
A Docker image that allows you to use Hetzner DNS as a DynDNS Provider
https://github.com/kutzilla/docker-hetzner-ddns
Last synced: 8 months ago
JSON representation
A Docker image that allows you to use Hetzner DNS as a DynDNS Provider
- Host: GitHub
- URL: https://github.com/kutzilla/docker-hetzner-ddns
- Owner: kutzilla
- License: mit
- Created: 2021-10-05T11:54:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-06T17:13:16.000Z (over 2 years ago)
- Last Synced: 2023-10-06T18:27:31.654Z (over 2 years ago)
- Language: Go
- Size: 69.3 KB
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/kutzilla/docker-hetzner-ddns/actions/workflows/go.yml) [](https://hub.docker.com/r/kutzilla/hetzner-ddns)
# Docker Hetzner DDNS
This Docker image will allow you to use the [Hetzner DNS Service](https://www.hetzner.com/dns-console) as a Dynamic DNS Provider ([DDNS](https://en.wikipedia.org/wiki/Dynamic_DNS)).
## How does it work?
The Go script inside this Docker Image periodically checks the DNS record with the Hetzner DNS API. It also checks the current public IP of the network, the container is running on. If the DNS record does not match the current public IP, it will update the record. Therefore your DNS record updates dynamically to the public IP.
## Usage
Quick Setup:
```shell
docker run \
-e ZONE_NAME=example.com \
-e API_TOKEN=my-secret-api-token \
-e RECORD_TYPE=A \
kutzilla/hetzner-ddns
```
If you prefer command-line arguments, you can use this command:
```shell
docker run kutzilla/hetzner-ddns example.com my-secret-api-token A
```
## Parameters
* `-e ZONE_NAME` - The DNS zone that DDNS updates should be applied to. **Required**
* `-e API_TOKEN` - Your Hetzner API token. **Required**
* `-e RECORD_TYPE` - The record type of your zone. If your zone uses an IPv4 address use `A`. Use `AAAA` if it uses an IPv6 address. **Required**
* `--restart=always` - ensure the container restarts automatically after host reboot.
## Optional Parameters
* `-e RECORD_NAME` - The name of the DNS-record that DDNS updates should be applied to. This could be `sub` if you like to update the subdomain `sub.example.com` of `example.com`. The default value is `@`.
* `-e CRON_EXPRESSION` - The cron expression of the DDNS update interval. The default is every 5 minutes - `*/5 * * * *`.
* `-e TTL` - The TTL (Time To Live) value specifies how long the record is valid before the nameservers are prompted to reload the zone file. The default is `86400`.
## Build
Build the latest version of the Docker image with the following command:
```
docker build -t kutzilla/hetzner-ddns .
```