This repo is a fork from transip-dyndns but actually a complete refactor (including new config structure). Keeps dns entries on transip for one or multiple domains up to date with the current WAN IP (or custom content).
- Update multiple domains and their entries
- Interval (by default every 1h)
- Docker support
In the data folder there is an example file call config-example.json
. rename that file as config.json
and configure it as below demonstrated.
{
"transip": {
"login": "User",
"privateKeyPath": "/secrets/private.key"
},
"domainsToCheck": {
"domains": [
{
"domain": "example.net",
"dnsEntries": [
{
"name": "@",
"type": "A"
},
{
"name": "prefix",
"type": "CNAME",
"content": "@"
}
]
}
]
},
"logLevel": "info",
"dnsCheckInterval": "30m"
}
Note: every dnsEntry needs to contain at least a name and type.
name { String } (required)
type { String } (required)
More info here
Its also possible to use environment variables.
TRANSIP_LOGIN=username
TRANSIP_PRIVATE_KEY=/secrets/id_rsa.transip>
DOMAINS_TO_CHECK={ "domains": [ { "domain": "example.net", "dnsEntries": [ { "name": "@", "type": "AAAA", "content": "1.2.3.4" } ] } ] }
# Optional
WAN_CHECK_SERVICE_URL=https://api.ipify.org
You could also run it locally
git clone git@github.com:frankforpresident/transip-dynamic-dns.git
cd transip-dynamic-dns
pip install python-transip schedule
python transip-ddns.py
Also available as a docker image.
docker pull frankforpresident/transip-dynamic-dns:latest
To run the container we need to mount 2 volumes.
- Directory where the privateKey 🔑 can be found.
- Directory where the config file 📄 is stored.
docker run -t -v ~/.secrets/private.key:/secrets/private.key:ro -v ~/transip-dynamic-dns/data:/data ~/transip-dynamic-dns/log/output.log:/log/output.log frankforpresident/transip-dynamic-dns
dyndns:
image: frankforpresident/transip-dynamic-dns
container_name: "transip-dynamic-dns"
restart: always
volumes:
- ~/transip-dynamic-dns/data:/data
- ~/transip-dynamic-dns/log/output.log:/log/output.log
- ~/.secrets/private.key:/secrets/private.key:ro