Skip to main content

Godaddy IP

Maintains A and CNAME records matching current ip in Godaddy.

Install

pip install godaddyip

This installs a script called godaddyip.

Example use case

With the following configuration file, the daemon will maintain one A record named my.domain.com to the ip of the server the daemon is running on. It will also maintain two CNAME records www.my.domain.com and mail.my.domain.com to my.domain.com.

arecord: my
key:     mygodaddykey
secret:  mygodaddysecret
domain:  domain.com
cnames:
  - www
  - mail

Configuration

Configuration files are searched in one of the following locations. Last configuration file found takes precendence.

  • /etc/godaddyip/godaddyip.yaml
  • ~/.config/godaddyip/godaddyip.yaml
  • ./config/godaddyip.yaml

You can override the above list of searched paths by giving the --config_files=path[,path,...] argument.

Adding or removing rules to a configuration file is done by using the configure argument:

godaddyip <config_file.yaml> arecord ARECORD
godaddyip <config_file.yaml> key KEY
godaddyip <config_file.yaml> secret SECRET
godaddyip <config_file.yaml> domain DOMAIN
godaddyip <config_file.yaml> add-cname CNAME
godaddyip <config_file.yaml> del-cname CNAME

Run

Running the daemon is done by using the run argument:

godaddyip run [--config_files CONFIG_FILES]

Example output:

$ python -m godaddyip run --config_files test.yaml
Current ip: "100.99.98.97"
Previous ip: "None"
Sleeping for 5 minutes.
Current ip: "100.99.98.97"
Previous ip: "100.99.98.97"
Same ip as previous one, nothing to do
Sleeping for 5 minutes.

Using systemd

The daemon can start when the system starts by creating a systemd unit file like the following one in /etc/systemd/system/godaddyip.service.

[Unit]
Description=Godaddy ip service
After=network.target

[Service]
User=godaddyip
Group=godaddyip
ExecStart=/usr/bin/godaddyip run
ExecReload=/bin/kill -s usr1 $MAINPID

[Install]
WantedBy=default.target

I advice running the daemon with a non-root user. A system user can be created with useradd --system godaddyip.

Metadata

Release files for godaddyip 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for godaddyip 0.1.3
File Size Uploaded
godaddyip-0.1.3.tar.gz 4.9 kB Details

Release files / godaddyip-0.1.3.tar.gz

Download URL godaddyip-0.1.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
687d4a3b39ba0b8220ffdda4af01c226eb3261c0eed588dadc8c5cf225757f3d
BLAKE2b-256 checksum
How to use checksums
2f9db287cf773b4067b18343ebf7c104aa1a8ecd7f166a5a03daeb8f8772a08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page