[moderation] section controls user reporting, post filtering, and content management.
Basic moderation settings
Enable moderation features including post hiding, reporting, and admin interface
Enable moderation API endpoints for programmatic access
Administrator username for login
Administrator password for login
Post reporting and hiding
Hide posts immediately when reported by users. Takes precedence over
n_reports_then_hide.Number of reports from different IP addresses required to automatically hide a post. Only applies if
hide_post_if_reported is false.Hide posts that were deleted by upstream staff (e.g., 4chan moderators) in the live archive
When an OP (original post/thread starter) is hidden, also hide all replies to that thread
Report hiding strategies
Report hiding strategies
Immediate hiding:First report immediately hides the post.Threshold-based hiding:Requires 3 reports from different IPs before hiding.Manual review only:Reports are tracked but posts are never auto-hidden. Admin must manually review and hide.
Content filtering
Regular expression pattern for filtering posts. Posts matching this pattern will never be served.Example:
'gentoo|based' blocks posts containing “gentoo” or “based”Leave empty ('') to disable regex filtering.Path to sqlite-regex shared object file for regex filtering support. Download from sqlite-regex releases.Required only when using SQLite as filter cache and
regex_filter is not empty.Filter cache storage
The filter cache stores information about reported and hidden posts. Choose between SQLite and Redis.Storage backend for filter cacheOptions:
sqlite- File-based storage, simpler setupredis- In-memory storage, better performance
SQLite filter cache
Path to the SQLite moderation database file. Can be relative or absolute.
Redis filter cache
Redis database number for filter cache data
Key prefix for filter cache entries in Redis
Directory for filter cache persistence/dumps
Bloom filter false positive rate (1% default). Lower values use more memory but have fewer false positives.
Initial bloom filter capacity per board. Set based on expected number of hidden posts.
Growth factor when bloom filter capacity is reached (doubles by default)
Total cuckoo filter capacity per board
Capacity per cuckoo filter bucket
Maximum bucket swaps per (board, num) in cuckoo filter
Bloom filter vs Cuckoo filter
Bloom filter vs Cuckoo filter
Bloom filter:
- Space-efficient probabilistic data structure
- Fast membership tests
- May have false positives (controlled by
bloom_err_rate) - Cannot remove items
- Supports deletions
- More memory efficient at larger sizes
- Better worst-case lookup performance
- Used for smaller, more dynamic sets
Hidden images
Directory where images from hidden posts should be moved. If empty, images remain accessible via their URLs even when posts are hidden.Example:
/home/garbage/disposalMoving images to a hidden directory prevents them from being served, even if users have direct links.
Authentication settings
The[moderation.auth] section controls authentication cookies and bearer tokens for moderation access.
SameSite cookie attribute for CSRF protectionOptions:
Strict- Cookies only sent for same-site requestsLax- Cookies sent for top-level navigationNone- Cookies sent with all requests (requirescookie_secure = true)
Require HTTPS for auth cookies. Set to
true in production with HTTPS.Prevent JavaScript access to auth cookies (security best practice)
Name of the authentication cookie
Salt for cookie token generation. Change to a random value.
Salt for API bearer token generation. Change to a random value.
Cookie validity duration in seconds (default: 604800 = 1 week)
Bearer token validity duration in seconds (default: 604800 = 1 week)
Generating secure salts
Generating secure salts
Generate random salts using Python:Or use OpenSSL:
Configuration examples
Security best practices
Change default credentials
Change default credentials
Never use default
admin/admin credentials in production.Use HTTPS in production
Use HTTPS in production
Always enable secure cookies when using HTTPS:
Generate random salts
Generate random salts
Use cryptographically random salts:Different salt for cookies vs bearer tokens.
Customize login endpoint
Customize login endpoint
Change the login URL to reduce automated attacks:
Regular credential rotation
Regular credential rotation
Periodically update:
- Admin password
- Cookie salt
- Bearer salt
- Login endpoint path
Troubleshooting
Cannot log in to admin panel
Cannot log in to admin panel
- Verify
admin_userandadmin_passwordare correct - Check
moderation.enabled = true - Confirm login endpoint path (default
/login, or custom in[app]) - Review browser cookies (may need to clear old cookies)
- Check application logs for authentication errors
Posts not being hidden after reports
Posts not being hidden after reports
Regex filter not working
Regex filter not working
- Verify
regex_filterpattern is valid - For SQLite: ensure
path_to_regex_sopoints to valid sqlite-regex library - Test regex pattern separately before deploying
- Check application logs for regex compilation errors
Hidden images still accessible
Hidden images still accessible