selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
d2c.sh logo

Self-host d2c.sh

Bash script for Cloudflare dynamic DNS updates

AlphaOpen SourceGPL-3.0
Updated9 months ago
LanguageShell
Setup difficultyEasy
Stars
228
Requires
Curl, Yq
Install with Docker

What is d2c.sh?

d2c.sh is a lightweight dynamic DNS updater written in Bash for Cloudflare. It reads TOML configuration files from /etc/d2c/ (or a custom directory) and updates existing A and AAAA records to match the machine's current public IPv4 and IPv6 addresses. The script requires yq and curl, and can be installed as a system binary, run via a locally built Docker image, or executed directly with curl | bash. It supports multiple zones and DNS records per configuration file, and can send change notifications via Gotify or Telegram Bot API. Designed to run periodically via cron or a container scheduler.

Should you self-host d2c.sh?

d2c.sh scores 41/100 on selfhost.directory (how scoring works) and ranks #31 of 41 in DNS. It has 228 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. It is GPL-3.0-licensed and written mostly in Shell.

Its closest alternative on selfhost.directory is Pi-hole (87/100, 61 531 stars). It scores higher overall, so compare the two before you pick. See d2c.sh vs Pi-hole side by side.

Features

  • Cron-friendly
  • Gotify notifications
  • IPv4 dynamic DNS
  • IPv6 dynamic DNS
  • Multiple zone support
  • No-install execution
  • Telegram Notifications

d2c.sh README

How to install d2c.sh

Install d2c.sh with Docker

$ git clone https://github.com/ddries/d2c.sh.git $ cd d2c.sh $ docker build . -t ddries/d2c.sh:latest $ docker run --rm --network host -v /etc/d2c/:/etc/d2c ddries/d2c.sh:latest

Requires host network mode to access host's IPv4/IPv6 addresses

More in Network Utilities

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…