Code Monkey home page Code Monkey logo

ddns's Introduction

DDNS

Build Status Go Report Card

Personal DDNS client with Digital Ocean Networking DNS as backend.

Read about it on Medium

Motivation

We have services like DynDNS, No-IP to access PCs remotely. But do we need them? This project is your own DDNS solution and will work for free (thanks to Digital Ocean Networking DNS).

What is DDNS

From Wikipedia

Dynamic DNS (DDNS or DynDNS) is a method of automatically updating a name server in the Domain Name System (DNS), often in real time, with the active DDNS configuration of its configured hostnames, addresses or other information.

Installation

Download binary from releases to /usr/local/bin/ddns.

And start it as:

ddns

Or you can download Docker image and use it:

docker run \
  -v /path/to/config.yml:/config/.ddns.yml \
  skibish/ddns -conf-file /config/.ddns.yml

Documentation

You can download binary for your OS from releases page.

ATTENTION! Currently tested on Linux and macOS.

Run ddns -h, to see help. It will output:

Usage of ./ddns:
  -check-period duration
      Check if IP has been changed period (default 5m0s)
  -conf-file string
      Location of the configuration file (default "$HOME/.ddns.yml")
  -req-timeout duration
      Request timeout to external resources (default 10s)
  -v  Show version and exit

Configuration should be supplied. By default it is read from $HOME/.ddns.yml.

You need to setup your domain in Digital Ocean Networks panel.

In your domain name provider configuration point domain to Digital Ocean NS records.

Refer to: How To Set Up a Host Name with DigitalOcean

Configuration should be in the following format:

token: "AMAZING TOKEN"                          # Digital Ocean token
domains:                                        # Domains to update
  - "example.com"
forceIPV6: true                                 # Use IPv6 address resolve (Default false and force IPv4)
records:                                        # Records of the domains to update
  - type: "A"                                   # Record type
    name: "www"                                 # Record name
  - type: "TXT"
    name: "demo"
    data: "My IP is {{.IP}} and I am {{.mood}}" # "data" key is optional. You can write here
                                                # what you want and reference values from "params".
                                                # Key "IP" is reserved.
params:
  mood: "cool"
notify:                                         # Optional notifiers
  smtp:
    read: below
  telegram:
    read: below

Notifications

These notifications are based on sirupsen/logrus hooks. Add them to the configuration file as:

# config part from the top
#...

notify:
  <name of notification>:
    # ...configuration

List of supported notifications:

SMTP

smtp:
  user: "[email protected]"
  password: "1234"
  host: "localhost"
  port: "22"
  to: "[email protected]"
  subject: "My DDNS sending me a message"
  secure: true # Optional flag. Set it, if you will send emails with SSL

Telegram

telegram:
  token: "telegram bot token"
  chat_id: "1234"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.