Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.git-crypt
conf
.env
.gitattributes
.gitignore
.travis.yml
Dockerfile.amd64
Dockerfile.arm
Dockerfile.arm64
README.md
docker-compose.yml

README.md

Travis

Cloudflare DDNS

Dockerized way to update Cloudflare domain IP address periodically.

How to set it up

You need to provide 3 pieces of information as environment variables to create a container.

1. Cloudflare API key

  • Login to the Cloudflare account.
  • Go to My Profile.
  • Scroll down to API Keys and locate Global API Key.
  • Click API Key to see your API identifier.

2. Cloudflare e-mail address

3. The Domain to be updated

Assuming that you're planning to use Docker Compose, you could simply create a .env file providing the information above as property values, eg:

CLOUDFLARE_API_KEY=your Cloudflare API key
CLOUDFLARE_API_EMAIL=your Cloudflare e-mail address
CLOUDFLARE_API_DOMAIN=your domain address

* The .env file must be at the same level as your docker-compose.yaml file unless you have an env_file section on your docker-compose.yaml. The “env_file” configuration option

* You can have a look at Docker Secrets if you're looking for an alternative way to provide your details.

How to use

From this point, you just need to start your container, a sample of a docker-compose.yaml would look like

version: '3.2'

services:
  ddns:
    image: allandequeiroz/cloudflare-ddns
    restart: always
    environment:
      - CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
      - CLOUDFLARE_API_EMAIL=${CLOUDFLARE_API_EMAIL}
      - CLOUDFLARE_API_DOMAIN=${CLOUDFLARE_API_DOMAIN}

Now on your terminal, docker-compose up -d