This is a dockerized python script updating the IP for a domain on freenom.com. It partly relies on code of the pip package "freenom-dns-updater".
There are two versions available. A default version and one that sends some login information to a designated telegram chat.
It can also be used to forward some loging to a telegram chat of choice with a telegram bot of choice. (Both needs to be configured beforehand)
Copy the repository is cloned, first you need to create a json containing your domain data formated like so (while multiple entries in the domains list are possible):
[
{
"domain": "example.com",
"domain_id": "arbitrary-id",
"records": [
{
"line": "",
"type": "CNAME",
"name": "WWW.EXAMPLE.COM",
"ttl": "3600",
"value": "example.com",
},
<more records>
]
"current_ip": <current ip or empty string>
},
<possibly other domains>
]
You can build/run the containers both via docker run and docker-compose.
Those env variables has to be set when the image is run:
- FREENOM_EMAIL (your freenom login)
- FREENOM_PW (your freenom password)
version: '3'
services:
ddns_updater:
image: ddns_updater
container_name: ddns_updater
build: .
environment:
- "FREENOM_EMAIL= < login >"
- "FREENOM_PW= < password >"
volumes:
- app-data:/usr/src/app/data
volumes:
app-data: