Application to use your DigitalOcean account/service as a dynamic DNS service. https://gitlab.no/rune/DO_DynDNS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rune Olsen 8fc18f83fc updated readme 1 week ago
.gitignore Added cli app + some small changes... 1 week ago
README.md updated readme 1 week ago
dyndns-cli.py Added license 1 week ago
dyndns_screen_1.png initial commit... 1 week ago
license.txt Added license 1 week ago
main.py Added license 1 week ago
utils.py initial commit... 1 week ago

README.md

DO DynDNS

DO DynDNS is a small Python app that can:

  • Lets you add new DNS records to your DigitalOcean Network service.
  • Adds records from your DigitalOcean Network service.
  • Lists all sub domains on your Dynamic DNS domain.
  • Update IP address for your Dynamic DNS records.
  • Remove records from the application - not from DigitalOcean Network service.

Screen shot

Installation

  • Download the tar.gz file from the relase page
  • Untar it and run ./install.sh (remember to read/review the install.sh with a text editor)
  • The install.sh command will copy the files (dyndns and dyndns-cli) to /usr/local/bin and create a .desktop file in /usr/share/applications/ for the main application (dyndns)
  • Run by executing dyndns from terminal or by searching for it in your DM.

The first run will create two files:

  • ~/.config/dyndns/config.ini
  • ~/.config/dyndns/dyndns.log

You will need edit the config.ini file in your favourite editor.

[DYNDNS]

'api_key': '<API KEY> from Digital Ocean at https://cloud.digitalocean.com/api_access',
'baseuri': 'example.tld',
'logfile': 'dyndns.log'

The API key you need to get from you DigitalOcean account. The baseuri are the top level domain you want to use as the base for your dynamic DNS solution.

The logfile can be named anything, but the ~/.config/dyndns/dyndns.log was created for you. So you don’t need to change that.

The .desktop file will look for an icon “dyndns.png” in ~/.config/dyndns/. You can copy your own icon to that folder and name it “dyndns.png” or you can copy the icon in the un-zipped folder. The application itself will also look for “dyndns.png” in the folder ~/.config/dyndns/

dyndns-cli

This is the companion app for the gui app. This is meant to be executed via crontab.

It uses the same config.ini file as the main app and updates all the domains found in the config file - where the IP address on DigitalOcean Network service differs from your local IP address.

Edit crontab by executing crontab -e and add the app to it.

Eg. to run once every other hour add the following line to your crontab:

0 */2 * * * dyndns-cli >/dev/null 2>&1

Todo

  • Create a companion app that can be executed in crontab.
  • Add functionality to delete a record from DigitalOcean Network service.
  • Maybe add IPv6 functionality…

Note

If you want to run a dynamic DNS solution on a server (eg. not you main machine) you could use the standalone command line (cli) application py-dyndns. This application uses its own config.ini on the machine it is running on. Follow the instructions on the app’s git page.

License

GPLv3