NPM / CLI
Run the OpenBotAuth Proxy using npm or npx.
Package: @openbotauth/proxy
Quick Start
# Run without installing (recommended)
npx @openbotauth/proxy
# Or install globally
npm install -g @openbotauth/proxy
openbotauth-proxyRequirements: Node.js >= 18.0.0
Installation Methods
npx (No Install)
Run directly without installing:
npx @openbotauth/proxyGlobal Install
After global install, run with:
Local Install
Add to your project:
Then run via npm scripts in package.json:
Configuration
All configuration is via environment variables:
PORT
8088
Proxy listen port
UPSTREAM_URL
http://localhost:8080
Backend server URL
OBA_VERIFIER_URL
https://verifier.openbotauth.org/verify
Verifier service endpoint
OBA_MODE
observe
observe or require-verified
OBA_TIMEOUT_MS
5000
Verifier request timeout (ms)
OBA_PROTECTED_PATHS
/protected
Comma-separated paths requiring verification
Usage Examples
Basic Usage
Proxy requests from port 8088 to localhost:8080:
Custom Backend
Proxy to a different backend:
Custom Port
Run on a different port:
Require Verification
Enforce verification on all paths:
Protected Paths Only
Require verification only on specific paths:
Full Configuration
Process Managers
PM2
systemd
Programmatic Usage
You can also use the proxy programmatically in your Node.js application:
Health Check
Verify the proxy is running:
Response:
Logging
The proxy logs to stdout:
Troubleshooting
Proxy won't start
Check that the port is available:
Verification always fails
Check the verifier URL is accessible
Verify the bot is sending correct RFC 9421 headers
Check clock synchronization (signatures expire)
Timeout errors
Increase the timeout:
Backend not receiving requests
Verify
UPSTREAM_URLis correctCheck backend is running and accessible
Test direct connection to backend
Links
Last updated