Updates a given a DNS record with your current IP
Example with the Cloudflare provider:
docker run \
-e PROVIDER=cloudflare \
-e CLOUDFLARE_APIKEY=YOUR_API_KEY \
-e CLOUDFLARE_ZONE=YOUR_ZONE \
-e CLOUDFLARE_HOST=YOUR_DOMAIN \
-e CLOUDFLARE_EMAIL=YOUR_CLOUDFLARE_EMAIL \
hugomd/cloudflare-ddns
Example running as a persistant daemon:
docker run -d --restart always \
-e PROVIDER=cloudflare \
-e CLOUDFLARE_APIKEY=YOUR_API_KEY \
-e CLOUDFLARE_ZONE=YOUR_ZONE \
-e CLOUDFLARE_HOST=YOUR_DOMAIN \
-e CLOUDFLARE_EMAIL=YOUR_CLOUDFLARE_EMAIL \
hugomd/cloudflare-ddns -duration 2h
Provider | Reference (used for PROVIDER environment variable) |
---|---|
Cloudflare | cloudflare |
All providers require the following environment variable:
Environment Variable | Description | Example | Required |
---|---|---|---|
PROVIDER |
The name of the provider you wish to use | cloudflare |
true |
Environment Variable | Description | Example | Required |
---|---|---|---|
CLOUDFLARE_APIKEY |
Cloudflare API key | 12345 |
true |
CLOUDFLARE_ZONE |
Cloudflare Zone | example.com |
true |
CLOUDFLARE_HOST |
The record you want to update | subdomain.example.com |
true |
CLOUDFLARE_EMAIL |
Email associated with your Cloudflare account | john.doe@example.com |
true |
Parameter | Description | Example | Required |
---|---|---|---|
-duration |
Runs program perpetually and recheck after specified interval; parses time strings such as 5m , 15m , 2h30m5s . If not specified, or if equal to 0s, run once and exit. |
2h | false |
To add a new provider:
- Create a new folder in
lib/providers
, calledyour_provider
- Create a package for your provider in the previously created folder,
your_provider
. - Ensure your provider implements the
Provider
interface - Import your provider in
lib/providers/_all/all.go
- Open a PR 🎉
MIT, see LICENSE.