Automated domain blocking controller for NextDNS with per-domain scheduling
Project description
NextDNS Blocker
Automated domain blocking with per-domain scheduling via the NextDNS API. Build healthier digital habits through intelligent scheduling and friction-based protection.
Features
- Per-domain scheduling - Configure unique availability hours for each domain
- Domain categories - Group domains together with shared schedules
- NextDNS Parental Control - Enable/disable native NextDNS categories and services
- Unblock delays - Add friction against impulsive unblocking (30m, 4h, 24h, or never)
- Panic mode - Emergency lockdown that blocks all domains
- Cross-platform - Native support for macOS, Linux, and Windows
- Automatic sync - Watchdog runs every 2 minutes to enforce schedules
- Discord notifications - Real-time alerts for block/unblock events
- Allowlist with schedules - Time-based exceptions for specific domains
- Priority-based filtering - Allowlist always wins over category/service blocks
Quick Install
Homebrew (macOS/Linux)
brew tap aristeoibarra/tap
brew install nextdns-blocker
nextdns-blocker init
pip
pip install nextdns-blocker
nextdns-blocker init
Docker
git clone https://github.com/aristeoibarra/nextdns-blocker.git
cd nextdns-blocker
cp .env.example .env && cp config.json.example config.json
docker compose up -d
Quick Start
- Get your NextDNS API Key and Profile ID
- Run
nextdns-blocker initto configure - Edit your domains:
nextdns-blocker config edit - Install watchdog:
nextdns-blocker watchdog install
Documentation
For complete documentation, visit: nextdns-blocker.pages.dev
Basic Commands
nextdns-blocker sync # Sync based on schedules
nextdns-blocker status # Check current blocking status
nextdns-blocker pause [minutes] # Pause blocking temporarily
nextdns-blocker resume # Resume blocking
nextdns-blocker unblock <domain> # Manually unblock a domain
nextdns-blocker panic <minutes> # Activate emergency lockdown
Example Configuration
{
"blocklist": [
{
"domain": "reddit.com",
"unblock_delay": "30m",
"schedule": {
"available_hours": [
{
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"time_ranges": [
{"start": "12:00", "end": "13:00"},
{"start": "18:00", "end": "22:00"}
]
}
]
}
}
]
}
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nextdns_blocker-6.5.4.tar.gz.
File metadata
- Download URL: nextdns_blocker-6.5.4.tar.gz
- Upload date:
- Size: 208.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
226322c8135cd34d26cb31a17b86e3f7e38b8a236b78781c2154855ae7e4774d
|
|
| MD5 |
f0951a3e894034c54ebbf0c75cd88d87
|
|
| BLAKE2b-256 |
921db150167b0d1f4bdd3ea85ae81f85c5e81e1bdf9696d028611e7f2daea3b6
|
Provenance
The following attestation bundles were made for nextdns_blocker-6.5.4.tar.gz:
Publisher:
publish.yml on aristeoibarra/nextdns-blocker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nextdns_blocker-6.5.4.tar.gz -
Subject digest:
226322c8135cd34d26cb31a17b86e3f7e38b8a236b78781c2154855ae7e4774d - Sigstore transparency entry: 786995871
- Sigstore integration time:
-
Permalink:
aristeoibarra/nextdns-blocker@3cdbb76c24a3bfbf891839acf3b45634cd0279f7 -
Branch / Tag:
refs/tags/v6.5.4 - Owner: https://github.com/aristeoibarra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3cdbb76c24a3bfbf891839acf3b45634cd0279f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nextdns_blocker-6.5.4-py3-none-any.whl.
File metadata
- Download URL: nextdns_blocker-6.5.4-py3-none-any.whl
- Upload date:
- Size: 102.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f6ce26a241f487e1fcd43b097bf183118c8e0f0cfe7523d334a906fc7296d9
|
|
| MD5 |
91e7171aa9a45d45b6f537106d82dacc
|
|
| BLAKE2b-256 |
09ab84bf60618219544d372c1a5648631bd3e21b27e279dafa33f7e60c1aae3f
|
Provenance
The following attestation bundles were made for nextdns_blocker-6.5.4-py3-none-any.whl:
Publisher:
publish.yml on aristeoibarra/nextdns-blocker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nextdns_blocker-6.5.4-py3-none-any.whl -
Subject digest:
70f6ce26a241f487e1fcd43b097bf183118c8e0f0cfe7523d334a906fc7296d9 - Sigstore transparency entry: 786995873
- Sigstore integration time:
-
Permalink:
aristeoibarra/nextdns-blocker@3cdbb76c24a3bfbf891839acf3b45634cd0279f7 -
Branch / Tag:
refs/tags/v6.5.4 - Owner: https://github.com/aristeoibarra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3cdbb76c24a3bfbf891839acf3b45634cd0279f7 -
Trigger Event:
push
-
Statement type: