Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidborzek/hetzner-ddns-updater
hetzner dyndns updater
https://github.com/davidborzek/hetzner-ddns-updater
ddns ddns-updater dyndns dyndns-updater hetzner hetzner-dns hetzner-dyndns
Last synced: 12 days ago
JSON representation
hetzner dyndns updater
- Host: GitHub
- URL: https://github.com/davidborzek/hetzner-ddns-updater
- Owner: davidborzek
- License: mit
- Created: 2023-09-09T21:57:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T17:09:28.000Z (8 months ago)
- Last Synced: 2024-05-22T18:29:11.149Z (8 months ago)
- Topics: ddns, ddns-updater, dyndns, dyndns-updater, hetzner, hetzner-dns, hetzner-dyndns
- Language: Go
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build and publish docker image](https://github.com/davidborzek/hetzner-ddns-updater/actions/workflows/build-publish-docker.yml/badge.svg)](https://github.com/davidborzek/hetzner-ddns-updater/actions/workflows/build-publish-docker.yml)
[![Tests](https://github.com/davidborzek/hetzner-ddns-updater/actions/workflows/tests.yml/badge.svg)](https://github.com/davidborzek/hetzner-ddns-updater/actions/workflows/tests.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/davidborzek/hetzner-ddns-updater)](https://goreportcard.com/report/github.com/davidborzek/hetzner-ddns-updater)# hetzner-ddns-updater
hetzner-ddns-updater is a lightweight service designed to periodically check for changes in your external IP address and update a DNS record at Hetzner when necessary. This project simplifies the process of keeping your DNS records up-to-date with your dynamic IP address.
## Table of Contents
- [Configuration](#configuration)
- [Metrics](#metrics)
- [Running with Docker](#running-with-docker)## Configuration
To configure hetzner-ddns-updater, you can use environment variables. Here are the available configuration parameters:
| Environment Variable | Default Value | Description |
| ------------------------ | ----------------------------------- | ----------------------------------------------------------------- |
| `HDU_ADDRESS` | `:8080` | The address and port on which the service will listen. |
| `HDU_API_TOKEN` | Required | Your Hetzner API token for authentication. |
| `HDU_RECORD_ID` | Required | The ID of the DNS record to be updated. |
| `HDU_ZONE_ID` | Required | The ID of the DNS zone where the record resides. |
| `HDU_RECORD_NAME` | `@` | The DNS record name to be updated (e.g., subdomain). |
| `HDU_RECORD_TTL` | `60` | Time to live (TTL) for the DNS record in seconds. |
| `HDU_INTERVAL` | `5m` | The interval at which the service checks for IP address changes. |
| `HDU_METRICS_ENABLED` | `false` | Enable or disable Prometheus metrics. |
| `HDU_METRICS_TOKEN` | | Token to secure access to Prometheus metrics when enabled. |
| `HDU_PUBLIC_IP_PROVIDER` | `https://api.ipify.org?format=text` | The api url to a route that returns your public ip as plain text. |## Metrics
When Prometheus metrics are enabled (`HDU_METRICS_ENABLED=true`), the service exposes the following metrics in Prometheus format at the `/metrics` route:
| Name | Type | Description |
| ------------------ | ------- | ----------------------------- |
| hdu_total_updates | Counter | Number of ddns updates |
| hdu_failed_updates | Counter | Number of failed ddns updates |These metrics provide insights into the update activity of the service, helping you monitor its performance and reliability.
## Running with Docker
You can easily run hetzner-ddns-updater as a Docker container. Here's an example command to start the service:
```shell
docker run -d \
-e "HDU_API_TOKEN=" \
-e "HDU_RECORD_ID=" \
-e "HDU_ZONE_ID=" \
-p 8080:8080 \
ghcr.io/davidborzek/hetzner-ddns-updater:latest
```