Skip to content

p-mng/hetzner_ddns

Repository files navigation

hetzner_ddns: A lightweight DDNS daemon for the Hetzner Cloud API

A lightweight daemon written in Go (using the official Cloud API library) to continuously update A and AAAA records with dynamic IP addresses.

Installation

Building from source

Building from source requires a working Go toolchain. make and sudo make install can be used to build and install the binary.

Pre-built packages

Pre-built binaries for different architectures can be downloaded from the GitHub releases section.

Configuration

hetzner_ddns is configured using a YAML file located at /etc/hetzner_ddns.yaml. This config file location can be overridden by setting the HETZNER_DDNS_CONFIG environment variable.

interval: 300 # update interval in seconds, must be >= 60
token: put_your_token_here # Hetzner Cloud API Token
timeout: 30 # update loop timeout in seconds
zones:
  - domain: example.com
    records:
      - name: "@"
        type: "A"
        ttl: 300
      - name: "@"
        type: "AAAA"
        ttl: 1800
      - name: "minecraft"
        type: "A"
        ttl: 3600

Using a shorter timeout is not recommended, as the Hetzner Cloud API is relatively slow and takes about 3 seconds per request. Shorter timeouts might cancel the update loop before all records have been updated.

About

A lightweight daemon to continuously update A and AAAA records with dynamic IP addresses.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors