This commit is contained in:
DoTheEvolution
2020-04-25 13:31:51 +02:00
parent 3166022227
commit d4118e8b53
+62 -17
View File
@@ -1,33 +1,76 @@
# ddclient
# ddclient in docker
###### guide by example
### purpose
# purpose
Automatic DNS entries update. Useful if no static IP from ISP.
* [Github](https://github.com/ddclient/ddclient)
* [DockerHub](https://hub.docker.com/r/linuxserver/ddclient)
### files and directory structure
# files and directory structure
```
/etc
└── ddclient
└── 🗋 ddclient.conf
/home
└── ~
└── docker
└── ddclient
├── 🗁 config
│ └── 🗋 ddclient.conf
├── 🗋 .env
└── 🗋 docker-compose.yml
```
# docker-compose
[Based on linuxserver.io](https://hub.docker.com/r/linuxserver/ddclient).
`docker-compose.yml`
```
version: "2.1"
services:
ddclient:
image: linuxserver/ddclient
hostname: ddclient
container_name: ddclient
restart: unless-stopped
env_file: .env
volumes:
- ./config:/config
restart: unless-stopped
```
### configuration
`.env`
Example is for cloudflare managed DNS.
```
# GENERAL
MY_DOMAIN=blabla.org
DEFAULT_NETWORK=caddy_net
TZ=Europe/Prague
#LINUXSERVER.IO
PUID=1000
PGID=1000
```
# configuration
Official ddclient config example
[here](https://github.com/ddclient/ddclient/blob/master/sample-etc_ddclient.conf)
Make sure A-records exist on
`ddclient.conf`
```
daemon=300
daemon=600
syslog=yes
mail=root
mail-failure=root
pid=/var/run/ddclient.pid
pid=/var/run/ddclient/ddclient.pid
ssl=yes
use=web, web=checkip.dyndns.org/, web-skip='IP Address'
@@ -41,7 +84,7 @@ Example is for cloudflare managed DNS.
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
blabla.org,*.blabla.org
blabla.org,*.blabla.org,subdomain.blabla.org
##
protocol=cloudflare, \
@@ -49,13 +92,15 @@ Example is for cloudflare managed DNS.
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
blabla.tech,*.blabla.tech
blabla.net,*.blabla.net,whatever.blabla.org
```
### reverse proxy
# Update
no web interface
* [watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower)
updates the image automaticly
### update
during host linux package update
* manual image update</br>
`docker-compose pull`</br>
`docker-compose up -d`</br>
`docker image prune`