Code Monkey home page Code Monkey logo

hetzner_ddns's Introduction

Hetzner Dynamic DNS Daemon

A simple daemon to continuously update Hetzner DNS A and AAAA records for your server with a dynamic IP address.

It features support for multiple subdomain records with painless configuration and administration.

Installation

Prebuilt packages

Officially supported operating systems:

Packages for the latest stable version can be found here.

Feel free to contribute to first-party support for other operating systems.

Manual Installation

Dependencies: awk, curl, jq.

# Download
git clone https://github.com/filiparag/hetzner_ddns.git
cd hetzner_ddns

# Install
sudo make install

# systemd service
sudo make systemd

# FreeBSD service
sudo make freebsd-rc

# NetBSD service
sudo make netbsd-rc

# OpenRC service
sudo make openrc

Configuration

Configuration file is located at /usr/local/etc/hetzner_ddns.conf

# Seconds between updates / TTL value
interval='60'

# Hetzner DNS API key
key='18fe3b02339b23ef2418f9feda1b69ef'

# Top level domain name
domain='example.com'

# Space separated host subdomains (@ for domain itself)
records='homelab media vpn'

To obtain an API key, go to Hetzner DNS Console.

Prebuilt packages

Default configuration location differs in prebuilt packages:

  • Linux distributions: /etc/hetzner_ddns.conf
  • FreeBSD: /usr/local/etc/hetzner_ddns.conf
  • NetBSD: /usr/pkg/etc/hetzner_ddns.conf

Usage

Run on startup

# systemd
sudo systemctl enable hetzner_ddns

# FreeBSD and NetBSD
sudo service hetzner_ddns enable

# OpenRC
sudo rc-update add hetzner_ddns

Start/Stop

# systemd
sudo systemctl start/stop hetzner_ddns

# FreeBSD, NetBSD and OpenRC
sudo service hetzner_ddns start/stop

Log file is located at /var/log/hetzner_ddns.log

Privacy notice

This script relies on Akamai's What's My IP service to retrieve public IP address.

hetzner_ddns's People

Contributors

filiparag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.