This agent automatically discovers the current host's external IP address, and updates a given DNS A record in Cloudflare with the value.
Instead of installing directly, you can use the Docker images:
Name | Description |
---|---|
ghcr.io/markliederbach/qrkdns | Basic image |
markliederbach/qrkdns | Dockerhub mirror |
A note about .env
files and docker. The --env-file
option only takes env files that do not have quotations. If quotes are present, they won't parse the options correctly. It is recommended that you create a separate file called .env.docker
, which doesn't use any quotations.
Sync Once
docker run --env-file .env.docker --rm -it ghcr.io/markliederbach/qrkdns:latest sync
- The
.env.docker
file should contain the following required environment variablesNETWORK_ID
- The subdomain to update in Cloudflare (e.g.,myhost
)DOMAIN_NAME
- The base domain name (e.g.,foo.net
)CLOUDFLARE_ACCOUNT_ID
- Account ID from CloudflareCLOUDFLARE_API_TOKEN
- Secret API token, with permission to read/update DNS records
Sync Cron
docker run --env-file .env.docker --rm -it ghcr.io/markliederbach/qrkdns:latest sync cron
- The
.env.docker
file should contain the following required environment variablesNETWORK_ID
- The subdomain to update in Cloudflare (e.g.,myhost
)DOMAIN_NAME
- The base domain name (e.g.,foo.net
)CLOUDFLARE_ACCOUNT_ID
- Account ID from CloudflareCLOUDFLARE_API_TOKEN
- Secret API token, with permission to read/update DNS recordsSCHEDULE
- Cron pattern describing how often the sync job should be run
To develop on the source code, you'll need to install a few requisite packages:
- task - Used to run defined tasks for the project
With task
, and a compatible version of go
, you can now run the following task to install project dependencies:
task deps
This application requires 100% code coverage on most files for all PRs and new Releases. To run the test suite, use this task:
task test
task lint