Quick Start • What's Different • Auto-Install • LaTeX Packages • Deployment Options • Contributing • License
Figure 1: A screenshot of a project being edited in Overleaf Community Edition.
This is a deployment-ready fork of the official Overleaf Community Edition designed for painless self-hosting. Here's what's different compared to the default Overleaf:
| Feature | Official Overleaf CE | This Fork |
|---|---|---|
| Deployment complexity | 3 containers (Overleaf + MongoDB replica set + Redis), manual replica set init | Single container — MongoDB + Redis embedded, zero config |
| LaTeX packages | scheme-basic only (~300MB), manual tlmgr required |
Pre-installs 2000+ packages (collection-latexextra, collection-fontsrecommended, etc.) |
| Missing package handling | Compile fails with cryptic error, manual install required | Auto-installs missing packages on demand — first compile that needs a package installs it automatically |
| Babel language support | Manual tlmgr install babel-<lang> required for every language |
Auto-detected and installed — ngerman, french, spanish, etc. installed on first use |
| Docker Compose | Requires 3 services, health checks, replica set JS init | Single service, one docker-compose up -d |
| Setup steps | Configure replica set, wait for health checks, create admin | Start container → open browser → create admin |
| Data persistence | Separate volumes for each container | Organized volumes with simple backup/restore |
| Public Docker image | Build from source required | docker pull blacksamuron05/overleaf-simplified |
| Target audience | Organizations with DevOps teams | Individual users, small teams, labs, classrooms |
Official Overleaf CE: Production-grade, multi-container microservices architecture. This fork: "I just want to write LaTeX with my team" — single container, batteries included, missing packages install themselves.
# Pull the pre-built image from Docker Hub
docker pull blacksamuron05/overleaf-simplified:latest
# Download the compose file
curl -O https://raw.githubusercontent.com/BlackSamuron0305/overleaf/main/docker-compose.yml
# Or clone the repo:
# git clone https://github.com/BlackSamuron0305/overleaf.git && cd overleaf
# Start (single container with embedded databases)
docker compose up -d
# Open http://localhost/launchpad to create your admin accountThat's it. One command. MongoDB + Redis + all 11 Overleaf microservices run inside a single container. Missing LaTeX packages are automatically installed the first time a document needs them — no manual steps.
See the detailed Deployment Guide for configuration options.
The simplified container includes an automatic package installer built into the LaTeX compiler. When a document fails to compile because a package is missing, the container:
- Parses the compile error output for missing
.sty/.clsfiles - Searches TeX Live's package index to find which package provides the file
- Installs the package via
tlmgrinto the persistenttexlive_extravolume - Re-runs the compilation — automatically, without any user action
- Repeats for up to 10 missing packages per compile click
Babel language packages are also auto-detected. If your document uses \usepackage[ngerman]{babel} and the babel-german package isn't installed, it is installed automatically on the first compile.
% These all work out-of-the-box — packages install themselves:
\usepackage{koma-script} % → koma-script
\usepackage{listings} % → listings
\usepackage{csquotes} % → csquotes
\usepackage[ngerman]{babel} % → babel-german
\usepackage{subfigure} % → subfigureInstalled packages are stored in the texlive_extra Docker volume and persist across container restarts and rebuilds. You only pay the installation cost once.
To disable auto-install, set AUTO_INSTALL_PACKAGES: "false" in your compose file.
The base Overleaf image ships with scheme-basic (minimal TeX Live). This fork provides multiple ways to add packages:
With AUTO_INSTALL_PACKAGES: "true" (the default in docker-compose.yml), missing packages are installed automatically on first compile. See the Auto-Install section above.
The Dockerfile.custom already includes commonly needed packages:
collection-latexextra— ~2000 extra packages (tikz, algorithm2e, listings, etc.)collection-fontsrecommended— standard font packagescollection-latexrecommended— recommended base packageskoma-script,babel-german,csquotes,subfigure, and more
The Dockerfile.custom can be used to build a custom image with these pre-installed.
You can also install packages manually into the running container:
docker exec overleaf bash -c 'tlmgr install biblatex && texhash'Packages installed this way are stored in the texlive_extra volume and persist across container restarts.
For a permanent, reproducible setup, extend the image:
# Dockerfile.custom
FROM blacksamuron05/overleaf-simplified:latest
RUN tlmgr install \
tikz pgfplots algorithm2e biblatex beamer siunitx todonotes \
&& texhash && fmtutil-sys --alldocker build -f Dockerfile.custom -t my-overleaf .When compilation fails with File 'xxx.sty' not found (and auto-install is off):
- The package name is usually the filename without
.sty - Search CTAN if unsure
- See LATEX-PACKAGES.md for a full guide
Overleaf consists of 11 Node.js microservices that communicate over HTTP on localhost, fronted by nginx — all running inside a single container:
┌─────────────────────────────────────────┐
│ Single Docker Container │
│ ┌─────────┐ ┌───────┐ ┌─────────────┐ │
│ │ MongoDB │ │ Redis │ │ 11 Services │ │
│ │ 8.0 │ │ │ │ + nginx │ │
│ └─────────┘ └───────┘ └─────────────┘ │
│ + TeX Live with on-demand packages │
└─────────────────────────────────────────┘
nginx (port 80)
├── web (main app, port 4000)
├── real-time (WebSocket, port 3026)
├── document-updater (OT engine, port 3003)
├── clsi (LaTeX compiler, port 3013)
├── filestore (file storage, port 3009)
├── docstore (document DB, port 3016)
├── chat (project chat, port 3010)
├── contacts (user contacts, port 3036)
├── notifications (user notifications, port 3042)
├── project-history (version history, port 3054)
└── history-v1 (history API, port 3100)
All services are managed by Phusion Baseimage + runit.
Key environment variables (set in docker-compose.yml):
| Variable | Default | Description |
|---|---|---|
OVERLEAF_APP_NAME |
"Overleaf Community Edition" | Displayed application name |
OVERLEAF_SITE_URL |
"http://localhost" | Public URL of the instance |
OVERLEAF_ADMIN_EMAIL |
— | Admin contact email |
EMAIL_CONFIRMATION_DISABLED |
"true" | Skip email verification |
OVERLEAF_EMAIL_SMTP_HOST |
— | SMTP server for outbound email |
SANDBOXED_COMPILES |
"false" | Enable sandbox (Server Pro only) |
See the full list in server-ce/config/settings.js.
# Backup all volumes
docker run --rm -v overleaf_data:/data -v $(pwd):/backup alpine tar czf /backup/overleaf-backup.tar.gz /data
docker run --rm -v mongodb_data:/data -v $(pwd):/backup alpine tar czf /backup/mongodb-backup.tar.gz /data
# Restore
docker run --rm -v overleaf_data:/data -v $(pwd):/backup alpine tar xzf /backup/overleaf-backup.tar.gz -C /# Pull the latest pre-built image
docker pull blacksamuron05/overleaf-simplified:latest
# Restart the container with the new image
docker compose up -dFor version-specific notes, see the Release Notes on the Wiki.
This fork is based on Overleaf Community Edition, an open-source online real-time collaborative LaTeX editor by the Overleaf team.
Caution
Overleaf Community Edition is intended for use in environments where all users are trusted. Without Sandboxed Compiles (Server Pro only), users have full read/write access to the container's filesystem, network, and environment variables during LaTeX compilation.
For enterprise features (SSO, LDAP/SAML, tracked changes, sandboxed compiles), see Overleaf Server Pro.
Please see the CONTRIBUTING file for information on contributing to the development of Overleaf.
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the LICENSE file.
Copyright (c) Overleaf, 2014-2025.