selfhosted-apps-docker/ddclient/readme.md

108 lines
2.2 KiB
Markdown
Raw Normal View History

2020-04-25 11:35:54 +00:00
# DDclient in docker
2020-04-09 22:52:11 +00:00
###### guide by example
2020-04-25 11:37:41 +00:00
# Purpose
2020-04-09 22:52:11 +00:00
Automatic DNS entries update. Useful if no static IP from ISP.
2020-04-25 11:40:05 +00:00
* [Official site](https://sourceforge.net/p/ddclient/wiki/usage/)
2020-04-09 22:52:11 +00:00
* [Github](https://github.com/ddclient/ddclient)
2020-04-25 11:31:51 +00:00
* [DockerHub](https://hub.docker.com/r/linuxserver/ddclient)
2020-04-09 22:52:11 +00:00
2020-04-25 11:37:41 +00:00
# Files and directory structure
2020-04-09 22:52:11 +00:00
2020-04-25 23:04:12 +00:00
```
2020-05-01 09:38:43 +00:00
/home/
└── ~/
└── docker/
└── ddclient/
├── .env
├── docker-compose.yml
└── ddclient.conf
2020-04-25 23:04:12 +00:00
```
2020-04-25 11:31:51 +00:00
# docker-compose
2020-04-25 23:04:59 +00:00
[Based on linuxserver.io](https://hub.docker.com/r/linuxserver/ddclient)
2020-04-25 23:04:12 +00:00
`docker-compose.yml`
```yml
version: "2.1"
services:
ddclient:
image: linuxserver/ddclient
hostname: ddclient
container_name: ddclient
restart: unless-stopped
env_file: .env
volumes:
- ./ddclient.conf:/config/ddclient.conf
restart: unless-stopped
```
`.env`
```bash
# GENERAL
MY_DOMAIN=blabla.org
DEFAULT_NETWORK=caddy_net
TZ=Europe/Prague
#LINUXSERVER.IO
PUID=1000
PGID=1000
```
2020-04-09 22:52:11 +00:00
2020-04-25 11:35:54 +00:00
# Configuration
2020-04-09 22:52:11 +00:00
2020-04-25 11:31:51 +00:00
Official ddclient config example
2020-04-27 21:01:48 +00:00
[here](https://github.com/ddclient/ddclient/blob/master/sample-etc_ddclient.conf).
This setup assumes the DNS are managed Cloudflare.
Make sure all subdomains in the config have A-records on Cloudflare.
2020-04-09 22:52:11 +00:00
2020-04-25 23:04:12 +00:00
`ddclient.conf`
```bash
daemon=600
syslog=yes
mail=root
mail-failure=root
pid=/var/run/ddclient/ddclient.pid
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 \
blabla.org,*.blabla.org,subdomain.blabla.org
2020-04-25 23:06:08 +00:00
##
2020-04-25 23:04:12 +00:00
protocol=cloudflare, \
2020-04-25 23:06:49 +00:00
zone=blabla.net, \
2020-04-25 23:04:12 +00:00
ttl=1, \
login=bastard.blabla@gmail.com, \
password=global-api-key-goes-here \
blabla.net,*.blabla.net,whatever.blabla.org
```
2020-04-09 22:52:11 +00:00
2020-04-25 11:31:51 +00:00
# Update
2020-04-09 22:52:11 +00:00
2020-05-01 09:51:20 +00:00
* [watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower)
updates the image automaticly
2020-04-09 22:52:11 +00:00
2020-05-01 09:51:20 +00:00
* manual image update</br>
`docker-compose pull`</br>
`docker-compose up -d`</br>
`docker image prune`