Skip to content

Installation

Choose the installation method that best fits your environment.

The recommended method for macOS and Linux users:

Terminal window
# Add the tap
brew tap aristeoibarra/tap
# Install
brew install nextdns-blocker
# Verify installation
nextdns-blocker --version
Terminal window
brew upgrade nextdns-blocker

Works on any platform with Python 3.9+:

Terminal window
# Install from PyPI
pip install nextdns-blocker
# Or with pipx for isolated installation
pipx install nextdns-blocker
# Verify installation
nextdns-blocker --version
Terminal window
pip install --upgrade nextdns-blocker
# Or check for updates within the tool
nextdns-blocker update

For development or the latest unreleased features:

Terminal window
# Clone the repository
git clone https://github.com/aristeoibarra/nextdns-blocker.git
cd nextdns-blocker
# Install in editable mode
pip install -e .
# Verify installation
nextdns-blocker --version

For contributing or running tests:

Terminal window
pip install -e ".[dev]"
pytest tests/ -v

Automated installation script for Windows:

Terminal window
# Download and run the installer
irm https://raw.githubusercontent.com/aristeoibarra/nextdns-blocker/main/install.ps1 | iex
# Or run locally after cloning
.\install.ps1

The installer will:

  1. Check for Python installation
  2. Install the package via pip
  3. Run the interactive setup wizard
  4. Configure Windows Task Scheduler for automatic sync

Run NextDNS Blocker in a container:

Terminal window
# Clone the repository
git clone https://github.com/aristeoibarra/nextdns-blocker.git
cd nextdns-blocker
# Copy configuration templates
cp .env.example .env
cp config.json.example config.json
# Edit your configuration
nano .env # Add API key and profile ID
nano config.json # Configure domains
# Start the container
docker compose up -d

See Docker Setup for detailed configuration.

After installation, verify everything works:

Terminal window
# Check version
nextdns-blocker --version
# View available commands
nextdns-blocker --help
# Run the setup wizard
nextdns-blocker init
RequirementMinimumRecommended
Python3.93.11+
RAM50 MB100 MB
Disk20 MB50 MB
NetworkRequired-
  • macOS: No additional requirements
  • Linux: cron for scheduled sync
  • Windows: Task Scheduler service running
Terminal window
# Check Python version
python3 --version
# On Windows, try:
python --version

If Python isn’t installed, download from python.org.

Terminal window
# Use --user flag
pip install --user nextdns-blocker
# Or use pipx
pipx install nextdns-blocker

The installation directory might not be in your PATH:

Terminal window
# Find where pip installed it
pip show nextdns-blocker
# Add to PATH (example for ~/.local/bin)
export PATH="$HOME/.local/bin:$PATH"

Add this export to your shell’s rc file (.bashrc, .zshrc, etc.).

After installation, run the Quick Setup wizard to configure your credentials.