A minimalist dynamic DNS service
Features
- No ads, no tracking, no nonsense
- Get a name in seconds, no account required
- Easy, forgiving HTTP-based API
- Multiple domains (all resolve the same): - your-name.myaddr.tools - your-name.myaddr.dev (on the HSTS preload list) - your-name.myaddr.io
- ACME dns-01 challenge support for TLS certificates from CAs like Let's Encrypt
First we need simple bash script inside /usr/local/bin. I will name this script updatedns.sh. All what you need to change here is YOURKEY value with your key.
#!/bin/bash
curl -d key=YOURKEY -d ip=self https://myaddr.tools/update
Set permission: chmod +x /ust/local/bin/updatedns.sh
Now we create service script here /etc/systemd/system/myaddrdns.service
[Unit]
Description=Update MyAddr.tools DNS Entries
[Service]
ExecStart=/usr/local/bin/updatedns.sh
[Install]
WantedBy=default.target
Enable and start service: sudo systemctl enable myaddrdns.service && sudo systemctl start myaddrdns.service
As we need to send API request every 90 days to keep our free domain active, we must set systemd times as well here /etc/systemd/system/myaddrdns.timer. In case you have static IP, timer can run weekly.
[Unit]
Description=Update MyAddr.tools DNS Entries
[Timer]
OnCalendar=weekly
Persistent=true
[Install]
WantedBy=timers.target
Enable and start service: sudo systemctl enable myaddrdns.timer && sudo systemctl start myaddrdns.timer
For testing I advice you to start with value "minutely" and replace it or not later on with "weekly", when you are sure that everything is working as it should.
Check if timer is listed: systemctl list-timers
, you should see:
Check logs: watch -n 5 journalctl -u myaddrdns.service