Skip to content

config.json Structure

The config.json file defines your domain schedules, blocklist, and allowlist.

PlatformPath
macOS/Linux~/.config/nextdns-blocker/config.json
Windows%APPDATA%\nextdns-blocker\config.json
{
"version": "1.0",
"settings": {
"timezone": "America/New_York",
"editor": null
},
"notifications": {
"enabled": true,
"channels": {
"discord": { ... },
"macos": { ... }
}
},
"blocklist": [
{
"domain": "example.com",
"description": "Optional description",
"unblock_delay": "30m",
"schedule": { ... }
}
],
"allowlist": [
{
"domain": "allowed.example.com",
"description": "Optional description",
"schedule": null
}
]
}

Configuration file version. Currently "1.0".

{
"version": "1.0"
}

Global settings for NextDNS Blocker.

{
"settings": {
"timezone": "America/New_York",
"editor": "vim"
}
}
FieldTypeDefaultDescription
timezonestringAuto-detectedIANA timezone for schedules
editorstring$EDITOREditor for config edit

Configuration for notification channels.

{
"notifications": {
"enabled": true,
"channels": {
"discord": {
"enabled": true,
"webhook_url": "https://discord.com/api/webhooks/..."
},
"macos": {
"enabled": true,
"sound": true
}
}
}
}
FieldTypeDefaultDescription
enabledbooleantrueMaster switch for all notifications
channelsobject{}Channel-specific configurations

Discord Channel:

FieldTypeRequiredDescription
enabledbooleanYesEnable Discord notifications
webhook_urlstringYesFull Discord webhook URL

macOS Channel:

FieldTypeDefaultDescription
enabledbooleanfalseEnable macOS native notifications
soundbooleantruePlay sound with notification

See Notifications for complete setup guide.

Array of domains to manage blocking for.

{
"blocklist": [
{
"domain": "reddit.com",
"description": "Social media",
"unblock_delay": "30m",
"schedule": { ... }
}
]
}

See Blocklist Configuration for details.

Array of domains to keep accessible (exceptions).

{
"allowlist": [
{
"domain": "aws.amazon.com",
"description": "Work resource"
}
]
}

See Allowlist Configuration for details.

Configuration for NextDNS Parental Control categories and services.

{
"nextdns": {
"parental_control": {
"safe_search": true,
"youtube_restricted_mode": true,
"block_bypass": true
},
"categories": [
{
"id": "gambling",
"locked": true,
"schedule": null
}
],
"services": [
{
"id": "tiktok",
"schedule": {
"available_hours": [...]
}
}
]
}
}
FieldTypeDescription
parental_controlobjectGlobal Parental Control settings
categoriesarrayNextDNS native categories (gambling, porn, dating, etc.)
servicesarrayNextDNS native services (tiktok, youtube, reddit, etc.)

Valid category IDs: porn, gambling, dating, piracy, social-networks, gaming, video-streaming

Addiction protection features including auto-panic and unlock delays.

{
"protection": {
"unlock_delay_hours": 48,
"auto_panic": {
"enabled": true,
"cannot_disable": true,
"schedule": {
"start": "23:00",
"end": "06:00"
},
"days": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
}
}
}
FieldTypeDefaultDescription
unlock_delay_hoursint48Default delay for unlock requests (min 24h)
auto_panicobjectnullAuto-panic configuration
auto_panic.enabledbooleanfalseEnable auto-panic mode
auto_panic.cannot_disablebooleanfalsePrevent disabling (requires unlock request)
auto_panic.schedule.startstring”23:00”Time to start auto-panic (HH:MM)
auto_panic.schedule.endstring”06:00”Time to end auto-panic (HH:MM)
auto_panic.daysarrayall daysDays when auto-panic is active

Both blocklist and allowlist entries share these fields:

The domain name to manage.

{
"domain": "reddit.com"
}

Validation:

  • Cannot be empty
  • Must be a valid domain format
  • No protocol prefix (https://)
  • No trailing slash

Examples:

  • reddit.com
  • www.reddit.com
  • api.example.co.uk
  • https://reddit.com
  • reddit.com/
  • ❌ “ (empty)

Human-readable description.

{
"domain": "reddit.com",
"description": "Social media - limited access during work"
}

Shown in status and config show output.

Time-based availability rules.

{
"domain": "reddit.com",
"schedule": {
"available_hours": [
{
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"time_ranges": [
{"start": "12:00", "end": "13:00"},
{"start": "18:00", "end": "22:00"}
]
}
]
}
}

See Schedules for complete documentation.

Special values:

  • null - Always blocked (blocklist) or always allowed (allowlist)
  • Omitted - Same as null

Friction before manual unblocking.

{
"domain": "reddit.com",
"unblock_delay": "30m"
}

See Unblock Delay for details.

Valid values:

  • "0" - Instant
  • "30m" - 30 minutes
  • "4h" - 4 hours
  • "24h" - 24 hours
  • "never" - Protected

Array of day/time rules defining when a domain is accessible.

{
"schedule": {
"available_hours": [
{
"days": ["monday", "friday"],
"time_ranges": [
{"start": "09:00", "end": "17:00"}
]
}
]
}
}

Array of weekday names (lowercase).

{
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}

Valid values:

  • monday
  • tuesday
  • wednesday
  • thursday
  • friday
  • saturday
  • sunday

Array of time windows.

{
"time_ranges": [
{"start": "09:00", "end": "12:00"},
{"start": "13:00", "end": "17:00"}
]
}

Format: 24-hour time HH:MM

  • Hours: 00 to 23
  • Minutes: 00 to 59

Examples:

  • "09:00" - 9:00 AM
  • "13:30" - 1:30 PM
  • "23:59" - 11:59 PM
  • "00:00" - Midnight
{
"version": "1.0",
"settings": {
"timezone": "America/New_York",
"editor": "code --wait"
},
"notifications": {
"enabled": true,
"channels": {
"discord": {
"enabled": true,
"webhook_url": "https://discord.com/api/webhooks/123456/abcdef..."
},
"macos": {
"enabled": true,
"sound": true
}
}
},
"blocklist": [
{
"domain": "reddit.com",
"description": "Social media - breaks only",
"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"}
]
},
{
"days": ["saturday", "sunday"],
"time_ranges": [
{"start": "10:00", "end": "23:00"}
]
}
]
}
},
{
"domain": "twitter.com",
"description": "News - evenings only",
"unblock_delay": "0",
"schedule": {
"available_hours": [
{
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"time_ranges": [
{"start": "18:00", "end": "21:00"}
]
}
]
}
},
{
"domain": "gambling-site.com",
"description": "Always blocked - protected",
"unblock_delay": "never",
"schedule": null
}
],
"allowlist": [
{
"domain": "aws.amazon.com",
"description": "Work resource - always accessible"
},
{
"domain": "youtube.com",
"description": "Entertainment - evenings only",
"schedule": {
"available_hours": [
{
"days": ["saturday", "sunday"],
"time_ranges": [
{"start": "14:00", "end": "22:00"}
]
}
]
}
}
]
}
Terminal window
nextdns-blocker config validate
ErrorCauseFix
Invalid JSONSyntax errorCheck commas, quotes, brackets
Unknown fieldTypo in field nameUse correct field names
Invalid timeWrong formatUse HH:MM (24-hour)
Invalid dayWrong day nameUse lowercase full names
Duplicate domainSame domain in both listsRemove from one list
Terminal window
# Python
python3 -m json.tool config.json
# Online
# https://jsonlint.com
Terminal window
nextdns-blocker config edit
Terminal window
# macOS/Linux
nano ~/.config/nextdns-blocker/config.json
# Windows
notepad %APPDATA%\nextdns-blocker\config.json

Changes take effect on next sync (within 2 minutes) or immediately:

Terminal window
nextdns-blocker config push