---
title: "Deploy Crawl4AI"
description: "Web crawler API that turns pages into LLM-ready Markdown, with MCP"
category: "AI/ML"
url: https://railway.com/deploy/crawl4ai-3
---

# Deploy Crawl4AI

Web crawler API that turns pages into LLM-ready Markdown, with MCP

**[Deploy Crawl4AI on Railway](https://railway.com/template/crawl4ai-3)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/crawl4ai-3/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### Crawl4AI https://raw.githubusercontent.com/unclecode/crawl4ai/v0.9.5/docs/md_v2/assets/images/logo.png

- **Source:** https://github.com/aalfath/crawl4ai-railway-template
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Crawl4AI on Railway

Crawl4AI is an open-source (Apache-2.0) web crawler and scraper built for LLMs, AI agents and data pipelines. It drives a headless Chromium, renders JavaScript-heavy pages and returns clean Markdown, structured JSON, screenshots or PDFs through a REST API, a web playground and an MCP endpoint.

## About Hosting Crawl4AI

This template runs the official Crawl4AI 0.9.5 Docker image, pinned by digest and built from a small public GitHub repo, so Railway offers you an update when a new version is merged there. The container holds the API server, a headless Chromium and an internal Redis queue. Crawl4AI refuses to listen publicly without an API token, so the template generates a 64-character `CRAWL4AI_API_TOKEN` and every request must send it as a Bearer token. A volume at `/data` keeps the crawl cache and the job store across redeploys. Railway checks `/health` before switching traffic. Plan for at least 2 GB of memory, because each crawl runs a browser.

## Common Use Cases

* Turn web pages into LLM-ready Markdown for RAG pipelines and AI agents
* Extract structured data with CSS or XPath schemas, or with an LLM of your choice
* Give AI assistants a crawling tool over MCP (`/mcp/sse`) or from n8n, LangChain and similar tools

## Dependencies for Crawl4AI Hosting

* A Railway service built from `aalfath/crawl4ai-railway-template` (official `unclecode/crawl4ai` image with Chromium and Redis inside)
* A Railway volume mounted at `/data`

### Deployment Dependencies

* Crawl4AI repository: https://github.com/unclecode/crawl4ai
* Crawl4AI 0.9.5 release: https://github.com/unclecode/crawl4ai/releases/tag/v0.9.5
* Self-hosting docs: https://docs.crawl4ai.com/core/self-hosting/
* Template repository: https://github.com/aalfath/crawl4ai-railway-template

### Implementation Details

Find your token in the service's Variables tab, then call the API:

```sh
curl -X POST https://YOUR-DOMAIN/crawl \
  -H "Authorization: Bearer YOUR-CRAWL4AI-API-TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com"]}'
```

The playground is at `/playground` and the monitor dashboard at `/dashboard`; both use the same token. For LLM extraction, add `LLM_PROVIDER` (for example `openai/gpt-4o-mini`) and that provider's key (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_TOKEN`, ...) to the service's variables. Hooks and `/execute_js` stay off unless you set `CRAWL4AI_HOOKS_ENABLED=true` or `CRAWL4AI_EXECUTE_JS_ENABLED=true`; both run caller-supplied code, so enable them only if you trust every token holder.

## Why Deploy Crawl4AI on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Crawl4AI on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/crawl4ai-3
