Files
selfhosted-apps-docker/ddclient/readme.md
T
DoTheEvolution 64e6b115b3 update
2020-05-10 12:17:00 +02:00

90 lines
2.3 KiB
Markdown

# DDclient in docker
###### guide by example
# Purpose & Overview
Automatic DNS entries update.
* [Official site](https://sourceforge.net/p/ddclient/wiki/usage/)
* [Github](https://github.com/ddclient/ddclient)
* [DockerHub](https://hub.docker.com/r/linuxserver/ddclient)
DDclient is a Perl client used to update dynamic DNS records.</br>
Useful if not having a static IP from ISP, so that if you reset your router,
or have power outage, and you get a new public IP assigned,
this IP gets automaticly set in the DNS records for your domains.
In this setup it works by checking every 10 minutes
[checkip.dyndns.org](http://checkip.dyndns.org/),
and if the IP changed from the previous one, it updates the DNS records.
# Files and directory structure
```
/etc/
└── ddclient/
└── ddclient.conf
```
# Installation
Install ddclient from your linux official repos.
After configuration enable the service</br>
`sudo systemctl enable --now ddclient`
# Configuration
Official ddclient config example
[here](https://github.com/ddclient/ddclient/blob/master/sample-etc_ddclient.conf).
This setup assumes the DNS records are managed Cloudflare.</br>
Make sure all subdomains in the config have A-records.
`ddclient.conf`
```bash
daemon=600
syslog=yes
mail=root
mail-failure=root
pid=/var/run/ddclient.pid
ssl=yes
use=web, web=checkip.dyndns.org/, web-skip='IP Address'
##
## CloudFlare (www.cloudflare.com)
##
protocol=cloudflare, \
zone=blabla.org, \
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
blabla.org,*.blabla.org,subdomain.blabla.org
##
protocol=cloudflare, \
zone=blobloblo.net, \
ttl=1, \
login=bastard.blobloblo@gmail.com, \
password=global-api-key-goes-here \
blobloblo.net,*.blobloblo.net,whatever.blobloblo.org
```
# Update
During host linux packages update.
# Backup and restore
#### Backup
Using [borg](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/borg_backup)
that makes daily snapshot of the /etc directory which contains the config files.
#### restore
Replace the content of the config files with the one from the backup.