Every host and framework

Set up Constile on Docker

Constile's gate runs in front of your pages. An AI agent fetching a page for a person gets an offer; people, search engines, and subscribers get your site as they do today.
Before you start
Sign up and add your site. Its page shows the site ID and secret these steps use, checks the install, and has Test my site. Rather have our team set it up with you? Select Get help installing on that page.
  1. Build the gate's container
    docker build -t constile-proxy https://constile.app/install/constile-proxy-0.6.0.tar.gz
  2. Put your site's settings in a file
    CONSTILE_SITE_ID=your-site-id
    CONSTILE_SITE_SECRET=your-site-secret
    CONSTILE_NETWORK_URL=https://constile.app
    Run chmod 600 constile.env so only you can read it.
  3. Add it to Docker Compose, next to your app and web server
    services:
      app:
        image: your-app
      constile:
        image: constile-proxy
        restart: unless-stopped
        env_file: constile.env
        environment:
          CONSTILE_ORIGIN: http://app:3000
          CONSTILE_TRUSTED_PROXIES: 172.30.0.10
        networks:
          default: { ipv4_address: 172.30.0.20 }
      web:
        image: nginx:1.30-alpine
        ports: ["80:80", "443:443"]
        volumes: ["./nginx.conf:/etc/nginx/nginx.conf:ro"]
        depends_on: [app, constile]
        networks:
          default: { ipv4_address: 172.30.0.10 }
    
    networks:
      default:
        ipam:
          config:
            - subnet: 172.30.0.0/24
    The fixed addresses let the gate trust exactly your web server. Don't publish the gate's port: only your web server needs it.
  4. Send agents to it from your web serverAdd the snippet from the nginx, Apache, or Caddy steps, with http://constile:8080 as the gate's address.
  5. Check the installDeploy, then select Check install on your site's page. The network asks your domain for /.well-known/constile, and the gate answers with your site secret. Then Test my site shows what a person, a search crawler, and an AI agent each get.
The full guide covers every option, proxies and load balancers, and caches.

Turn it off

Fastest, from your dashboard: once the gate is installed, select Pause offers under Manage on your site's page. The network stops making offers, and the gate passes every request through within a minute. Nothing changes on your server.On your site: Take the gate's lines out of your web server's config and reload it: agents then go straight to your site. Or set CONSTILE_DISABLED=1 in constile.env and run docker compose up -d constile. Keep the container running while your web server still sends agents to it.To take it out: Take the lines out, reload your web server, then remove the constile service.Off or paused, people, search crawlers, subscribers, and your other ads get your site exactly as before.