Deploy Apache Tika

Apache Tika 4.0 server for text extraction and OCR behind an API token.

Deploy Apache Tika

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

ServiceImageNetworkingStorage
tikaapache/tika:4.0.0-1-fullprivate only, port 9998none
gatewaycaddy:2.11.4-alpinepublic domain on 8080none
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.

VariableServiceDefaultPurpose
TIKA_API_TOKENgatewaygeneratedBearer token for public requests
TIKA_MAX_UPLOADgateway100MBRequest body limit
CADDYFILEgatewaygateway configRouting and auth

Notes:

  • /version is 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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
47
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51