Simple script for exposing a local server with Vercel DNS. It runs on CRON, checking the current IP address and updating DNS records for your domain.
- Ensure that you have jq installed
- Download
dns-sync.sh
- Move
dns.config.example
todns.config
- Edit the configuration variables as required
- Open the cron settings using the command
crontab -e
- Add the following line to the cron job:
*/15 * * * * /path-to/vercel-ddns/dns-sync.sh
# Creating
β ./dns-sync.sh
Updating IP: x.x.x.x
Record for SUBDOMAIN does not exist. Creating...
π Done!
# Updating
β ./dns-sync.sh
Updating IP: x.x.x.x
Record for SUBDOMAIN already exists (id: rec_xxxxxxxxxxxxxxxxxxxxxxxx). Updating...
π Done!