forked from SensorsIot/IOTstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This container includes cron and should be easier to use than the current duck.sh script. After a test period this should completely replace the current ./duck/duck.sh script. Currently uses my fork of linuxserver/docker-duckdns to include some needed pull-requests that are pending. Depends on SensorsIot#553 to generate .env with IOTSTACK_UID and IOTSTACK_GID Mkdocs and material versions updated to fix layout bug.
- Loading branch information
Showing
5 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
duckdns: | ||
container_name: duckdns | ||
build: https://github.com/ukkopahis/docker-duckdns.git | ||
network_mode: host | ||
restart: unless-stopped | ||
environment: | ||
PUID: ${IOTSTACK_UID:?IOTSTACK_GID must be defined in ~/IOTstack/.env} | ||
PGID: ${IOTSTACK_GID:?IOTSTACK_GID must be defined in ~/IOTstack/.env} | ||
#TOKEN: define this in docker-compose.override.yml, see docs | ||
#SUBDOMAIN: define this in docker-compose.override.yml, see docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Duck DNS | ||
|
||
Duckdns is a DNS service that provides you with a domain name you can update to | ||
match your dynamic IP-address. | ||
|
||
This container automates the process to update your duckdns.org IP. | ||
|
||
## References | ||
|
||
* Register an account, add your subdomain and get your token from | ||
[http://www.duckdns.org/](http://www.duckdns.org/) | ||
* based on the linuxserver | ||
[docker-duckdns](https://github.com/linuxserver/docker-duckdns) container | ||
|
||
## Configuration | ||
|
||
Create the file `~/IOTstack/docker-compose.override.yml` and place your Duckdns | ||
token and chosen domain name there: | ||
|
||
``` yaml title="docker-compose.override.yml" | ||
version: '3.6' | ||
services: | ||
duckdns: | ||
environment: | ||
TOKEN: your-duckdns-token | ||
SUBDOMAINS: subdomain | ||
``` | ||
Observe that at least the initial update is successful: | ||
``` console | ||
$ cd ~/IOTstack | ||
$ docker-compose up -d duckdns | ||
$ docker-compose logs duckdns | ||
...SNIP... | ||
Retrieving subdomain and token from the environment variables | ||
log will be output to docker log | ||
Your IP was updated at Wed May 4 03:31:14 UTC 2022 | ||
...SNIP... | ||
``` | ||
|
||
If there is a problem, check that the resulting effective configuration of | ||
'duckdns:' looks OK: | ||
``` console | ||
$ cd ~/IOTstack && docker-compose config | ||
``` | ||
|
||
### Domain name for the private IP | ||
|
||
!!! note inline end "Example IP:s and domains" | ||
|
||
``` mermaid | ||
flowchart | ||
I([Internet]) | ||
G("Router\npublic IP: 52.85.51.71\nsubdomain.duckdns.org") | ||
R(Raspberry pi\nprivate IP: 192.168.0.100\nprivate_subdomain.duckdns.org) | ||
I --- G --- |LAN| R | ||
``` | ||
|
||
As a public DNS server, Duckdns is not meant to be used for private IPs. It's | ||
recommended that for resolving internal LAN IPs you use the [Pi | ||
Hole](Pi-hole.md) container. | ||
|
||
That said, it's possible to update Duckdns with to your LAN IP. This may be | ||
convenient if you have devices that don't support mDNS (.local) and don't want | ||
to run Pi-hole. This is especially useful if you can't assign a static IP to | ||
your RPi. Add a `PRIVATE_SUBDOMAIN` variable indicating your subdomain for | ||
this: | ||
|
||
``` yaml title="added variable to docker-compose.override.yml" | ||
version: '3.6' | ||
services: | ||
duckdns: | ||
environment: | ||
TOKEN: ... | ||
SUBDOMAINS: ... | ||
PRIVATE_SUBDOMAIN: private_subdomain | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters