# Install smartdns with Homebrew, apt, Nix, pacman

Rule-based DNS server for fast IP resolution, DoT/DoQ/DoH/DoH3 supported. Version 0.13.1 via Homebrew; verified 2026-06-27.

## Install

```sh
sudo av install brew:smartdns
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install smartdns
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install smartdns
```

  Evidence: Debian stable package indexes: smartdns from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#smartdns
```

  Evidence: nixpkgs package indexes: pkgs/by-name/sm/smartdns/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S smartdns
```

  Evidence: Arch Linux sync databases: smartdns from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:smartdns
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/smartdns>
- **Version:** 0.13.1
- **Source summary:** Rule-based DNS server for fast IP resolution, DoT/DoQ/DoH/DoH3 supported
- **Homepage:** <https://github.com/mokeyish/smartdns-rs>
- **Repository:** <https://github.com/mokeyish/smartdns-rs>
- **Upstream docs:** <https://github.com/mokeyish/smartdns-rs#readme>
- **License:** GPL-3.0-only
- **Source archive:** <https://github.com/mokeyish/smartdns-rs/archive/refs/tags/v0.13.1.tar.gz>
- **Last updated:** 2026-06-27T19:43:42Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- smartdns (cli)
- smartdns (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Service: declared
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.13.1
- Package-manager updated: 2026-06-27
- Local data: ok
- Upstream repository: https://github.com/mokeyish/smartdns-rs
- Upstream latest detected: v0.13.1 (current)
## Project history and usage

SmartDNS-rs is a Rust implementation of the SmartDNS idea: a local DNS server that queries multiple upstream resolvers and returns the fastest result for the local network. In package-manager terms it sits in the same practical niche as dnsmasq-like local resolvers, but with modern encrypted DNS protocols and cross-platform packaging.

### Project history

The upstream SmartDNS project documents the core design: accept local DNS queries, ask multiple upstream DNS servers, test or select the fastest reachable address, and return that result. SmartDNS-rs states that it was inspired by the C SmartDNS project and was written because the original was mainly Linux-oriented while the Rust version targets Windows, macOS, Linux, and Android Termux with compatible configuration.

### Adoption history

SmartDNS-rs gained package-manager visibility through Homebrew as `smartdns`, with the README documenting `brew install smartdns` and service startup through Homebrew services. The supplied package metadata also records packages in Debian, Ubuntu, Arch, and Nix, which places it beyond a single-platform GitHub binary.

### How it is used

Typical use is as a local DNS daemon, often listening on port 53, configured with upstream DoH, DoT, DoQ, or DoH3 resolvers and domain-specific rules. The README shows running it with `smartdns run -c ./smartdns.conf -v`, installing it as a service, and using `dig` CHAOS TXT diagnostics for server/client information.

### Why package nerds care

Package maintainers care because SmartDNS-rs combines DNS daemon behavior, privileged port binding, service integration, cross-platform binaries, and Rust dependency management in one formula. It is also a small example of a C networking utility being reworked for broader package-manager portability.

### Timeline

- 2022: First GitHub release of smartdns-rs, 0.1.3, was published.
- 2020s: README documents Homebrew installation and cross-platform service management.
- 2020s: The Rust version documents compatibility with the original C SmartDNS configuration model.

### Related projects

- The README names the original C SmartDNS project as inspiration and Hickory DNS as a dependency or code source. It also positions the tool near dnsmasq-like local DNS servers.

### Sources

- GitHub releases API for mokeyish/smartdns-rs: first published release 0.1.3 on 2022-12-04.
- <https://github.com/mokeyish/smartdns-rs README: description, C SmartDNS inspiration, cross-platform rationale, install and usage examples.>
- <https://pymumu.github.io/smartdns/en/: original SmartDNS design, fastest-IP behavior, platform and protocol support.>
- input source_facts.package-manager: Homebrew, Debian, Ubuntu, Nix, and Arch package names.


## Security Notes

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./smartdns.conf, ./etc/smartdns/smartdns.conf
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** smartdns
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - smartdns - 46.1+dfsg-1: normalized package name match | Debian stable package indexes: smartdns from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | local DNS server to obtain the fastest IP for the best experience | https://github.com/pymumu/smartdns
- Nix - smartdns: normalized package name match | nixpkgs package indexes: pkgs/by-name/sm/smartdns/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - smartdns - 45+dfsg-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: smartdns from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | local DNS server to obtain the fastest IP for the best experience | https://github.com/pymumu/smartdns
- pacman - smartdns - 48-1: normalized package name match | Arch Linux sync databases: smartdns from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A local DNS server to obtain the fastest website IP for the best Internet experience | https://github.com/pymumu/smartdns


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [q](https://www.automicvault.com/pkg/brew/q/) - Shares av.db curated category or tags: cli, dns, doh, doq, dot.
- [djbdns](https://www.automicvault.com/pkg/brew/djbdns/) - Shares av.db curated category or tags: cli, dns, dns-server, networking.
- [hickory-dns](https://www.automicvault.com/pkg/brew/hickory-dns/) - Shares av.db curated category or tags: cli, dns, networking, rust.
- [nextdns](https://www.automicvault.com/pkg/brew/nextdns/) - Shares av.db curated category or tags: cli, dns, doh, networking.
- [technitium-dns](https://www.automicvault.com/pkg/brew/technitium-dns/) - Shares av.db curated category or tags: cli, dns, dns-server, networking.
- [adns](https://www.automicvault.com/pkg/brew/adns/) - Shares av.db curated category or tags: cli, dns, networking.
- [aliddns](https://www.automicvault.com/pkg/brew/aliddns/) - Shares av.db curated category or tags: cli, dns, networking.
- [bind](https://www.automicvault.com/pkg/brew/bind/) - Shares av.db curated category or tags: cli, dns, networking.
- [dnsx](https://www.automicvault.com/pkg/brew/dnsx/) - Local package facts share a topical domain. Shared terms: cli, dns, networking, resolution.

## Combined YAML source

View the package source record on GitHub. [combined/smartdns.yml](https://github.com/automic-vault/db/blob/main/combined/smartdns.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
