Deploy & Host Apache Tika | Railway

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

Dependencies for Apache Tika Hosting

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:

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.