Skip to content

Documentation

Integrate Antibot in Minutes

The Antibot agent runs locally next to Nginx, evaluating traffic in sub-milliseconds without routing user data through third-party servers.

1. Create Protected Site in Dashboard
Register your domain in the dashboard to generate your Site ID and synchronized policy configuration.
dashboard
# Example Site ID generated in dashboard:
SITE_ID="shop-demo"
2. Add Nginx auth_request Location
Point Nginx to the local Antibot Agent (/v1/check) to evaluate every incoming request before it reaches your backend.
nginx.conf
location = /__antibot_check {
    internal;
    proxy_pass http://antibot_agent:8081/v1/check;
    proxy_method POST;
    proxy_pass_request_body off;
    proxy_set_header Content-Length "";
    proxy_set_header Host $host;
    proxy_set_header X-Original-Host $host;
    proxy_set_header X-Original-Method $request_method;
    proxy_set_header X-Original-URI $request_uri;
    proxy_set_header X-Request-ID $request_id;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header User-Agent $http_user_agent;
    proxy_set_header Sec-CH-UA-Platform $http_sec_ch_ua_platform;
    proxy_set_header Cookie $http_cookie;
}
3. Keep Challenges Agent-local
Forward signed challenge tickets to the local agent. The ticket—not a query parameter—selects PoW or CAPTCHA and binds the original request.
nginx.conf
location ^~ /__antibot/ {
    proxy_pass http://antibot_agent:8081;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
}

location = /__antibot_challenge_internal {
    internal;
    proxy_pass http://antibot_agent:8081/__antibot/challenge?ticket=$antibot_ticket&method=$antibot_method&return=$request_uri;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
}

location / {
    auth_request /__antibot_check;
    auth_request_set $antibot_ticket $upstream_http_x_antibot_challenge_ticket;
    auth_request_set $antibot_method $upstream_http_x_antibot_challenge_method;
    error_page 401 = /__antibot_challenge_internal;
    error_page 403 429 = @__antibot_denied;
    proxy_pass http://your_app_backend;
}
Nginx Integration Guide
Add the auth_request subrequest block to your Nginx configuration to protect your entire website at the edge.
Docker Compose Setup
Deploy the Antibot Agent as a lightweight container alongside your Nginx and web services.