DIY Dynamic DNS Using Netlify API
I don't really need to send many calls back to my network at my house when I am away, but when I want to show someone the progress we are making on the family Minecraft Christmas village, it is nice to be able to call to a Mapcrafter server at my house.
This is the current family Minecraft Christmas Village. The image is generated by Mapcrafter using this group of Bash scripts. |
Now I don't have a business internet line at my house, so my IP can change theoretically at any time. I have looked at a few services offering Dynamic DNS, however, some didn't fit my needs. Also they all cost money, and my preference would be to not spend any money if I don't have to.
I found some projects on Github that communicate with the Netlify API using an access token to update the domain entry dynamically, however, I wanted to try to make something simpler than other projects I tried. Since I've been playing with my Plex Media Server, I've been on a Bash script kick, so I figured I would try to create a Bash script for this I could run through cron.
The main tool for this job, other than Bash and the Netlify API, is jq. It is a lightweight command-line tool for handling everything JSON-related. This script requires jq is installed, but shouldn't have any other dependencies. If you try it out, let me know what you think.
Worked perfectly first time! Thanks very much :)
ReplyDeleteAwesome! Glad to hear it is working for you! :)
Deletejq is awesome! Hard for me to grasp, but awesome! https://www.adamkoch.com/tech/jq/
ReplyDelete