---
title: "Deploy Crawl4AI | (Just Updated) LLM-Ready Web Crawler API, Token-Locked From Boot"
description: "Crawl4AI. Token-locked from boot, pinned image, health-checked, no fields"
category: "AI/ML"
url: https://railway.com/deploy/crawl4ai-or-just-updated-llm-ready-web-c
---

# Deploy Crawl4AI | (Just Updated) LLM-Ready Web Crawler API, Token-Locked From Boot

Crawl4AI. Token-locked from boot, pinned image, health-checked, no fields

**[Deploy Crawl4AI | (Just Updated) LLM-Ready Web Crawler API, Token-Locked From Boot on Railway](https://railway.com/template/crawl4ai-or-just-updated-llm-ready-web-c)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/crawl4ai-or-just-updated-llm-ready-web-c/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** AI/ML

## Template content

### crawl4ai

- **Image:** unclecode/crawl4ai:0.9.4@sha256:9021b3cb5c6f12570bbcd5395638495e0a06969b3148e377b953d174af2ebc9b
- **Start command:** `/bin/sh -c 'export CRAWL4AI_PORT="${PORT:-8080}"; echo "[railway] crawl4ai port=$CRAWL4AI_PORT uid=$(id -u) token=$([ -n "$CRAWL4AI_API_TOKEN" ] && echo set || echo MISSING) shm=$(df -m /dev/shm | tail -1 | tr -s " " | cut -d" " -f2)MB"; [ -n "$CRAWL4AI_API_TOKEN" ] || { echo "[railway] refusing to start without CRAWL4AI_API_TOKEN"; exit 1; }; exec bash entrypoint.sh'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Crawl4AI on Railway

Crawl4AI is an open-source web crawler built for LLM pipelines. It drives a headless Chromium browser,
renders JavaScript-heavy pages, and returns clean Markdown, structured extraction results and
metadata that RAG systems and AI agents can use directly. Send a URL to the REST API, get
LLM-ready content back.

This template runs the official Crawl4AI image as one service, pinned by digest, with a public Railway
domain, a generated API token and a working healthcheck.

## About Hosting Crawl4AI

- **The API is token-protected from the first request.** A 64-character `CRAWL4AI_API_TOKEN` is
  generated for your deploy and the container refuses to start without it. Calls without
  `Authorization: Bearer ` get 401, including the interactive `/docs`. `/health` stays open so
  Railway can check the service.
- **Nothing to fill in.** There are no required fields on the deploy form. The token and the
  `SECRET_KEY` used for JWT signing are both generated per deploy. LLM provider keys are optional and
  only needed if you use LLM-based extraction strategies; add them as variables after deploy.
- **Pinned and health-checked.** The image is pinned to a digest instead of a floating `latest`, so a
  redeploy cannot change the crawler under you, and the deploy is only marked healthy once `/health`
  answers.
- **Listens on Railway's port.** The start command binds Crawl4AI to the injected `PORT`, so the
  public domain and the healthcheck reach the same listener.
- **Memory.** Chromium is memory-hungry. Several concurrent crawls of heavy pages need room, so size
  the service accordingly. Railway's shared memory for the container is small; the image's default
  browser settings handled the pages we tested, but very large pages and screenshots use more.
- **Long requests.** Railway's edge closes requests after about five minutes. Crawl large sites in
  batches or use the async job endpoints.

## Common Use Cases

- Turning web pages into clean Markdown for RAG and vector-search ingestion
- Giving AI agents (n8n, Flowise, Dify, custom) a web-reading tool with a stable URL
- Scraping JavaScript-rendered sites that plain HTTP fetches cannot read
- Building site-wide knowledge bases and documentation mirrors for LLM context

## Dependencies for Crawl4AI Hosting

- None. A single service, no database and no volume: Crawl4AI keeps its Redis and browser state inside the container.

### Deployment Dependencies

- Crawl4AI: https://github.com/unclecode/crawl4ai
- Self-hosting guide: https://docs.crawl4ai.com/core/docker-deployment/

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `CRAWL4AI_API_TOKEN` | Bearer token required on every call except `/health`, generated per deploy. |
| `SECRET_KEY` | Signing key for JWT tokens, generated per deploy. |

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

The playground is at `/playground`. Inside the same Railway project use
`http://crawl4ai.railway.internal:8080` with the same header.

## 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.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/crawl4ai-or-just-updated-llm-ready-web-c
