Cloudflare DNS

Best Self-hosted Alternatives to Cloudflare DNS

A curated collection of the 7 best self hosted alternatives to Cloudflare DNS.

Managed authoritative DNS service offering global Anycast routing, DNS record management via dashboard and API, DNSSEC support, and features for high availability and low-latency domain name resolution.

Alternatives List

#1
Pi-hole

Pi-hole

Pi-hole is a network-wide DNS sinkhole that blocks ads and trackers for all devices on your network, with a web dashboard, query logs, and optional DHCP server.

Pi-hole screenshot

Pi-hole is a network-wide DNS sinkhole that blocks advertisements and other unwanted domains for all devices without installing client-side software. It runs on Linux hardware (including Raspberry Pi), providing faster browsing by blocking and caching DNS queries.

Key Features

  • DNS-based blocking for ads, trackers, and other unwanted domains across the entire network
  • Web admin dashboard with statistics, top domains/clients, and management controls
  • Query log with filtering and auditing of DNS activity
  • Allowlist/denylist management with support for regex-based rules
  • Optional built-in DHCP server when router DHCP options are limited
  • Privacy modes to limit or adjust stored/queryable client information
  • Command-line interface for full administration and troubleshooting
  • Local caching of DNS queries to improve perceived browsing performance

Use Cases

  • Network-wide ad and tracker blocking for home networks, offices, or homelabs
  • Improving visibility into DNS traffic to troubleshoot devices and unwanted connections
  • Enforcing DNS policy for IoT devices, smart TVs, and mobile apps

Limitations and Considerations

  • DNS-level blocking cannot remove ads served from the same domains as desired content
  • HTTPS and app-level hardcoded DNS or encrypted DNS may require additional network controls to enforce Pi-hole usage

Pi-hole is a lightweight, centralized way to reduce unwanted content and improve privacy across diverse devices. With its dashboard, logs, and flexible allow/deny controls, it provides both protection and insight into network DNS activity.

55.9kstars
3kforks
#2
MyIP (IPCheck.ing)

MyIP (IPCheck.ing)

MyIP (IPCheck.ing) is an open-source web IP toolbox that detects local/public IPs, runs DNS leak and WebRTC checks, speed/latency/MTR tests, availability and whois lookups.

MyIP (IPCheck.ing) screenshot

MyIP (branded as IPCheck.ing) is an open-source IP toolbox that provides browser- and server-based network diagnostics. It detects local and public IPs, shows geolocation/ASN details, and bundles utilities for availability, DNS and WebRTC testing.

Key Features

  • Detects and displays local and public IPv4/IPv6 addresses and associated metadata (country, region, ASN, geolocation).
  • IP search and detailed IP information lookup with geolocation and ASN data.
  • DNS Leak Test that reports DNS endpoints to evaluate VPN/proxy DNS leakage risk.
  • WebRTC connection detection to reveal IPs exposed via browser peer connections.
  • Network tests: speed test, global latency tests, ping, and MTR from multiple edge locations.
  • Availability/Censorship checks to verify whether major sites or a specific domain are reachable from different regions.
  • DNS resolver comparison across multiple sources to help identify DNS contamination or propagation issues.
  • Proxy rule testing to validate proxy configuration rules and behavior.
  • Whois search and MAC lookup utilities.
  • Browser fingerprinting options, keyboard shortcuts, dark/minimalist modes, PWA support and multi-language UI.

Use Cases

  • System administrators and security engineers diagnosing VPN, DNS or routing issues and checking for DNS leaks or WebRTC exposure.
  • Network-savvy users validating ISP-assigned IPs, performing speed/latency tests, and checking regional availability or censorship of services.
  • Operators who want a packaged set of IP/network diagnostics (whois, DNS, MTR, ping, traceroute-like tests) for troubleshooting and reporting.

Limitations and Considerations

  • Some features depend on browser capabilities (e.g., WebRTC detection and certain fingerprinting methods) and may not work in all browsers or when restrictive privacy extensions are active.
  • Geolocation and ASN accuracy depend on third-party IP/data providers; results may vary by region and provider freshness.
  • Map display requires a provider API key configuration for full map functionality; out-of-the-box deployments may show limited or no map view until configured.

MyIP (IPCheck.ing) provides a comprehensive, ready-to-deploy set of IP and network diagnostic tools intended for troubleshooting and investigation. It bundles multiple practical tests and utilities in a single open-source project suitable for both individual and operational use.

9.8kstars
1.1kforks
#3
Technitium DNS Server

Technitium DNS Server

Cross-platform DNS server with authoritative/recursive modes, encrypted DNS (DoH/DoT/DoQ), DNSSEC, ad/malware blocking, DHCP, and an HTTP API with web admin UI.

