overleaf
Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.
Overleaf is an open-source web-based collaborative LaTeX editor that lets multiple authors edit, compile, and review LaTeX documents simultaneously. It powers the widely used www.overleaf.com cloud service while also being available for self-hosted deployment, making it possible for universities, research labs, and enterprises to run their own private instance with the same real-time collaboration experience.
The system is built as a monorepo of interconnected microservices: a central web application, a dedicated compile service (CLSI) that runs LaTeX inside isolated containers, a document-updater that buffers and applies real-time edits via Redis, a history service that tracks every change to documents, and supporting services for file storage, notifications, and chat. This architecture gives self-hosters the flexibility to scale individual components as their user load demands.
Community Edition ships under AGPL-3.0 and is intended for environments where all users are trusted. For organizations that need user isolation, Overleaf Server Pro adds sandboxed compiles (Docker-in-Docker), LDAP/SAML SSO, tracked changes, advanced admin controls, and officially supported upgrade paths. The self-hosted version is managed through the Overleaf Toolkit, a dedicated tool that handles Docker image orchestration, configuration, and version upgrades.
What You Get
- Real-time collaborative editing - Multiple authors can edit the same LaTeX document simultaneously with operational transformation-backed conflict resolution, live cursor positions, and changes visible to all collaborators instantly.
- Full TeXLive integration - Ships with a comprehensive TeXLive distribution pre-installed in the Docker base image, supporting pdflatex, xelatex, lualatex, and latex compilers for complex academic and scientific documents without manual package installation.
- Docker-based deployment via Overleaf Toolkit - Official tooling manages the two-layer Docker image architecture (sharelatex-base for TeXLive dependencies and sharelatex for the application), simplifying installation, configuration, and version upgrades on-premises.
- Project history with full version tracking - Every edit is stored as a versioned change through the history-v1 service, enabling point-in-time document restoration and per-author contribution tracking.
- Rich document management - Create and organize projects with file trees, upload images and binary assets to the filestore service, link external files, manage references, and download compiled outputs as PDF or ZIP archives.
- Server Pro enterprise features - Sandboxed compiles using Docker-in-Docker for user isolation, SSO via LDAP or SAML 2.0, tracked changes with accept/reject workflow, advanced admin panel, and officially supported upgrade paths from Overleaf.
Common Use Cases
- University-wide LaTeX platform - An IT department deploys Overleaf Community Edition on internal servers so faculty and students can co-author papers and theses using familiar LaTeX without installing local editors or managing package conflicts.
- Research lab collaboration - A multi-institution research team self-hosts Overleaf Server Pro to co-author journal submissions with tracked changes, SAML SSO tied to institutional accounts, and sandboxed compiles that prevent cross-user data exposure.
- Conference or journal editorial workflows - A publisher deploys Overleaf to receive author submissions and coordinate review comments within the same LaTeX environment, eliminating file-exchange overhead for camera-ready revisions.
- Secure government or healthcare document authoring - An organization with strict data-residency requirements self-hosts Overleaf to keep LaTeX source and compiled documents entirely within their own network perimeter while preserving real-time collaboration.
- Graduate thesis supervision - Supervisors and PhD students work in the same Overleaf project, with the supervisor using tracked changes and inline comments to review drafts without requiring students to learn Git workflows.
Under The Hood
Architecture
Overleaf is structured as a yarn monorepo of discrete microservices, each with a tightly scoped responsibility: the CLSI service handles LaTeX compilation in isolation, the document-updater buffers and applies real-time edits using Redis as an ephemeral state store, the history-v1 service persists versioned change streams to MongoDB and object storage, and the web service acts as the orchestration layer exposing HTTP endpoints and WebSocket connections to clients. The central web service organizes its domain logic into a large collection of feature modules — authentication, compilation, collaboration, project management, subscriptions, and more — each structured into controllers, managers, and handlers that enforce separation between HTTP routing and business logic. The custom overleaf-editor-core library implements operational transformation operations as pure, composable functions that form the mathematical foundation for conflict-free concurrent editing, independently testable from the services that invoke them. Communication between services uses HTTP for request-response interactions and Redis pub/sub for broadcasting real-time events, with each service deploying independently behind nginx.
Tech Stack All backend services run on Node.js 20+ with Express, using a mix of CommonJS and ESM module conventions depending on service age. MongoDB with Mongoose serves as the primary document store for projects, users, and metadata, while Redis via ioredis handles pub/sub messaging, session storage, rate limiting, and distributed locking across services. LaTeX compilation executes inside sibling Docker containers running a full TeXLive distribution on a Phusion Baseimage, supporting pdflatex, xelatex, lualatex, and latex compilers. The frontend is built with React 18 and Vite, using CodeMirror 6 with custom LaTeX grammar extensions for the editing surface, Socket.IO for WebSocket-based real-time sync, and Zustand for client-side state management. The build system is Yarn 4 with workspace-level dependencies managed across a monorepo, with Vitest and Mocha driving unit and integration tests across services.
Code Quality Test coverage is extensive across the codebase, with nearly 500 test files spanning unit, acceptance, and frontend layers using Vitest and Mocha with structured CI reporters and coverage artifacts. The web service alone contains over 400 test files. Error handling is explicit throughout, using custom error classes from the @overleaf/o-error library and structured logging via @overleaf/logger. TypeScript adoption is progressive — the frontend and newer backend services use TypeScript with strict configurations while some older service backends remain in JavaScript. A custom eslint-plugin enforces project-specific patterns and Prettier is applied globally. Promise-utils wrappers provide a consistent bridge between older callback-based code and modern async/await patterns.
What Makes It Unique The most distinctive technical choice is the custom operational transformation engine in overleaf-editor-core, which implements text-level and file-level OT for simultaneous multi-author editing — a hard concurrency problem the Overleaf team solved at scale before browser-native collaboration primitives existed. The CLSI sandboxed compilation pipeline is another differentiator: LaTeX runs inside isolated Docker sibling containers with strict filesystem, network, and environment variable confinement, enabling secure compilation from multiple independent users on shared infrastructure. The explicit architectural split between Community Edition (unsandboxed, trusted-users-only) and Server Pro (sandboxed, multi-tenant safe) reflects genuine security engineering decisions with clear documented trade-offs rather than a marketing distinction.
Self-Hosting
Overleaf is released under the GNU Affero General Public License version 3 (AGPL-3.0), one of the strongest copyleft licenses available. This means you can freely run, study, and modify the software for any purpose, including commercial use in your organization. The key copyleft implication for self-hosters is the network interaction clause: if you modify the Overleaf source code and make those modifications accessible to users over a network, you are required to make the modified source code available to those users under the same AGPL-3.0 terms. Running an unmodified instance for internal or public use does not trigger this requirement, but organizations that fork and customize the codebase should review their obligations carefully before distributing the modified version externally.
Running Overleaf yourself requires meaningful infrastructure. The recommended path uses Docker Compose via the Overleaf Toolkit, which manages two Docker images — the heavy base image containing the full TeXLive distribution (multi-gigabyte download) and the application image layered on top. You will need a server with sufficient RAM for the Node.js service processes plus compilation headroom, persistent storage for MongoDB, Redis, and file uploads, and a reverse proxy for TLS termination. Your team is responsible for database backups, monitoring service health, applying security patches, and managing version upgrades using the Toolkit’s documented procedures. The compilation workload can be CPU and memory intensive under concurrent user load, so resource planning matters.
Compared to the hosted www.overleaf.com service, self-hosting Community Edition gives up sandboxed compiles entirely — the README includes a prominent warning that all users have full read and write access to the sharelatex container’s filesystem, network, and environment variables during LaTeX compilation, making Community Edition suitable only for environments where all users are trusted. Overleaf Server Pro adds sandboxed compiles via Docker-in-Docker, LDAP and SAML 2.0 SSO integration, a tracked changes workflow, and officially supported upgrade assistance from Overleaf. The cloud service further adds managed infrastructure, automatic scaling, 24/7 uptime SLAs, cloud backup, and a support tier — trade-offs that matter most for institutions without dedicated DevOps capacity.
Related Apps
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
AutoGPT
OtherDify
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.
Dify
OtherZed
Developer Tools · Collaboration · Code Editors
High-performance, multiplayer code editor built in Rust by the creators of Atom and Tree-sitter, with native AI integration and real-time collaboration.