GithubHelp home page GithubHelp logo

ctrlaltdev / diyddns Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 1.0 24 KB

๐ŸŒ Dynamic DNS, DIY, with Cloudflare

Home Page: https://ctrlalt.dev/DIYDDNS

License: Mozilla Public License 2.0

Makefile 7.22% Go 92.78%
api dns ddns diy dynamic cloudflare

diyddns's Introduction

DIY Script for Dynamic DNS using Cloudflare APIs

INSTALLATION

HomeBrew (only for macOS and linux amd64 and arm64)

brew install ctrlaltdev/tap/diyddns

or

brew tap ctrlaltdev/tap
brew install diyddns

Easy Shell Script

curl -fSsL https://ln.0x5f.info/getDIYDDNS | sh

It will prompt you for your OS and ARCH to download and install the right version - it will require sudo to install the binary to /usr/local/bin

DIY Shell Script

version=v2.1.0

os=$1
arch=$2

if [ -z "$os" ] || [ -z "$arch" ]; then
  echo -n "What is your OS? [darwin/linux] "
  read os < /dev/tty
  echo -n "What is your ARCH? [amd64/arm64/armv7/armv6/armv5] "
  read arch < /dev/tty
fi

curl -o DIYDDNS-$os-$arch.tar.gz -sL https://github.com/ctrlaltdev/DIYDDNS/releases/download/$version/DIYDDNS-$os-$arch.tar.gz
curl -o DIYDDNS-$os-$arch.tar.gz.sha256 -sL https://github.com/ctrlaltdev/DIYDDNS/releases/download/$version/DIYDDNS-$os-$arch.tar.gz.sha256
sha256sum -c DIYDDNS-$os-$arch.tar.gz.sha256

tar xzf DIYDDNS-$os-$arch.tar.gz

rm DIYDDNS-$os-$arch.tar.gz*

sudo mv DIYDDNS /usr/local/bin/

echo "\nDIYDDNS INSTALLED\n"

DIYDDNS -h

INIT

You'll need your Cloudflare API Key (in your profile, on cloudflare website)

DIYDDNS -init

and provide your cloudflare email and api key when prompted

RUN IT LIKE YOU MEAN IT

Now that you're set, you have to make that run: all hail the mighty cron

You should be able to use something like that:

* * * * * DIYDDNS -fqdn sub.domain.tld >> /dev/null

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.