Simple One-Line shell script to update your DNS records with DigitalOcean API, that makes use of ipify.org API to retrieve your IP.
- curl
- Connect your Domain to DigitalOcean DNS
- Set the
DODYN_DOMAIN
Environment Variable to your root Domain (not a subdomain!), example:ushakov.co
- Get a Personal Access token on API Page and set the
DODYN_TOKEN
Environment Variable - Find out your Record ID (guide) and set the
DODYN_RECORD
Environment Variable - Make sure the script is executable, if not
chmod +x dodyn.sh
- Test the script manually, the output should be like this:
- Set up a cronjob to automatically update your record each 30 minutes (recommended amount of time)
*/30 * * * * dodyn.sh
- (When running at home) Make sure your ports are open
Thank you.