Dynamic DNS tool for TransIP
My domains, like stuvel.eu and stüvel.eu, are hosted by TransIP. I’m in the
process of moving all my websites to some hardware at home, and my ISP contract
does not give me a fixed IP-adress. And since I didn’t like the solutions I
found online, I made my own.
TransIP DynDNS is a tool that periodically checks its own public IP address, and if it changed, uses the TransIP API to update DNS records. That way, these records are always pointing to the right address, ensuring my websites remain reachable.
Example Configuration
general:
IPv4: true
IPv6: false # Unfortunately my current ISP doesn't offer IPv6 yet.
watch-period: 5m
account:
username: TRANSIP_USERNAME
private-key: /path/to/transip-dyndns.pem # Private key obtained from TransIP.
records:
# Expanded notation:
- domain: example.com
entry: my-home
type: A
# Collapsed notation:
- { domain: "example.com", entry: "my-home", type: A }
# By not specifying the type, both A and AAAA records will be updated.
# This also depends on whether IPv4/IPv6 are disabled above.
- { domain: "example.com", entry: "my-home" }
# Types other than A or AAAA need an explicit 'content field.
# {{.IPv4}} and {{.IPv6}} will be replaced with the current IP address.
- { domain: "example.com", entry: "my-home", type: TXT,
content: "v=spf1 ip4:{{.IPv4}} ip6:{{.IPv6}} include:thirdpartydomain.com -all" }
There’s more information in the README file.
Thanks
Many thanks to J Lentink for making a similar tool, and releasing it under the MIT license. It helped me to build this tool, which is a bit simpler to use. Mine has a smaller config, is therefore easier to update, and it performs less API calls.