Ansible crw role
https://github.com/us/crw
- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
crw (fastCRW)
Deploys crw — a self-hosted, Firecrawl-compatible scrape/crawl API — via Docker Compose, with Lightpanda for JavaScript rendering and optional headless Chrome. Used by agents to turn URLs into Markdown (e.g. Hermes web_extract via FIRECRAWL_API_URL) without a third-party service.
Requirements
- Docker
community.dockerAnsible collection (>=5.2.0)
Variables
| Variable | Default | Description |
|---|---|---|
crw_instance |
crw |
Unique instance name. Used as Compose project name and container names. |
crw_docker_path |
/docker/crw |
Host path for the Compose file and config.toml. |
crw_image |
ghcr.io/us/crw |
crw image. |
crw_version |
0.36.0 |
crw image tag. |
crw_port |
3000 |
Host port (container port 3000). |
crw_bind_address |
0.0.0.0 |
Host address the port binds to. |
crw_api_keys |
[] |
Required. Bearer keys, one per consumer. openssl rand -hex 32 |
crw_searxng_url |
~ |
SearXNG for crw's own /v1/search. Optional. |
crw_lightpanda_enabled |
true |
Lightweight JS renderer. |
crw_lightpanda_version |
1.0.0 |
Lightpanda image tag. |
crw_chrome_enabled |
false |
Headless Chrome fallback renderer (~2 GB RAM). |
crw_chrome_version |
151.0.7922.109 |
chromedp/headless-shell image tag. |
crw_mem_limit |
1g |
crw memory ceiling. Also crw_lightpanda_mem_limit, crw_chrome_mem_limit. |
crw_uninstall |
false |
Stops and removes containers and the compose directory. |
Usage
crw_api_keys:
- "{{ vault_crw_key_hermes }}"
crw_searxng_url: "http://10.20.0.5:8080"
Test: curl -H "Authorization: Bearer <key>" -H 'Content-Type: application/json' -d '{"url":"https://example.com","formats":["markdown"]}' http://<host>:3000/v2/scrape
Notes
- API keys are mandatory. crw fetches arbitrary URLs for whoever calls it. Use one key per consumer so one can be revoked alone.
- Internal targets are blocked. crw refuses private/loopback addresses for plain fetches, and Lightpanda runs with
--block-private-networks. The Chrome renderer has no such flag — prefer keeping it off or restrict the VM's egress. - Browsers are not published. Their CDP ports are only on an internal Docker network shared with crw.
- Stateless. Read-only root filesystem, tmpfs scratch, no data directory.