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.- Build the gate's container
docker build -t constile-proxy https://constile.app/install/constile-proxy-0.6.0.tar.gz
- Put your site's settings in a fileRun
CONSTILE_SITE_ID=your-site-id CONSTILE_SITE_SECRET=your-site-secret CONSTILE_NETWORK_URL=https://constile.app
chmod 600 constile.envso only you can read it. - Add it to Docker Compose, next to your app and web serverThe fixed addresses let the gate trust exactly your web server. Don't publish the gate's port: only your web server needs it.
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 - 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.
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.