Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zachstence/cloudflare-ddns
Automatically update Cloudflare DNS when your public IP changes
https://github.com/zachstence/cloudflare-ddns
cloudflare ddns docker ipify typescript
Last synced: about 2 months ago
JSON representation
Automatically update Cloudflare DNS when your public IP changes
- Host: GitHub
- URL: https://github.com/zachstence/cloudflare-ddns
- Owner: zachstence
- License: mit
- Created: 2022-04-03T00:30:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-05T16:41:51.000Z (almost 1 year ago)
- Last Synced: 2024-01-05T17:43:36.156Z (almost 1 year ago)
- Topics: cloudflare, ddns, docker, ipify, typescript
- Language: TypeScript
- Homepage: https://hub.docker.com/r/zachstence/cloudflare-ddns
- Size: 181 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudflare-ddns
Automatically update your Cloudflare DNS when your public IP changes## Table of Contents
- [Usage](#usage)
- [Run using Docker](#run-using-docker)
- [Run using `docker-compose`](#run-using-docker-compose)
- [Future Features](#future-features)## Usage
1. [Create a Cloudflare API token](https://developers.cloudflare.com/api/tokens/create/) with the following configuration![docs/permissions.png](docs/permissions.png)
Permissions
- Zone - Zone - Read
- Zone - DNS - EditZone Resources
- Include - All zones2. [Identify your Cloudflare Zone ID](https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/find-account-and-zone-ids/)
![docs/zone-id.png](docs/zone-id.png)
3. Copy [`config.json.template`](config.json.template) to a new file named `config.json`
| Config | Description | Example |
| ----------------------- | ------------------------------------------------------------ | ------------------------------------------ |
| `cloudflare.apiToken` | A Cloudflare API Token with the [proper permissions](#usage) | `XDX6YXn0MU2tpwJUa49UYLrtS5r4q-Ia9ng6H5Pu` |
| `zones.zoneId` | The Zone ID of the domain you want to update DNS for | `gq3pvvxfr6x4fpfdgz7w7n4d3ckfk9pk` |
| `zones.recordNames` | The name of each record you would like to update | `example.com` |
| `intervalSeconds` | How often to check your DNS records (in seconds)1 | `300` |1 [Cloudflare's Rate Limits](https://support.cloudflare.com/hc/en-us/articles/200171456-How-many-API-calls-can-I-make) are pretty lenient, so feel free to set the interval as small as you want.
4. Run `cloudflare-ddns` using your `config.json`
#### Run using Docker
```sh
docker run \
-v /path/to/config.json:/app/config.json \
zachstence/cloudflare-ddns
```#### Run using `docker-compose`
```yaml
version: "3.8"services:
cloudflare-ddns:
image: zachstence/cloudflare-ddns
volumes:
- /path/to/config.json:/app/config.json:ro
restart: unless-stopped
```## Future Features
- Accept file for Cloudflare API token to enable better security (Docker secrets)