navilg / godaddy-ddns

Dynamic DNS with GoDaddy
https://medium.com/linux-shots
MIT License
53 stars 14 forks source link
ddns dynamic-ip godaddy godaddy-api godaddy-ddns godaddy-dns godaddy-dns-records

README

"Buy Me A Coffee"

What is this repository for?

Features

How to setup

Docker repository: https://hub.docker.com/r/linuxshots/godaddy-ddns

docker pull linuxshots/godaddy-ddns:latest

For DNS myserver.example.com with ttl 1200 seconds

# For linux running on amd64
docker run --name myserver.example.com -d --restart unless-stopped --env GD_NAME=myserver --env GD_DOMAIN=example.com --env GD_TTL=1200 --env GD_KEY=key-value-from-godaddy-developer-console --env GD_SECRET=secret-key-value-from-godaddy-developer-console linuxshots/godaddy-ddns:latest
docker logs myserver.example.com

Non-Docker way - DEPRACATED

curl -LO https://raw.githubusercontent.com/navilg/godaddy-ddns/master/assets/install.sh
sudo bash install.sh

To install specific version. E.g. Version v1.0.0

sudo bash install.sh v1.0.0
sudo systemctl status godaddy-ddns.service

For DNS myserver.example.com with ttl 1200 seconds

godaddyddns add --domain='example.com' --name='myserver' --ttl=1200 --key='kEyGeneratedFr0mG0DaddY' --secret='s3cRe7GeneratedFr0mG0DaddY'
tail -200f $HOME/.config/godaddy-ddns/log/godaddy-ddns.log
sudo godaddyddns-uninstall.sh

GoDaddy DDNS usage (For Non-docker way) - DEPRECATED

godaddyddns -h
godaddyddns add --domain='example.com' --name='myserver' --ttl=1200 --key='kEyGeneratedFr0mG0DaddY' --secret='s3cRe7GeneratedFr0mG0DaddY'

Output:

INFO 2022/03/26 19:34:00 myserver.example.com Record created/updated (ttl: 1200, ip: 222.48.150.132, key: ****, secret: ****)
godaddyddns list

Output:

+---+-----------+-------------+------+
| # | NAME      | DOMAIN      |  TTL |
+---+-----------+-------------+------+
| 1 | myserver  | example.com | 1200 |
| 2 | myserver2 | example.com | 1300 |
+---+-----------+-------------+------+
godaddyddns update --domain='example.com' --name='myserver' --ttl=1300 --key='kEyGeneratedFr0mG0DaddY' --secret='s3cRe7GeneratedFr0mG0DaddY'

Output:

INFO 2022/03/26 19:34:27 myserver.example.com Record created/updated (ttl: 1300, ip: 222.48.150.132, key: ****, secret: ****)
godaddyddns delete --domain='example.com' --name='myserver'

Output:

INFO 2022/03/26 19:35:34 myserver.example.com Record removed from configuration. If not in use, delete the record manually from GoDaddy console.

NOTES:

Contribution guidelines

How to reach me ?