Tool to automatically update an A Record with the Hetzner DNS API when the public IP-Adress changes.
API Docs: https://dns.hetzner.com/api-docs/
This script checks every 6 hours if the public IP-Adress has changed, if yes a configured A Record will be updated with the new IP-Adress.
Anyone who has a non-static IP-Adress that needs to have a working DNS Record.
NOTE: PLEASE LEAVE THE credentials.json
& adress.json
UNTOUCHED. Those files are needed to make the script run properly!
- Download the source code
- Create an API token here and save it directly in the
config.json
file (Replace the URL with your token) - Install all required packages with
npm i
- Run the
setup.js
withnpm run setup
and follow it's instructions - Run the main script with
node .
- Extra Steps: Run the software in a screen on a raspberry pi and configure it as a service. Read here for more information about adding a service