Skip to content

Documentation

Docker Sidecar Setup

The agent runs as a lightweight container on the same internal network as your reverse proxy, evaluating incoming requests with zero public exposure.

1. docker-compose.yml
Define the Antibot agent sidecar and connect it to your Nginx gateway service.
docker-compose.yml
services:
  antibot-agent:
    image: antibot/agent:latest
    restart: unless-stopped
    environment:
      ANTIBOT_LISTEN: 0.0.0.0:8081
      ANTIBOT_POLICY: /etc/antibot/policy.json
      ANTIBOT_CONTROL_URL: https://api.pakmail.my.id
      ANTIBOT_ENROLLMENT_KEY: your_enrollment_key_here
      ANTIBOT_RATE_STATE: /var/lib/antibot/rate-limits.json
    volumes:
      - ./policy.json:/etc/antibot/policy.json:ro
      - agent-data:/var/lib/antibot
    networks: [protected]

  nginx:
    image: nginx:1.27-alpine
    restart: unless-stopped
    depends_on: [antibot-agent]
    ports: ["80:80", "443:443"]
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - /etc/letsencrypt:/etc/letsencrypt:ro
    networks: [protected]

volumes:
  agent-data: {}

networks:
  protected: {}
2. Start and Monitor
Start the containers and verify that the agent syncs policies with the control plane.
bash
# Start the Antibot stack
docker compose up -d

# Inspect agent live inspection logs
docker compose logs -f antibot-agent