2026-10-15 14:22:20 216.73.217.100

Setup guides

Keep your hostname pointing at your IP, whatever you run

Replace yourhost.mydns.se and YOUR_TOKEN with your hostname and update token from the settings page. Log in and this page fills them in for you.
How updates work

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:

https://mydns.se/u.php?t=YOUR_TOKEN

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.

Linux, macOS, Raspberry Pi

Run crontab -e and add this line to update every 5 minutes:

*/5 * * * * curl -s "https://mydns.se/u.php?t=YOUR_TOKEN" >/dev/null
Windows

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):

schtasks /create /tn "MyDNS update" /sc minute /mo 5 /ru SYSTEM /tr "curl.exe -s https://mydns.se/u.php?t=YOUR_TOKEN"

To remove it later: schtasks /delete /tn "MyDNS update"

Docker
docker run -d --name mydns --restart unless-stopped --entrypoint sh curlimages/curl \ -c 'while true; do curl -s "https://mydns.se/u.php?t=YOUR_TOKEN"; echo; sleep 300; done'

Or in docker-compose.yml:

services: mydns: image: curlimages/curl restart: unless-stopped entrypoint: ["sh", "-c", "while true; do curl -s 'https://mydns.se/u.php?t=YOUR_TOKEN'; echo; sleep 300; done"]
Home Assistant

Add this to configuration.yaml and restart Home Assistant:

rest_command: mydns_update: url: "https://mydns.se/u.php?t=YOUR_TOKEN" automation: - alias: "Update mydns.se" trigger: - platform: time_pattern minutes: "/5" action: - service: rest_command.mydns_update

If your automations live in automations.yaml, put the automation there instead (without the automation: line).

OpenWrt

Install luci-app-ddns (System → Software), then go to Services → Dynamic DNS → Add new service:

DDNS Service provider: -- custom -- Custom update-URL: https://mydns.se/u.php?h=[DOMAIN]&t=[PASSWORD] Lookup Hostname: yourhost.mydns.se Domain: yourhost.mydns.se Username: yourhost.mydns.se Password: YOUR_TOKEN Use HTTP Secure: checked

HTTPS needs curl or wget-ssl and ca-certificates installed.

pfSense

Services → Dynamic DNS → Add:

Service Type: Custom Interface: WAN Update URL: https://mydns.se/u.php?t=YOUR_TOKEN

Leave the other fields empty.

OPNsense

Install the os-ddclient plugin, then Services → Dynamic DNS → Add:

Service: Custom Protocol: DynDNS2 Server: mydns.se Username: yourhost.mydns.se Password: YOUR_TOKEN Hostname(s): yourhost.mydns.se Check ip method: Interface (WAN)
ddclient

/etc/ddclient.conf:

protocol=dyndns2 use=web, web=https://mydns.se/ip?plain ssl=yes server=mydns.se login=yourhost.mydns.se password='YOUR_TOKEN' yourhost.mydns.se

The use=web line makes ddclient send your public IP, not a local 192.168.x.x address.

AVM Fritz!Box

Internet → Permit Access → DynDNS, tick "Use DynDNS":

DynDNS provider: User-defined Update URL: https://mydns.se/u.php?t=YOUR_TOKEN Domain name: yourhost.mydns.se Username: yourhost.mydns.se Password: YOUR_TOKEN
Synology NAS

Control Panel → External Access → DDNS → Customize Provider:

Service provider: MyDNS Query URL: https://mydns.se/u.php?t=YOUR_TOKEN

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.

ASUS, TP-Link, Netgear and other routers

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:

#!/bin/sh if curl -fs "https://mydns.se/u.php?t=YOUR_TOKEN" >/dev/null; then /sbin/ddns_custom_updated 1 else /sbin/ddns_custom_updated 0 fi

Make it executable: chmod +x /jffs/scripts/ddns-start

HTTPS certificates with Let's Encrypt

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

curl -o ~/.acme.sh/dnsapi/dns_mydns.sh https://mydns.se/dns_mydns export MYDNS_Token="YOUR_TOKEN" acme.sh --issue --dns dns_mydns -d yourhost.mydns.se -d '*.yourhost.mydns.se'

Certbot

Create two hook scripts and make them executable (chmod +x):

# /etc/letsencrypt/mydns-auth.sh #!/bin/sh curl -s "https://mydns.se/txt?h=$CERTBOT_DOMAIN&t=YOUR_TOKEN&txt=$CERTBOT_VALIDATION" sleep 30
# /etc/letsencrypt/mydns-cleanup.sh #!/bin/sh curl -s "https://mydns.se/txt?h=$CERTBOT_DOMAIN&t=YOUR_TOKEN&txt=$CERTBOT_VALIDATION&clear=1"
certbot certonly --manual --preferred-challenges dns \ --manual-auth-hook /etc/letsencrypt/mydns-auth.sh \ --manual-cleanup-hook /etc/letsencrypt/mydns-cleanup.sh \ -d yourhost.mydns.se -d '*.yourhost.mydns.se'

Other clients

Any client that can call a URL can use the TXT API:

Add: https://mydns.se/txt?h=yourhost.mydns.se&t=YOUR_TOKEN&txt=VALUE Remove: https://mydns.se/txt?h=yourhost.mydns.se&t=YOUR_TOKEN&txt=VALUE&clear=1 Remove all: https://mydns.se/txt?h=yourhost.mydns.se&t=YOUR_TOKEN&clear=1

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.

Not working?

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.