Skip to content

Cloudflare ☁️ DDNS script for Raspberry Pi 4 πŸ“ or RHEL/Debian/Ubuntu 🐧

Notifications You must be signed in to change notification settings

andp97/cloudflare-dynamic-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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
  • 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 <dns_record_name> <target_ip>

On .env file you can set:

Update

git pull
composer update