Technitium DNS Server screenshot

Technitium DNS Server is an open-source, cross-platform DNS server that can run as both an authoritative server for your zones and a recursive resolver for clients on your network. It includes a browser-based administration console and can improve privacy, performance, and control by handling DNS locally and supporting encrypted upstream DNS.

Key Features

  • Authoritative and recursive DNS operation, including forwarding and conditional forwarding
  • Encrypted DNS services and forwarders: DNS-over-HTTPS, DNS-over-TLS, and DNS-over-QUIC (including HTTP/1.1, HTTP/2, and HTTP/3 for DoH)
  • DNSSEC validation and signed-zone support, plus advanced record types and zone features
  • DNS-based blocking (ads/malware) via block lists, with options like regex-based and per-client/subnet policies (via DNS Apps)
  • Web-based admin console with multi-user, role-based access, API tokens, and optional TOTP 2FA
  • Built-in DHCP server for multiple networks and IPv6 support
  • Query logging, system logging, statistics, caching features (including persistent cache) and clustering for managing multiple instances

Use Cases

  • Home or small-office DNS resolver with network-wide ad/malware blocking and encrypted upstream DNS
  • Self-hosted authoritative DNS for internal zones and lab environments with zone transfers and DNSSEC
  • Network visibility and control through query logs, policy routing, and split-horizon responses

Limitations and Considerations

  • Default web console credentials and auto-login behavior require immediate hardening after installation
  • Some advanced behavior is implemented through DNS Apps, which may add operational complexity compared to basic DNS setups

Technitium DNS Server is well-suited for users who want a powerful DNS platform that combines authoritative hosting, recursive resolution, privacy-focused encrypted DNS, and centralized web-based management. It can serve as a Pi-hole alternative while also covering advanced DNS features typically found in dedicated DNS infrastructure.

7.6kstars
634forks
#4
Blocky

Blocky

Open-source DNS proxy and network-wide ad-blocker for local networks. Supports DoH/DoT, per-client rules, caching, deep CNAME inspection, Prometheus metrics, Docker and Helm.

Blocky screenshot

Blocky is an open-source DNS proxy and ad-blocker designed for local networks. It intercepts and filters DNS queries using external blocklists and per-client rules while offering modern DNS protocol support and metrics for observability.

Key Features

  • DNS blocking using external allow/deny lists (ad, malware) with periodic reloads and regex support
  • Per-client-group allow/deny lists and upstream resolver configuration (e.g., groups for kids or IoT devices)
  • Deep CNAME inspection and response-IP blocking against IP lists
  • Supports DNS over UDP/TCP, DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT); DNSSEC validation supported
  • Configurable caching, prefetching and multi-upstream resolution for improved performance and low memory footprint
  • Stateless single-binary architecture with multi-architecture Docker images and community Helm chart for Kubernetes
  • Prometheus metrics exposure and prepared Grafana dashboards; logging to CSV or SQL backends (MySQL/MariaDB/PostgreSQL/Timescale)
  • REST API endpoints and CLI tooling for operational tasks

Use Cases

  • Network-wide ad and tracker blocking for home or small office networks with per-device rules
  • Parental control and device grouping to apply different filtering policies (e.g., kids vs. smart devices)
  • Deploy as a lightweight cluster or edge DNS resolver (Docker or Kubernetes) with observability via Prometheus/Grafana

Limitations and Considerations

  • No official built-in web administration UI; management is primarily via YAML configuration, CLI and REST API, and third-party UIs exist separately
  • Stateless design means dynamic persistent storage of runtime changes (e.g., centrally editable blocklists) requires external tooling or orchestration to synchronize across instances

Blocky focuses on simplicity, performance and transparency for DNS filtering and observability. It is designed to be integrated into existing tooling and monitoring stacks for operational management.

6.1kstars
267forks
#5
Unbound

Unbound

Standards-based validating recursive DNS resolver with DNSSEC validation, DNS-over-TLS/HTTPS support and configurable caching for privacy and performance.

Unbound screenshot

Unbound is a validating, recursive, caching DNS resolver designed to be fast, lean and standards-compliant. It implements modern privacy and DNSSEC-focused features and runs on Linux, BSD and macOS.

Key Features

  • DNSSEC validation and support for DNSSEC-related optimizations (aggressive use of DNSSEC-validated cache).
  • Recursive, validating and caching resolver behavior with configurable cache policies and performance tuning.
  • Encrypted client transport: supports DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH) to protect client→resolver traffic.
  • Query Name Minimisation and other privacy-preserving standards to limit data sent to authoritative servers.
  • Authority zones / ability to load a copy of the root zone for isolated or offline operation.
  • libunbound API for embedding resolver functionality into applications.
  • Configurable build options and runtime modules (TLS via OpenSSL, optional libevent, modular extensions).

Use Cases

  • Run a local or network resolver for homes, offices or ISPs that needs DNSSEC and encrypted client transport.
  • Deploy a privacy-focused resolver for client devices by enabling DoT/DoH and query name minimisation.
  • Integrate DNS resolution into applications or services using the libunbound API for validated lookups.

Limitations and Considerations

  • Unbound is a recursive/validating resolver and is not designed to act as an authoritative DNS server.
  • Some features require build-time dependencies (C toolchain, OpenSSL, libexpat; building from source may need flex and bison). Optional modules (e.g., libevent) change runtime behavior and scalability trade-offs.
  • Primary platform focus is Unix-like systems (Linux/BSD/macOS); Windows support is limited compared to Unix platforms.

Unbound is a mature, open-source DNS resolver maintained by NLnet Labs with an emphasis on security, privacy and standards compliance. It is widely packaged for major Unix-like distributions and is suitable for both personal and operator-scale resolver deployments.

4.3kstars
424forks
#6
ddclient

ddclient

ddclient is a Perl-based Dynamic DNS client that detects IP changes and updates DNS records across many supported DDNS and DNS provider APIs.

ddclient screenshot

ddclient is a Perl client that keeps DNS records up to date when your public IP address changes. It supports a wide range of Dynamic DNS services and DNS provider APIs, and can run periodically or as a daemon to continuously refresh records.

Key Features

  • Updates dynamic DNS entries for many DDNS services and DNS providers
  • Multiple ways to detect external IP (web services or router status pages)
  • Daemon mode for periodic checks, or integration with cron, PPP, and DHCP hooks
  • Uses curl for network access (recommended and default in newer versions)
  • Configuration via ddclient.conf with optional command-line overrides
  • Supports environment-variable substitution in config for secrets (login/password)

Use Cases

  • Keep a home server reachable via a domain name on a changing residential IP
  • Automatically update DNS records for self-hosted services behind consumer ISPs
  • Maintain IPv4/IPv6 address records for labs, small offices, or remote sites

Reliable and widely packaged across Unix-like systems, ddclient is a practical choice when you need automated DNS updates without running a full DNS stack. Its broad provider support and flexible IP detection make it suitable for many network environments.

3.3kstars
380forks
#7
Gravity

Gravity

Fully-replicated DNS, DHCP and TFTP server with ad‑blocking, web UI, API, Prometheus metrics and multi-site replication for small to medium networks.

Gravity screenshot

Gravity is a lightweight network services suite that provides fully-replicated DNS, DHCP and TFTP functionality with built-in ad‑blocking and a web UI/API for management. It is designed for small to medium networks and multi-site deployments where replicated state and ease of migration matter.

Key Features

  • Fully-replicated configuration and runtime data across cluster members (replication/backing store is used to synchronize state).
  • DNS server with local caching and configurable ad/privacy blocking; can operate as a forwarder while maintaining its own records.
  • DHCP server with automatic DNS registration and import capabilities for existing Microsoft DHCP leases/reservations.
  • TFTP server for storing device configurations and PXE/netboot workflows.
  • Web-based UI and HTTP API for management and automation.
  • Metrics exposed for Prometheus; bundled dashboards/visualizations are supported for observability.
  • Backup role supporting snapshot export to S3-compatible storage and local snapshots.
  • Provided as container images and can be deployed with Docker Compose or container runtimes.

Use Cases

  • Replace or consolidate DNS/DHCP/TFTP services for small office or branch networks with a single, replicated platform.
  • Multi-site deployments that require synchronized DNS/DHCP state without external databases or complex primary/secondary setups.
  • Air-gapped or regulated environments where cluster images and bundled artifacts simplify migration and offline installs.

Limitations and Considerations

  • Minimum recommended resources are modest but non-trivial (examples note at least 1 CPU core and ~1 GB RAM); resource needs grow with many DNS zones or when Blocky/CoreDNS ad‑blocking is enabled.
  • Official support targets AMD64 and ARM64 builds; other CPU architectures are not guaranteed.
  • Performance and memory usage can increase significantly with large numbers of zones or very high query/lease volumes; plan capacity accordingly.

Gravity provides a compact, self-contained alternative for replicated network services with observability and backup integrations. It focuses on operational simplicity for multi-node and multi-site scenarios while exposing management APIs for automation.

906stars
26forks

Why choose an open source alternative?

  • Data ownership: Keep your data on your own servers
  • No vendor lock-in: Freedom to switch or modify at any time
  • Cost savings: Reduce or eliminate subscription fees
  • Transparency: Audit the code and know exactly what's running