You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.2 KiB
Markdown

4 years ago
# DDclient
4 years ago
###### guide by example
4 years ago
# Purpose & Overview
4 years ago
4 years ago
Automatic DNS entries update.
4 years ago
4 years ago
* [Official site](https://sourceforge.net/p/ddclient/wiki/usage/)
4 years ago
* [Github](https://github.com/ddclient/ddclient)
4 years ago
* [DockerHub](https://hub.docker.com/r/linuxserver/ddclient)
4 years ago
4 years ago
DDclient is a Perl client used to update dynamic DNS records.</br>
4 years ago
Very useful if not having a static IP from the ISP.
It makes sure that if you reset your router, or have a power outage,
and you get a new public IP assigned, this IP gets automaticly set
in the DNS records for your domains.
4 years ago
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.
4 years ago
# Files and directory structure
4 years ago
4 years ago
```
4 years ago
/etc/
└── ddclient/
└── ddclient.conf
4 years ago
```
4 years ago
4 years ago
# Installation
4 years ago
4 years ago
Install ddclient from your linux official repos.
4 years ago
4 years ago
# Configuration
4 years ago
4 years ago
Official ddclient config example
4 years ago
[here](https://github.com/ddclient/ddclient/blob/master/sample-etc_ddclient.conf).
4 years ago
This setup assumes the DNS records are managed Cloudflare.</br>
Make sure all subdomains in the config have A-records.
4 years ago
4 years ago
`ddclient.conf`
```bash
daemon=600
syslog=yes
mail=root
mail-failure=root
4 years ago
pid=/var/run/ddclient.pid
4 years ago
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
4 years ago
##
4 years ago
protocol=cloudflare, \
4 years ago
zone=blobloblo.net, \
4 years ago
ttl=1, \
4 years ago
login=bastard.blobloblo@gmail.com, \
4 years ago
password=global-api-key-goes-here \
4 years ago
blobloblo.net,*.blobloblo.net,whatever.blobloblo.org
4 years ago
```
4 years ago
4 years ago
# Start the service
`sudo systemctl enable --now ddclient`
4 years ago
# Update
4 years ago
4 years ago
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
4 years ago
4 years ago
Replace the content of the config files with the one from the backup.