Prerequisites
- Docker installed
- A web application to protect (or use the example below)
Quick Start
Run Anubis with Docker
Start Anubis as a reverse proxy in front of your application:Configuration explained:
BIND: Network address to listen on (default::8923)TARGET: Your application’s URL to protectDIFFICULTY: Challenge difficulty level (1-10, default: 4)POLICY_FNAME: Path to policy configuration file- Port
8923: Main HTTP service - Port
9090: Metrics and health checks
Docker Compose Example
For production deployments, use Docker Compose:docker-compose.yml
Common Configuration Options
Key environment variables fromcmd/anubis/main.go:
| Variable | Default | Description |
|---|---|---|
BIND | :8923 | Network address to bind HTTP to |
TARGET | http://localhost:3923 | Backend application URL |
DIFFICULTY | 4 | Challenge difficulty (1-10) |
POLICY_FNAME | Built-in | Path to policy YAML file |
METRICS_BIND | :9090 | Metrics endpoint address |
COOKIE_EXPIRATION_TIME | 24h | Auth cookie validity period |
SLOG_LEVEL | INFO | Logging level (DEBUG, INFO, WARN, ERROR) |
USE_REMOTE_ADDRESS | false | Read client IP from network request |
XFF_STRIP_PRIVATE | true | Strip private IPs from X-Forwarded-For |
Production Policy Example
For production use, import curated bot policies:policy.yaml
Next Steps
Configuration Reference
Explore all configuration options
Policy Configuration
Learn about bot detection rules
Docker Deployment
Production Docker setup
Integration Guides
Integrate with reverse proxies
Troubleshooting
Health check fails
Ensure both ports are exposed and Anubis has started:Policy file not loading
Verify the volume mount and file permissions:Backend connection errors
Check thatTARGET points to a reachable URL from within the container: