Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
A recursive DNS resolver that resolves from the root servers instead of forwarding to a public upstream, validates answers with DNSSEC and caches them. It serves plain DNS plus DNS over TLS, HTTPS and QUIC, and blocks ad and tracker domains from remote hosts-format blocklists, a manual list or response policy zones, with access lists, rate limits, per-client views and a Prometheus metrics endpoint. There is no web dashboard; it is configured through one TOML file and a small HTTP API.
Runs on a VPS from $4/mo (Kamatera 1GB, 1 GB RAM) · prices checked Nov 2026
Fits home hardware (19 MB measured idle, RAM only): Raspberry Pi 4 (4 GB) (arm64 untested), Raspberry Pi 5 (8 GB) (arm64 untested), Repurposed laptop (8 GB), Intel N100 mini PC (16 GB), AMD Ryzen mini PC (32 GB).
Pick SDNS when you want a DNS resolver that does its own recursion from the root servers, validates DNSSEC and blocks ad domains, and you are happy to run it from a config file instead of a dashboard. It serves plain DNS plus DNS over TLS, HTTPS (with HTTP/3) and QUIC, with blocklists, response policy zones, per-client views, access lists, rate limits, Prometheus metrics and a small HTTP API. It is MIT-licensed Go. Our snippet adapts the README's Docker command into a Compose file with the Docker Hub image pinned to `c1982/sdns:1.9.1` (released 2026-10-22; the README names both that image and `ghcr.io/semihalev/sdns`). It lets the image write its own default config with `-t`, then sets the state directory to the volume, narrows the access list to loopback and private ranges, adds the StevenBlack hosts list as the blocklist, publishes DNS on host port 5353 instead of 53 and the API on 127.0.0.1 only. The docs give a planning figure rather than a minimum: about 50 MB for the process plus about 2.5 kB per cached answer, or roughly 690 MB if the generated `cachesize = 256000` ever fills. Our 128 MB floor is an estimate for a small network that never fills that cache; lower `cachesize` on a small server. In the catalog, AdGuard Home and Pi-hole give you a dashboard and query log, Blocky is a YAML-configured proxy that forwards to upstream resolvers, and Technitium DNS Server is a full DNS server with a web console; SDNS has no web UI, and unlike AdGuard Home, Pi-hole and Blocky it resolves from the root itself instead of forwarding; Technitium can also recurse, but as a much larger server with a web console.
Paid link — we earn a commission if you shop through it.
Run these commands on your server:
# SDNS — recursive DNS resolver with blocklists — adapted from the README's Docker command, image pinned to c1982/sdns 1.9.1
# Changed from upstream: a Compose file instead of docker run, DNS published on host port 5353 (Ubuntu's systemd-resolved holds port 53), access list limited to private ranges, the StevenBlack hosts list as blocklist, HTTP API published on 127.0.0.1 only
mkdir sdns && cd sdns
mkdir config
docker run --rm --user "$(id -u):$(id -g)" -w /config -v "$PWD/config:/config" c1982/sdns:1.9.1 -t -c /config/sdns.conf
sed -i -e 's|^directory = .*|directory = "/var/lib/sdns"|' -e 's|^api = .*|api = "0.0.0.0:8080"|' config/sdns.conf
sed -i -e '/^accesslist = \[/,/^\]/c\accesslist = ["127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]' -e '/^blocklists = \[/,/^\]/c\blocklists = ["https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"]' config/sdns.conf
cat > docker-compose.yml <<'EOF'
services:
sdns:
image: c1982/sdns:1.9.1
command: ["-c", "/etc/sdns.conf"]
stop_grace_period: 20s
restart: unless-stopped
ports:
- "5353:53/tcp"
- "5353:53/udp"
- "127.0.0.1:8080:8080/tcp"
volumes:
- sdns-data:/var/lib/sdns
- ./config/sdns.conf:/etc/sdns.conf:ro
volumes:
sdns-data:
EOF
docker compose up -d
timeout 300 bash -c 'until curl -fsS -o /dev/null http://localhost:8080/metrics; do sleep 3; done'
# Test with dig (apt install dnsutils): a normal name resolves, a name on the blocklist answers 0.0.0.0
timeout 300 bash -c 'until [ "$(dig +short +time=10 @127.0.0.1 -p 5353 doubleclick.net)" = "0.0.0.0" ]; do sleep 5; done'
dig +short +time=20 @127.0.0.1 -p 5353 example.com A
# → DNS on SERVER_IP:5353 for testing only (dig @SERVER_IP -p 5353 example.com from a private address; 5353 is also the mDNS port, and most devices and routers can only use port 53, so to serve a network free port 53 and publish 53:53); metrics at http://localhost:8080/metrics on the server itself, no web UISDNS's README and documentation flag these before you rely on it:
SDNS used 19 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 128 MB.
The SDNS install snippet is marked verified on Ubuntu 26.04 (Nov 2026).