| name | vercel-doorman |
| description | Use when managing Vercel or Cloudflare WAF rules as code, configuring firewall rules, IP blocking, rate limiting, bot protection, or automating multi-provider security configuration deployment with Doorman CLI. |
Vercel Doorman
Multi-provider WAF automation as code. Manage Vercel Firewall and Cloudflare WAF rules in version-controlled .doorman.json files with automated deployment via CLI.
Key Concepts
- Config file:
.doorman.json (also supports legacy vercel-firewall.config.json)
- Providers: Vercel (default) and Cloudflare (
--provider cloudflare)
- Workflow: Edit config → validate → diff → sync
- Schema:
https://doorman.griffen.codes/schema.json
Commands
vercel-doorman init --interactive
vercel-doorman validate
vercel-doorman status
vercel-doorman list
vercel-doorman diff
vercel-doorman sync
vercel-doorman download
vercel-doorman template <name>
vercel-doorman watch
vercel-doorman backup
vercel-doorman export --format <fmt>
All commands accept --provider vercel|cloudflare and --config <path>.
Environment Variables
VERCEL_TOKEN=your_token
VERCEL_PROJECT_ID=prj_xxx
VERCEL_TEAM_ID=team_xxx
CLOUDFLARE_API_TOKEN=your_token
CLOUDFLARE_ZONE_ID=zone_xxx
CLOUDFLARE_ACCOUNT_ID=acc_xxx
Config Structure
{
"$schema": "https://doorman.griffen.codes/schema.json",
"projectId": "prj_xxx",
"teamId": "team_xxx",
"rules": [],
"ips": []
}
For Cloudflare, use provider and providers fields instead of projectId/teamId.
Rule Quick Reference
{
"id": "rule_block_admin",
"name": "Block Admin Access",
"description": "Block unauthorized admin access",
"active": true,
"conditionGroup": [
{
"conditions": [
{ "type": "path", "op": "pre", "value": "/admin" },
{ "type": "method", "op": "eq", "value": "POST" }
]
}
],
"action": {
"mitigate": {
"action": "deny"
}
}
}
Logic: Conditions within a group are AND'd. Multiple groups are OR'd.
Condition types: path, method, host, user_agent, ip_address, header, query, cookie, geo_country, geo_city, geo_continent, scheme
Operators: eq, pre (starts_with), suf (ends_with), sub (contains), inc (in array), re (regex), ex (exists), nex (not exists)
Actions: deny, challenge, rate_limit, redirect, log, bypass
See rules-reference.md for complete field documentation, advanced patterns, and examples.
IP Blocking
{
"ips": [
{ "ip": "192.168.1.0/24", "action": "deny", "hostname": "bad-subnet", "notes": "Blocked for abuse" }
]
}
Templates
vercel-doorman template bad-bots
vercel-doorman template ai-bots
vercel-doorman template wordpress
vercel-doorman template block-ofac-sanctioned-countries
Workflow
vercel-doorman validate && vercel-doorman sync
vercel-doorman download
vercel-doorman diff
Resources