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.

108 lines
2.3 KiB
Markdown

5 years ago
# DDclient in docker
5 years ago
###### guide by example
5 years ago
# Purpose
5 years ago
Automatic DNS entries update. Useful if no static IP from ISP.
5 years ago
* [Official site](https://sourceforge.net/p/ddclient/wiki/usage/)
5 years ago
* [Github](https://github.com/ddclient/ddclient)
5 years ago
* [DockerHub](https://hub.docker.com/r/linuxserver/ddclient)
5 years ago
5 years ago
# Files and directory structure
5 years ago
```
5 years ago
/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
```
`.env`
```
# GENERAL
MY_DOMAIN=blabla.org
DEFAULT_NETWORK=caddy_net
TZ=Europe/Prague
#LINUXSERVER.IO
PUID=1000
PGID=1000
5 years ago
```
5 years ago
# Configuration
5 years ago
5 years ago
Official ddclient config example
[here](https://github.com/ddclient/ddclient/blob/master/sample-etc_ddclient.conf)
5 years ago
Make sure A-records exist on cloudflare.
5 years ago
`ddclient.conf`
```
5 years ago
daemon=600
5 years ago
syslog=yes
mail=root
mail-failure=root
5 years ago
pid=/var/run/ddclient/ddclient.pid
5 years ago
ssl=yes
use=web, web=checkip.dyndns.org/, web-skip='IP Address'
wildcard=yes
##
## CloudFlare (www.cloudflare.com)
##
protocol=cloudflare, \
zone=blabla.org, \
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
5 years ago
blabla.org,*.blabla.org,subdomain.blabla.org
5 years ago
##
protocol=cloudflare, \
zone=blabla.tech, \
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
5 years ago
blabla.net,*.blabla.net,whatever.blabla.org
5 years ago
```
5 years ago
# Update
5 years ago
5 years ago
* [watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower)
updates the image automaticly
5 years ago
5 years ago
* manual image update</br>
`docker-compose pull`</br>
`docker-compose up -d`</br>
`docker image prune`