Skip to content

Instantly share code, notes, and snippets.

View lukedesu's full-sized avatar
🏠
Working from home

Luke Luo lukedesu

🏠
Working from home
  • Singapore
  • 06:48 (UTC +08:00)
View GitHub Profile
@lukedesu
lukedesu / cloudflare.sh
Last active October 14, 2024 03:55
Automating Cloudflare DNS Updates Using Bash and Cron
#!/bin/bash
# PREREQUISITES:
# 1. Ensure you have an active Cloudflare account.
# 2. Create an A record for each domain manually in your Cloudflare dashboard.
# - You can use a dummy IP address like 1.1.1.1 during setup.
# - This script will update the IP automatically during execution.
# 3. Obtain your Global API Key from "My Profile" in Cloudflare.
# 4. Make sure `curl` is installed on your system.