Giter Club home page Giter Club logo

docker-ddns-cloudflare's Introduction

Docker DDNS Cloudflare

Docker Pulls Docker Image Size (tag) Docker Image Version (tag latest semver)

Features ๐ŸŒˆ

  • Simple container for setting setting and updating cloudflare records to your local ip address.
  • Only makes requests if the IP has changed.
  • By default it runs once every minute and the IP is resolved by https://api.ipify.org/.

Quickstart ๐Ÿš€

  1. Get your API Token here (Top right -> My Profile -> API Tokens)

Click create token. You can then use the Edit DNS Zone template. Give it a name.

  1. Create an .env file:
TOKEN=mytoken

ZONE=example.org
DNS_RECORD=some.example.org
PROXIED=false
  1. Run the container
docker run -d --name ddns --restart always --env-file .env cupcakearmy/ddns-cloudflare

Docker-Copmose

With docker-compose:

git clone https://github.com/CupCakeArmy/docker-ddns-cloudflare.git
cp .sample.env .env
# Edit the .env file with your data
docker-compose up -d

ENV Reference

Env Default Description
TOKEN API Token.
ZONE Cloudflare zone where your domain is.
DNS_RECORD The actual DNS record that should be updated.
PROXIED true Whether the record is proxied by CloudFlare or not.
CRON */5 * * * * Frequency of updates. The following syntax is supported
RESOLVER https://api.ipify.org/ The endpoint used to determine your public ip.
LOG_LEVEL info Log level to run at. See winston for possible values

Customize

Custom CRON

By default the script runs every 5 minutes. You can customize this by simply setting the CRON value in the .env file.

# .env

# e.g. every minute
CRON=* * * * *

Custom Resolver

By default the script checks the own ip by calling https://api.ipify.org/. This also can be configured. It has to be an endpoint that return a plain text containing the ip by get request.

# .env

RESOLVER=https://ipv4.icanhazip.com/

docker-ddns-cloudflare's People

Contributors

borisbm avatar cupcakearmy avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-ddns-cloudflare's Issues

Select DNS Record type for multiple entries.

There was never an error in the logs, it just didn't update. The reason was that the call to get the list of records for the domain returned more than one for my domain. That's why I added "Type=A" in my pull request. I haven't reviewed the code in the rewritten version to see if it limited the number of records returned.

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.