I registered a domain with Onamae.com, so I set up DDNS to automatically register the IP address of my home server.
Configuration
Updating Onamae.com DDNS from a script
You can do this easily by borrowing the knowledge from the site above.
(I modified it a little for my own use.)
Set it in cron and you are done.
*/15 * * * * root /usr/local/bin/onamae.com_dns_update.py > /var/log/onamae_dns_update.log 2>&1
Test Environment
- Ubuntu 18.04
- Raspberry Pi 3

Me
Thanks for the convenient script. It makes this very easy.