{"id":13451694,"url":"https://github.com/dstapp/docker-ddns","last_synced_at":"2025-03-23T19:32:21.219Z","repository":{"id":38714860,"uuid":"75933526","full_name":"dstapp/docker-ddns","owner":"dstapp","description":"Easy-to-deploy dynamic DNS with Docker, Go and Bind9","archived":false,"fork":false,"pushed_at":"2022-10-09T09:53:51.000Z","size":210,"stargazers_count":627,"open_issues_count":35,"forks_count":154,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2024-04-23T13:38:58.153Z","etag":null,"topics":["ddns","dns","docker","dynamic-dns","self-hosted","selfhosted"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dstapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-08T11:57:05.000Z","updated_at":"2024-04-11T16:58:38.000Z","dependencies_parsed_at":"2022-08-02T23:45:58.624Z","dependency_job_id":null,"html_url":"https://github.com/dstapp/docker-ddns","commit_stats":null,"previous_names":["dstapp/docker-ddns","dprandzioch/docker-ddns"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstapp%2Fdocker-ddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstapp%2Fdocker-ddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstapp%2Fdocker-ddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dstapp%2Fdocker-ddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dstapp","download_url":"https://codeload.github.com/dstapp/docker-ddns/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213325066,"owners_count":15570230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddns","dns","docker","dynamic-dns","self-hosted","selfhosted"],"created_at":"2024-07-31T07:00:59.328Z","updated_at":"2024-07-31T07:03:57.875Z","avatar_url":"https://github.com/dstapp.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Dynamic DNS with Docker, Go and Bind9\n\n![DockerHub build status](https://dockerbuildbadges.quelltext.eu/status.svg?organization=davd\u0026repository=docker-ddns)\n![Travis build status](https://travis-ci.com/dprandzioch/docker-ddns.svg?branch=master)\n\nThis package allows you to set up a dynamic DNS server that allows you to connect to\ndevices at home from anywhere in the world. All you need is a cheap VPS, a domain and access to it's nameserver.\n\n![Connect to your NAS from work](https://raw.githubusercontent.com/dprandzioch/docker-ddns/develop/connect-to-your-nas-from-work.png)\n\n## Installation\n\nYou can either take the image from DockerHub or build it on your own.\n\n### Using DockerHub\n\nJust customize this to your needs and run:\n\n```\ndocker run -it -d \\\n    -p 8080:8080 \\\n    -p 53:53 \\\n    -p 53:53/udp \\\n    -e SHARED_SECRET=changeme \\\n    -e ZONE=example.org \\\n    -e RECORD_TTL=3600 \\\n    --name=dyndns \\\n    davd/docker-ddns:latest\n```\n\nIf you want to persist DNS configuration across container recreation, add `-v /somefolder:/var/cache/bind`. If you are experiencing any \nissues updating DNS configuration using the API (`NOTAUTH` and `SERVFAIL`), make sure to add writing permissions for root (UID=0) to your \npersistent storage (e.g. `chmod -R a+w /somefolder`).\n\nYou can also use Compose / Swarm to set up this project. For more information and an example `docker-compose.yml` with persistent data \nstorage, please refer to this file: https://github.com/dprandzioch/docker-ddns/blob/master/docker-compose.yml\n\n### Build from source / GitHub\n\n```\ngit clone https://github.com/dprandzioch/docker-ddns\ngit checkout master # Make sure to build the latest stable release\ncd docker-ddns\n$EDITOR envfile\nmake deploy\n```\n\nMake sure to change all environment variables in `envfile` to match your needs. Some more information can be found here: \nhttps://www.davd.io/build-your-own-dynamic-dns-in-5-minutes/\n\n## Exposed ports\n\nAfterwards you have a running docker container that exposes three ports:\n\n* 53/TCP    -\u003e DNS\n* 53/UDP    -\u003e DNS\n* 8080/TCP  -\u003e Management REST API\n\n\n## Using the API\n\nThat package features a simple REST API written in Go, that provides a simple\ninterface, that almost any router that supports Custom DDNS providers can\nattach to (e.g. Fritz!Box). It is highly recommended to put a reverse proxy\nbefore the API.\n\nIt provides one single GET request, that is used as follows:\n\nhttp://myhost.mydomain.tld:8080/update?secret=changeme\u0026domain=foo\u0026addr=1.2.3.4\n\n### Fields\n\n* `secret`: The shared secret set in `envfile`\n* `domain`: The subdomain to your configured domain, in this example it would\n   result in `foo.example.org`. Could also be multiple domains that should be\n   redirected to the same domain separated by comma, so \"foo,bar\"\n* `addr`: IPv4 or IPv6 address of the name record\n\n\nFor the DynDNS compatible fields please see Dyn's documentation here: \n\n```\nhttps://help.dyn.com/remote-access-api/perform-update/\n```\n\n\n### DynDNS compatible API\n\nThis package contains a DynDNS compatible handler for convenience and for use cases\nwhere clients cannot be modified to use the JSON responses and/or URL scheme outlined\nabove.\n\nThis has been tested with a number of routers. Just point the router to your DDNS domain\nfor updates.\n\nThe handlers will listen on:\n* /nic/update\n* /v2/update\n* /v3/update\n\n\n**The username is not validated at all so you can use anything as a username**\n**Password is the shared secret provided as an ENV variable**\n\n#### Examples\n\nAn example on the ddclient (Linux DDNS client) based Ubiquiti router line:\n\nset service dns dynamic interface eth0 service dyndns host-name \u003cyour-ddns-hostname-to-be-updated\u003e\nset service dns dynamic interface eth0 service dyndns login \u003canything-as-username-is-not-validated\u003e\nset service dns dynamic interface eth0 service dyndns password \u003cshared-secret\u003e\nset service dns dynamic interface eth0 service dyndns protocol dyndns2\nset service dns dynamic interface eth0 service dyndns server \u003cyour-ddns-server\u003e\n\nOptional if you used this behind an HTTPS reverse proxy like I do:\n\nset service dns dynamic interface eth0 service dyndns options ssl=true\n\nThis also means that DDCLIENT works out of the box and Linux based devices should work.\n\nD-Link DIR-842:\n\nAnother router that has been tested is from the D-Link router line where you need to fill the \ndetails in on the Web Interface. The values are self-explanatory. Under the server (once you chosen Manual)\nyou need to enter you DDNS server's hostname or IP. The protocol used by the router will be the \ndyndns2 by default and cannot be changed.\n\n\n## Accessing the REST API log\n\nJust run\n\n```\ndocker logs -f dyndns\n```\n\n## DNS setup\n\nTo provide a little help... To your \"real\" domain, like `domain.tld`, you\nshould add a subdomain that is delegated to this DDNS server like this:\n\n```\ndyndns                   IN NS      ns\nns                       IN A       \u003cput ipv4 of dns server here\u003e\nns                       IN AAAA    \u003coptional, put ipv6 of dns server here\u003e\n```\n\nYour management API should then also be accessible through\n\n```\nhttp://ns.domain.tld:8080/update?...\n```\n\nIf you provide `foo` as a domain when using the REST API, the resulting domain\nwill then be `foo.dyndns.domain.tld`.\n\n## Common pitfalls\n\n* If you're on a systemd-based distribution, the process `systemd-resolved` might occupy the DNS port 53. Therefore starting the container might fail. To fix this disable the DNSStubListener by adding `DNSStubListener=no` to `/etc/systemd/resolved.conf` and restart the service using `sudo systemctl restart systemd-resolved.service` but be aware of the implications... Read more here: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html and https://github.com/dprandzioch/docker-ddns/issues/5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstapp%2Fdocker-ddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdstapp%2Fdocker-ddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdstapp%2Fdocker-ddns/lists"}