When managing multiple Vercel projects, keeping firewall rules consistent and version-controlled becomes a real challenge. That’s why I built Vercel Doorman – a CLI tool that brings Infrastructure as Code principles to Vercel’s firewall management.
Vercel’s firewall is powerful, but managing rules through the dashboard has limitations:
Vercel Doorman transforms firewall management into a code-first workflow. Instead of clicking through dashboards, you define your security rules in a JSON configuration file:
{
"$schema": "https://doorman.griffen.codes/schema.json",
"projectId": "prj_example",
"rules": [
{
"name": "Block Bad Bots",
"description": "Block known malicious user agents",
"conditionGroup": [
{
"conditions": [
{
"type": "user_agent",
"op": "inc",
"value": ["BadBot", "Scraper", "Crawler"]
}
]
}
],
"action": {
"mitigate": {
"action": "deny"
}
},
"active": true
}
]
}
Rather than starting from scratch, Doorman includes pre-built templates for common security patterns:
The tool works both ways – you can sync local configs to Vercel, or download existing rules from Vercel to start managing them as code.
Built-in Zod schema validation prevents deployment of invalid configurations. The tool also includes dry-run modes and confirmation prompts for destructive operations.
Environment variable support and programmatic interfaces make it perfect for automated deployments:
# In your CI pipeline
vercel-doorman sync --token $VERCEL_TOKEN
I built Doorman with TypeScript and a clean service layer architecture:
The build system uses tsup for fast bundling to both CommonJS and ESM, making it compatible across different Node.js environments.
Since publishing Doorman, I’ve seen teams adopt it for:
I’m continuing to expand the template library and exploring integrations with other security tools. The goal is making Vercel firewall management as seamless as any other infrastructure component.
If you’re managing Vercel projects and want to level up your security workflow, give Vercel Doorman a try:
npm install vercel-doorman
The full source code is available on GitHub, and I’d love to hear how you’re using it in your projects.
Vercel Doorman is open source and available on npm. Check out the documentation to get started.