# Dnsmasq

Dnsmasq is a lightweight Domain Name System (DNS) forwarder and Dynamic Host Configuration Protocol (DHCP) server designed for small to medium-sized networks. It is open source and self-hosted, installable on Docker Hub and Kubernetes (Helm).

Canonical page: https://ourlocalhost.com/app/6570/dnsmasq

## Description

Dnsmasq is a lightweight Domain Name System (DNS) forwarder and Dynamic Host Configuration Protocol (DHCP) server designed for small to medium-sized networks. It caches DNS responses to speed up name resolution and manages DHCP lease assignments for connected devices, making it a simple, self-contained option for homelab name resolution and IP management.

## Platform availability

Available on 2 of 10 platforms: Unraid, Helm.

## Health score

54/100 (Fair), based on 4 of 5 factors.
- Maintained: 48 (last commit 251 days ago)
- Popular: 52 (395 GitHub stars)
- Easy to install: 45 (2 install platforms, install notes, Docker image)
- Security check: 75 (no serious findings)

## Links

- Docker Hub: https://hub.docker.com/r/dockurr/dnsmasq
- Kubernetes (Helm): https://artifacthub.io/packages/helm/devplayer0/dnsmasq
- GitHub: https://github.com/imp/dnsmasq
- Official website: http://thekelleys.org.uk/dnsmasq/doc.html
- Documentation: http://thekelleys.org.uk/dnsmasq/docs/FAQ

## Common questions

### How do I give a router, printer, or NAS a fixed IP address with Dnsmasq?

Add one dhcp-host line using the device's MAC address or hostname. Without this, the device may receive a different address and become harder to reach.

### Why do local device names fail to resolve even though public DNS works?

Dnsmasq reads /etc/hosts to answer for your own devices. If that file is missing or inaccurate, local names like your server or printer may not resolve.

### How do I point Dnsmasq at a specific upstream DNS server for a particular domain?

Add a domain name to the server specification. Dnsmasq will use that server only to find names in that particular domain.

### Should I run Dnsmasq in Docker?

A community reply says Dnsmasq is small and architecturally simple, so running it bare metal with a config file can avoid extra overhead. The reply did not identify a Docker container and suggested that a compose file may be unnecessary overhead.

## Alternatives

- AdGuard Home: AdGuard Home is a self-hosted DNS server that blocks ads and trackers across your entire home network by re-routing tracking domains to a b…
- BIND: BIND is by far the most widely used DNS software on the Internet.
- NextDNS: NextDNS protects you from all kinds of security threats, blocks ads and trackers on websites and in apps and provides a safe and supervised…
- Technitium DNS Server: Technitium DNS Server is an open source tool that can be used as a personal local DNS server for privacy &amp; security.
- Unbound: Unbound is a validating, recursive, and caching DNS resolver that you can self-host to run your own DNS server at home.
- YogaDNS: YogaDNS automatically intercepts DNS requests at the system level and allows you to process them over user-defined DNS servers using modern…
- coredns: CoreDNS is a flexible, plugin-based DNS server and forwarder that chains plugins for service discovery, metrics, query rewriting, and zone…
- hBlock: hBlock is a POSIX-compliant shell script, designed for Unix-like systems, that gets a list of domains that serve ads, tracking scripts and…

---
Source: Our Local Host (https://ourlocalhost.com/app/6570/dnsmasq), the self-hosted and open-source app directory.
