itorgov / docker-ddns-cloudflare

Cloudflare DDNS Script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker DDNS Cloudflare (arm32v7 for Raspberry PI 3B+)

This container is an adapted version of this script. It runs once every minute and only makes requests if the IP has changed since last time. The IP is resolved by https://canihazip.com.

Quickstart 🚀

  1. Get your api token here (Top right -> My Profile -> Scroll Down -> Global Api Key)

  2. Create the wanted DNS record (e.g. some.example.com). The script can only update it, now create it.

  3. Create an .env file:

EMAIL=my@mail.com
KEY=my_api_key
ZONE=example.org
DNS_RECORD=some.example.org
  1. Run the container
docker run -d --name ddns --restart always --env-file .env ivantorgov/ddns-cloudflare-arm32v7

To check logs:

docker logs ddns

Docker-Compose

With docker-compose:

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

About

Cloudflare DDNS Script


Languages

Language:Shell 88.9%Language:Dockerfile 11.1%