Why a LaTeX compiler can't run on Cloudflare Workers

Shipping a LaTeX Compiler Behind an Edge App

Why a LaTeX compiler can't run on Cloudflare Workers

A job tracker on Cloudflare Workers needs to turn LaTeX into PDF, but Workers are V8 isolates that cannot run native TeX engines. The fix is a containerized Tectonic service called over HTTP. The write-up covers shell escape risks, per-job temp directories, path traversal defenses, and failing closed when the auth token is missing—plus the Dockerfile line that turned a three-second compile into a sixty-second timeout.

Anything the compiler can read, a document can read. So nothing worth reading belongs in the container.

More from this day

2026-10-21