Quentin McGaw 7f1aacd0ba Initial commit
Pretty much done with the project for now. Ask for more content ;)
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-15 19:41:59 +02:00
2018-10-09 20:00:06 +02:00
2018-10-15 19:41:59 +02:00

Lightweight DDNS Updater with Docker and web UI

Lightweight scratch based container updating DNS A records periodically for GoDaddy, Namecheap and DuckDNS.

DDNS Updater by Quentin McGaw

Build Status Docker Build Status

GitHub last commit GitHub commit activity GitHub issues

Docker Pulls Docker Stars Docker Automated

Download size Image size RAM usage CPU usage
???MB ???MB ???MB Very low

Features

  • Updates periodically A records for different DNS providers: Namecheap, GoDaddy, DuckDNS (ask for more)
  • Integrated Docker healthcheck program
  • Web User interface

Web UI

  • Very lightweight
    • Scratch with two Golang binaries
      • Healthcheck (UPX-compressed)
      • Main program
    • Ca-Certificates
  • Emojis 👍

Setup

To setup your domains initially, see the Domain set up section.

You can then run this container with either Docker:

docker run -d -p 80:80 -e RECORD1=example.com,@,namecheap,0e4512a9c45a4fe88313bcc2234bf547 qmcgaw/ddns-updater

or with Docker Compose:

version: '3'
services:
  ddns-updater:
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    environment:
      - DELAY=300
      - ROOTURL=
      - LISTENINGPORT=80
      - RECORD1=example.com,@,namecheap,provider,0e4512a9c45a4fe88313bcc2234bf547
      - RECORD2=example.info,@,namecheap,duckduckgo,157fd2a9c45a4fe88313bcc2234bfd58
      - RECORD3=example,www,namecheap,opendns,0e4512a9c45a4fe88313bcc2234bf547      
      - RECORD4=example.info,subdomain,namecheap,222.145.121.59,4a67d2a9c45a4fe88313bcc2234bfd62
      - RECORD5=example.org,*,godaddy,opendns,dLP4WKz5PdkS_GuUDNigHcLQFpw4CWNwAQ5:GuUFdVFj8nJ1M79RtdwmkZ
      - RECORD6=example.app,@,godaddy,duckduckgo,dLP4WKz5PdkS_GuUDNigHcLQFpw4CWNwAQ5:GuUFdVFj8nJ1M79RtdwmkZ
      - RECORD7=example.duckdns.org,@,duckdns,provider,064a0540-864c-4f0f-8bf5-23857452b0c1
      - RECORD8=example2.duckdns.org,@,duckdns,opendns,064a0540-864c-4f0f-8bf5-23857452b0c1
    ports:
      - 8000:80/tcp
    network_mode: bridge
    restart: always
docker-compose up -d

The following environement variables are available:

Environment variable Default Description
DELAY 300 Delay between updates in seconds
ROOTURL / URL path to append to all paths (i.e. /ddns for accessing https://example.com/ddns)
LISTENINGPORT 80 Internal TCP listening port for the web UI
RECORDi A record to update in the form domain_name,host,provider,ip_method,password
  • The environement variables RECORD1, RECORD2, etc. are domains to update the IP address for
    • The program reads them, starting at RECORD1 and will stop as soon as RECORDn is not set
    • Each must respect the format domain_name,host,provider,ip_method,password
    • The ip_method parameter can be:
  • The port mapping 8000:80 is for the web interface

For additional firewall purposes, this container needs the following ports:

  • TCP 443 outbound
  • UDP 53 outbound
  • TCP 8000 inbound (or other) for the WebUI

Domain set up

Namecheap

Namecheap Website

  1. Create a Namecheap account and buy a domain name - example.com as an example
  2. Login to Namecheap at https://www.namecheap.com/myaccount/login.aspx

For each domain name you want to add, replace example.com in the following link with your domain name and go to https://ap.www.namecheap.com/Domains/DomainControlPanel/example.com/advancedns

  1. For each host you want to add (if you don't know, create one record with the host set to *):

    1. In the HOST RECORDS section, click on ADD NEW RECORD

      https://ap.www.namecheap.com/Domains/DomainControlPanel/mealracle.com/advancedns

    2. Select the following settings and create the A + Dynamic DNS Record:

      https://ap.www.namecheap.com/Domains/DomainControlPanel/mealracle.com/advancedns

  2. Scroll down and turn on the switch for DYNAMIC DNS

    https://ap.www.namecheap.com/Domains/DomainControlPanel/mealracle.com/advancedns

  3. The Dynamic DNS Password will appear, which is 0e4512a9c45a4fe88313bcc2234bf547 in this example.

    https://ap.www.namecheap.com/Domains/DomainControlPanel/mealracle.com/advancedns

GoDaddy

GoDaddy Website

  1. Login to https://developer.godaddy.com/keys with your account credentials.

GoDaddy Developer Login

  1. Generate a Test key and secret.

GoDaddy Developer Test Key

  1. Generate a Production key and secret.

GoDaddy Developer Production Key

Obtain the key and secret of that production key.

In this example, the key is dLP4WKz5PdkS_GuUDNigHcLQFpw4CWNwAQ5 and the secret is GuUFdVFj8nJ1M79RtdwmkZ.

DuckDNS

Namecheap Website

Testing

TODOs

  • Add favicon.ico
  • Finish readme
  • Delete old repos
  • Live update of website
  • Unit tests
  • Other types or records
  • Better HTML webpage with possibility to change settings
Description
No description provided
Readme MIT 9.5 MiB
Languages
Go 98.2%
Dockerfile 0.8%
CSS 0.6%
HTML 0.4%