
Deploy Apache Tika
Apache Tika 4.0 server for text extraction and OCR behind an API token.
gateway
Just deployed
Just deployed
Deploy and Host Apache Tika on Railway
Apache Tika detects and extracts text and metadata from more than a thousand file types, including PDF, Word, Excel, PowerPoint, email, HTML and images. Its REST server is widely used in search indexing and RAG pipelines to turn uploaded documents into plain text or structured content, with Tesseract OCR for scanned files.
About Hosting Apache Tika
This template deploys Tika Server 4.0.0 using the full image, which includes Tesseract OCR, plus a Caddy gateway as the only public entry point. The gateway requires a bearer token on every request and removes it before forwarding, so Tika never sees it, and it caps uploads at 100 MB. Tika stays private, so services in the same project can call it directly without the token. Tika keeps no state. OCR and large documents are CPU and memory hungry, so size the service for your files. Add replicas to scale throughput horizontally.
Common Use Cases
- Extracting text from uploaded PDFs and Office files for search or RAG
- OCR for scanned documents and images
- Metadata and MIME type detection in document pipelines
Dependencies for Apache Tika Hosting
apache/tika:4.0.0-1-full(official image with OCR)caddy:2.11.4-alpine(official image) as the token gateway
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| tika | apache/tika:4.0.0-1-full | private only, port 9998 | none |
| gateway | caddy:2.11.4-alpine | public domain on 8080 | none |
curl -T report.pdf "$TIKA_URL/tika" -H "Authorization: Bearer $TIKA_API_TOKEN" -H "Accept: text/plain"
curl -T report.pdf "$TIKA_URL/meta" -H "Authorization: Bearer $TIKA_API_TOKEN" -H "Accept: application/json"
Inside the project, call ${{tika.TIKA_PRIVATE_URL}} without the token.
| Variable | Service | Default | Purpose |
|---|---|---|---|
TIKA_API_TOKEN | gateway | generated | Bearer token for public requests |
TIKA_MAX_UPLOAD | gateway | 100MB | Request body limit |
CADDYFILE | gateway | gateway config | Routing and auth |
Notes:
/versionis the Tika health check; the gateway health check is/healthz.- Tika Server has no authentication of its own, which is why it stays private.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Apache Tika project or its maintainers.
Why Deploy Apache Tika 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 Apache Tika 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.
Template Content
gateway
caddy:2.11.4-alpine