Skip to content
Olivier Poitrey edited this page Apr 5, 2024 · 43 revisions

NextDNS CLI is a DNS53 to DNS-over-HTTPS (DoH) proxy with advanced capabilities to get the most out of the NextDNS service. Although the most advanced features will only work with NextDNS, this program can work as a client for any DoH provider or a mix of NextDNS + another DNS (split horizon).

The CLI is mostly aimed at routers and UNIX based systems, but it is also a great client for windows and macOS for people who prefer a fully open-source clients and don't mind the lack of GUI.

Installation

You will need a NextDNS profile ID to complete the installation.

On most platforms, the following command is enough to install NextDNS CLI:

sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'

Please see below for more detailed instructions for your platform.

In case of installation issue, please search our issue tracker for an existing solution, or please report your problem otherwise.

To upgrade or uninstall the NextDNS CLI, run the same install command again and select "Upgrade" or "Uninstall" from the menu.

Snapshot binaries can be downloaded here.

Basic Usage

Once installed, the nextdns command can be used to control the service. Here are the important commands to know:

To start, stop, restart the daemon:

> nextdns start
> nextdns stop
> nextdns restart

(do not use the run subcommand unless you know what you are doing).

To un/configure the local host to point to NextDNS CLI:

> nextdns activate
> nextdns deactivate

To show daemon logs:

> nextdns log

For more commands:

> nextdns help

Features

  • Stub DNS53 to DoH proxy.
  • Auto discovery and forwarding of LAN client's name and model.
  • Supports a vast number of platforms / OS / routers.
  • Can run on single host or at router level.
  • Local cache
  • Auto router setup (integrate with many different router firmware).
  • Serve from /etc/hosts.
  • Multi upstream healthcheck / fallback.
  • Conditional forwarder selection based on domain.
  • Conditional NextDNS Profile ID selection based on client subnet prefix or MAC address.
  • Auto detection of captive portals.

Advanced Usages

Supported Platforms