Dynamic DNS with Maazul
Keep a hostname such as home.maazul.space pointed at a home or office connection whose IP address changes. Maazul updates a real DNS A or AAAA record on authoritative nameservers; there is no proxy in between, so visitors reach your device directly.
1. Before you start
- Create a free account and a subdomain with an A record (for IPv4) or an AAAA record (for IPv6).
- Open the subdomain in the dashboard and, under Dynamic DNS, click Generate token.
- Copy the token, which starts with mzl_. It is shown only once; you can revoke it and create a new one at any time.
2. The update API
POST https://maazul.com/api/ddns/update
Authorization: Bearer mzl_YOUR_TOKEN
Content-Type: application/json
{"ip": "203.0.113.7"}Leave out "ip", or send an empty body, to use the public IP address the request comes from. An IPv4 address updates the A record and an IPv6 address updates the AAAA record. Devices that can only send GET requests can call https://maazul.com/api/ddns/update?ip=203.0.113.7 with the same Authorization header.
A successful response looks like this; "changed": false means the IP was already current and nothing was modified:
{"success":true,"data":{"fqdn":"home.maazul.space","type":"A","ip":"203.0.113.7","changed":true,"status":"active"}}3. Linux, macOS or a Raspberry Pi (cron)
# crontab -e (update every 5 minutes, uses this machine's public IP) */5 * * * * curl -fsS -X POST https://maazul.com/api/ddns/update -H "Authorization: Bearer mzl_YOUR_TOKEN" > /dev/null
4. Windows (PowerShell and Task Scheduler)
# maazul-ddns.ps1 (schedule it every 5 minutes in Task Scheduler)
Invoke-RestMethod -Method Post -Uri "https://maazul.com/api/ddns/update" -Headers @{ Authorization = "Bearer mzl_YOUR_TOKEN" }5. MikroTik RouterOS
Paste these two commands in the terminal. The first creates the update script, the second runs it every 5 minutes:
/system script add name=maazul-ddns source="/tool fetch url=\"https://maazul.com/api/ddns/update\" http-method=post http-header-field=\"Authorization: Bearer mzl_YOUR_TOKEN\" output=none" /system scheduler add name=maazul-ddns interval=5m on-event="/system script run maazul-ddns"
6. Check that it works
dig +short home.maazul.space nslookup home.maazul.space
Both commands should return your current public IP address. Changes become visible within the record TTL, 300 seconds by default.
7. Troubleshooting
- 401 "Invalid DDNS token": the token is wrong or was revoked. Generate a new one in the dashboard.
- "This subdomain has no A record to update": add a record of the same IP family first (A for IPv4, AAAA for IPv6).
- 429 "Too many requests": updates are limited to 60 per hour from one IP. Every 5 minutes is more than enough.
- The subdomain was paused for inactivity: a Dynamic DNS update reactivates it automatically.
- The subdomain was suspended: updates are refused until it is reinstated. Contact us if you think this is a mistake.
Security: a token can only change the IP address of its own subdomain. Keep it private, and revoke it from the dashboard if it leaks.