# Self-host Crawl4AI

> An open source web crawler API that turns pages into clean Markdown and structured data for LLM pipelines, with a built-in playground and MCP endpoint. API calls need the generated token as a Bearer header.

- Page: https://levelrail.com/templates/crawl4ai/
- JSON: https://levelrail.com/templates/crawl4ai.json
- Category: AI
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/unclecode/crawl4ai
- Upstream docs: https://docs.crawl4ai.com/core/docker-deployment/

## Requirements
- Memory: about 2 GiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 0.9.5

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| crawl4ai | unclecode/crawl4ai | 0.9.5 | 11235 | none |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| crawl4ai | CRAWL4AI_API_TOKEN | generated |

## Deploy

### CLI

```bash
levelrail-cli templates install crawl4ai --name my-crawl4ai
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain crawl4ai=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/crawl4ai/install \
  -d '{
    "name": "my-crawl4ai"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Crawl4AI on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id crawl4ai for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image unclecode/crawl4ai:0.9.5 is what you deploy there.

Self-host Crawl4AI, Crawl4AI docker compose file, deploy Crawl4AI on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
