Setup guides
Keep your hostname pointing at your IP, whatever you run
Something in your network calls an update URL every few minutes. We read your public IP from the connection and point your hostname at it. Pick one device that is always on: your router, a NAS, a Raspberry Pi, a server or a PC. The update URL with your token is:
The token only allows updating this one hostname, so it is safe to put in scripts and routers. Where a device asks for a username and password, use your hostname and the token.
Run crontab -e and add this line to update every 5 minutes:
Open Command Prompt as administrator and run this once. It creates a scheduled task that updates every 5 minutes in the background (Windows 10 and later include curl.exe):
To remove it later: schtasks /delete /tn "MyDNS update"
Or in docker-compose.yml:
Add this to configuration.yaml and restart Home Assistant:
If your automations live in automations.yaml, put the automation there instead (without the automation: line).
Install luci-app-ddns (System → Software), then go to Services → Dynamic DNS → Add new service:
HTTPS needs curl or wget-ssl and ca-certificates installed.
Services → Dynamic DNS → Add:
Leave the other fields empty.
Install the os-ddclient plugin, then Services → Dynamic DNS → Add:
/etc/ddclient.conf:
The use=web line makes ddclient send your public IP, not a local 192.168.x.x address.
Internet → Permit Access → DynDNS, tick "Use DynDNS":
Control Panel → External Access → DDNS → Customize Provider:
Then Add, choose the MyDNS provider, and enter yourhost.mydns.se as hostname and anything as username and password.
Synology may show the status as failed because it doesn't recognise our reply. Check the status on the settings page instead.
Many routers only offer a fixed list of DDNS providers and can't use a custom one. In that case, run the update from another device in the same network (see Linux, Windows, Docker or Home Assistant above).
ASUS with Asuswrt-Merlin firmware: enable JFFS custom scripts, choose "Custom" under WAN → DDNS, and create /jffs/scripts/ddns-start:
Make it executable: chmod +x /jffs/scripts/ddns-start
Get a free certificate for your hostname, including a wildcard (*.yourhost.mydns.se), using DNS validation. You don't need to open any ports.
acme.sh
Certbot
Create two hook scripts and make them executable (chmod +x):
Other clients
Any client that can call a URL can use the TXT API:
This sets TXT records on _acme-challenge.yourhost.mydns.se. Replies are OK or ERROR <reason>. Records are visible within about 30 seconds and are removed automatically after a day.
The settings page shows when the last update arrived and lists failed attempts with the reason, the IP they came from and the client that sent them. Common causes:
- Wrong password or token: copy the token again from the settings page.
- Nothing shows up at all: the device isn't sending updates. Open the update URL in a browser to test.
- Wrong IP: if the update runs over a VPN, your hostname gets the VPN's IP. Run it from a device that doesn't use the VPN.