p.enthalabs

GitHub - SWUFE-DB-Group/TexLite: TexLite: Lightweight self-hosted collaborative LaTeX editor and Overleaf alternative

A lightweight self-hosted alternative to Overleaf for _small, trusted_ research teams. Use your existing LaTeX distribution, with no heavyweight service stack.

![Image 1: CI](https://github.com/SWUFE-DB-Group/TexLite/actions/workflows/ci.yml)![Image 2: npm version](https://www.npmjs.com/package/texlite)![Image 3: Docker Hub](https://hub.docker.com/r/zhongpu/texlite)

**Documentation:** English (this file) · Operations · Design · 简体中文

**Website:**TexLite GitHub Pages

![Image 4: TexLite workspace](https://github.com/SWUFE-DB-Group/TexLite/blob/main/preview-1.png)![Image 5: TexLite project view](https://github.com/SWUFE-DB-Group/TexLite/blob/main/preview-2.png)

Why TexLite

[](https://github.com/SWUFE-DB-Group/TexLite#why-texlite)

- **Own the writing environment.** Use the host's TeX installation and keep sources, history, and compiled output in one local data directory.

- **Collaborate without a large stack.** The default deployment is one Node.js process, SQLite, and local files—plus real-time editing and source-level comments for a small trusted team.

A practical distinction from Overleaf

[](https://github.com/SWUFE-DB-Group/TexLite#a-practical-distinction-from-overleaf) Overleaf is a strong choice when its hosted product or broader ecosystem is the right fit. TexLite addresses a narrower self-hosted use case:

- A shared hosted service can queue, slow down, or time out at usage peaks.

- Overleaf's open-source Community Edition follows a more involved Docker deployment path, and several functionalities, such as source comments, are Server Pro features. _If you do not mind a heftier Docker image, we have one ready too :)_

Self-hosting does not make every document compile faster: that still depends on the host and the document. It does give the team control over capacity, TeX updates, data location, and the collaboration workflow.

For a desktop-first, individual workflow, start with VS Code + LaTeX Workshop or TeXstudio instead. TexLite is purpose-built for shared browser writing, not a replacement for a personal IDE.

What the writing workflow includes

[](https://github.com/SWUFE-DB-Group/TexLite#what-the-writing-workflow-includes)

- Projects with folders, ZIP import/export, tags, sharing, ownership transfer, archiving, and a private per-user citation library.

- CodeMirror editing with LaTeX/BibTeX highlighting, folding, completion, optional Vim mode, formatting, spelling/grammar assistance, search/replace, and source/PDF SyncTeX navigation.

- Yjs-based collaborative source editing, active-session presence, comments anchored to source text, replies, resolution, and permissions that let reviewers comment without changing source.

- `latexmk` compilation with selectable engines, project settings, structured diagnostics, cached successful PDFs, downloadable artifacts, and optional project-level `latexmkrc`.

- Per-project history and owner-only Git/GitHub backup. Git is optional and is checked only when its integration is used.

Quick start

[](https://github.com/SWUFE-DB-Group/TexLite#quick-start) Install Node.js 24 or newer, `latexmk`, and at least one TeX engine such as `pdflatex`, `xelatex`, or `lualatex`. Git is needed only for the optional Git/GitHub integration.

After installation, `texlite requirements` checks the relevant host software and versions before initialization.

npm install --global texlite texlite requirements texlite init texlite start texlite status

Open http://127.0.0.1:3000. `texlite init` creates the configuration and the first administrator; public registration is deliberately unavailable.

For upgrades and routine management:

npm update --global texlite texlite restart texlite logs

`texlite serve` runs in the foreground for debugging, Docker, or systemd. `start`, `stop`, `restart`, `status`, and `logs` use the PM2 runtime bundled with the npm package. Run `texlite help` for the complete command list.

Docker deployment

[](https://github.com/SWUFE-DB-Group/TexLite#docker-deployment)

If the host does not have—or you do not want to maintain—Node.js, TeX Live, Git, and Harper locally, use the heavier TexLite-Docker deployment. Its published image bundles those runtime dependencies for you.

git clone https://github.com/SWUFE-DB-Group/TexLite-Docker.git cd texlite-docker cp deployment.example.json deployment.json

Edit deployment.json before the first start.

./scripts/compose.sh pull ./scripts/compose.sh up -d

See the TexLite-Docker README for its user-facing configuration and operations guide.

Documentation map

[](https://github.com/SWUFE-DB-Group/TexLite#documentation-map) | Need | Read | | --- | --- | | Installation, configuration paths, effective defaults, environment overrides, service management, backups, and security boundaries | Operations guide | | Collaboration, source persistence, compilation isolation, history, and design trade-offs | Design | | Testing an npm package before publication | NPM testing guide | | Complete configuration starting point | texlite.config.example.json |

Scope and security

[](https://github.com/SWUFE-DB-Group/TexLite#scope-and-security)

TexLite is a single-host application for trusted users. It is not a compiler sandbox: LaTeX and an enabled project `latexmkrc` can execute powerful local behaviour. Keep the default `127.0.0.1` bind unless you add the authentication, network controls, and isolated compiler environment appropriate for an untrusted deployment.

License

[](https://github.com/SWUFE-DB-Group/TexLite#license)

TexLite is licensed under the GNU Affero General Public License v3.0; see LICENSE. For proprietary modifications or commercial terms that differ from AGPL-3.0, contact the copyright holder.