Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Blocky
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
A fast DNS proxy and ad blocker written in Go and configured from a single YAML file, with no web interface. It blocks domains from deny lists (hosts files, domain lists or regexes) per client group, forwards the rest to upstream resolvers over plain DNS, DNS-over-TLS, DNS-over-HTTPS or DNS-over-QUIC, caches and prefetches answers, serves custom DNS mappings, and exposes a REST API and Prometheus metrics. Apache-2.0 licensed.
Pick Blocky when you want DNS ad blocking as configuration, not as an application: one YAML file, one small Go binary and no web interface. It blocks domains from deny lists (hosts files, domain lists and regexes) with different list groups for different clients or subnets, optionally on a schedule, and forwards everything else to the upstream resolvers you list over plain DNS, DNS-over-TLS, DNS-over-HTTPS or DNS-over-QUIC. It also caches and prefetches answers, serves custom DNS mappings for your LAN, validates DNSSEC and exposes a REST API and Prometheus metrics. It is Apache-2.0 licensed. Our snippet writes the installation guide's simple config with the StevenBlack hosts list, with `1.1.1.1` in place of its first two resolvers and the `fast` startup strategy added, runs the Docker Hub image pinned to a release tag and publishes DNS on host port 5353. We did not find an upstream RAM minimum, so our 256 MB floor is an estimate. AdGuard Home and Pi-hole give you a dashboard and query log in a browser; Technitium DNS Server is the full DNS server with a console.
What you need
Any VPS with at least 256 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Blocky's installation guide and configuration reference flag these before you rely on it:
non-negotiableThere is no web interface and no login: the REST API and metrics on port 4000 are unauthenticated plain HTTP. Anyone who can reach that port can disable blocking through the API, so do not publish it beyond a private network, or put an authenticating reverse proxy in front.
non-negotiableThe image ships cap_net_bind_service and runs as UID 100, so binding port 53 inside the container works. On the host, Ubuntu's systemd-resolved already holds port 53, so our snippet publishes DNS on 5353. To serve ordinary clients, free port 53 (for example DNSStubListener=no in a drop-in under /etc/systemd/resolved.conf.d/) and change the mappings to 53:53; clients cannot use a non-standard port.
non-negotiableConfig is read from /app/config.yml, which our snippet bind-mounts read-only from the current directory; edit the file and restart the container to change it. Our config sets the fast startup strategy for upstreams and lists so the container comes up before the lists have downloaded; the default waits for them. Do not enable query logging to a bind-mounted directory without making it writable for UID 100, as the guide explains.
non-negotiableA client that can reach the resolver at all can use it, so keep it off the public internet to avoid an open resolver; the configuration reference also describes a per-client rateLimit setting. We pin v0.35.0 (released 2026-09-05); read the release notes before moving to a newer tag.