dokeraj/dynu-updater

By dokeraj

Updated over 4 years ago

python script that updates dynu.com hostnames (armhf and amd64)

Image
Networking
Developer tools
Web servers
5

100K+

dokeraj/dynu-updater repository overview

This is a simple python script that updates the ip address on dynu.com service.

Use the tag latest for armhf and amd64 architecture

Supported Architectures

  • armhf - Raspberry Pi 3 and 4
  • amd64

Usage

docker create \
--name=dynuUpdater \  
-e USERNAME=YOUR_DYNU_USERNAME \
-e PASSWORD=YOUR_DYNU_PASSWORD \
-e HOSTNAMES=YOUR_HOSTNAMES_TO_UPDATE \
-e DYNU_UPDATE_URL=DYNU_UPDATE_API_URL #optional \
-e IP_SOURCES=PUBLIC_IP_ADDRESS_API_URL #optional \
-e REFRESH_TIME=TIME_IN_SECONDS #optional
-p 1050:1050 \
-e TZ="Europe/London" \
--restart unless-stopped \
dokeraj/dynu-updater:latest

Environment variables

Environment variableFunction
USERNAMEMandatory. This is your dynu login username.
PASSWORDMandatory. This is your dynu login password.
HOSTNAMESMandatory. This are your domains that you want to update. They should be comma separated like this www.mydomain.com,www.someotherdomain.com. If you got only one, than just input that one
DYNU_UPDATE_URLOptional. This is the official Dynu endpoint URL http://api.dynu.com/nic/update. If it is not specified, it will default to it automatically.
IP_SOURCESOptional. This is an URL to API that can resolve your external IP. If it is not specified it will default to ipify.org
REFRESH_TIMEOptional. This environment var defines the time interval (in seconds) that the dynu's API will be called. The default number is 300 (5 minutes). So every five minutes the script will be called and will ask IP update from dynu's endpoint.
TZOptional. Use the proper timezone, as the script's log shows warnings (APscheduler is being used to make the interval calls)

Additionally you can bind a port, and if you use a monitoring tool (like uptime-kuma), you can make API calls to the service using http://your_local_ip_to_server:1050/status. This endpoint will return the last responses from ipfy (IP_SOURCES) and dynu (DYNU_UPDATE_URL) - the last time that the check was ran. The response codes can be 200 for successful response from dynu, or 400 if there was any kind of error.

Example

docker create --name=dynuUpdater -p 1050:1050 -e USERNAME=myUsername -e PASSWORD=myPass -e HOSTNAMES=example.com -e REFRESH_TIME=3600 -e TZ="Europe/Skopje" --restart unless-stopped dokeraj/dynu-updater:latest

Tag summary

Content type

Image

Digest

Size

25 MB

Last updated

over 4 years ago

docker pull dokeraj/dynu-updater