Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andp97/cloudflare-dynamic-ip
Cloudflare ☁️ DDNS script for Raspberry Pi 4 🍓 or RHEL/Debian/Ubuntu 🐧
https://github.com/andp97/cloudflare-dynamic-ip
cloudflare ddns ddns-client ddns-updater raspberry-pi raspberry-pi-3 raspberry-pi-4 raspberrypi
Last synced: 3 months ago
JSON representation
Cloudflare ☁️ DDNS script for Raspberry Pi 4 🍓 or RHEL/Debian/Ubuntu 🐧
- Host: GitHub
- URL: https://github.com/andp97/cloudflare-dynamic-ip
- Owner: andp97
- Created: 2021-03-06T17:43:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T22:43:31.000Z (about 1 year ago)
- Last Synced: 2024-01-12T09:46:04.003Z (about 1 year ago)
- Topics: cloudflare, ddns, ddns-client, ddns-updater, raspberry-pi, raspberry-pi-3, raspberry-pi-4, raspberrypi
- Language: PHP
- Homepage:
- Size: 17.3 MB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Cloudflare ☁️ Dynamic DNS IP Updater
This tool allow you to have a specific DNS record such as `home.example.com` that point to your home IP
#### Use Case
I suggest you to install it on a Raspberry Pi!🍓### Requirements
- Domain Name
- [Cloudflare Account](https://www.cloudflare.com/)
- Raspberry Pi4 or any other Linux Based OS
- `composer`
- `php-7.3`### Installation
```
git clone https://github.com/andp97/cloudflare-dynamic-ip.git
cd cloudflare-dynamic-ip
INSTALL_PATH=$(pwd)
composer install --no-dev
nano .env
echo -e "*/15 * * * * $INSTALL_PATH/cf-ip 2>&1 > /dev/null\n"
crontab -e
```You can also execute this script via bash
```
#Get dns record name from env and target ip from remote host (https://ip.andreapavone.com)
./cf-ip
#Passing parameters to the script
./cf-ip
```On `.env` file you can set:
- `CLOUDFLARE_TOKEN` (see how can you generate token here: https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys)
- `CLOUDFLARE_ZONE_NAME` or `CLOUDFLARE_ZONE_ID`
- `DNS_RECORD_NAME` is the subdomain that you prefer to use (for example: **home**.example.com). If you prefer to be safer use a randomized token for the `DNS_RECORD_NAME`### Update
```
git pull
composer update
```