TypstDrive is a self-hosted place to write, organize and share Typst documents in your browser. Write on one side, see the finished pages on the other, and work on the same document with other people at the same time.
Note
TypstDrive is a community project. It is not affiliated with, endorsed by, or supported by the official Typst project. It uses the open-source Typst compiler, and links to Typst documentation and Typst Universe open the official Typst website. Please report problems on the TypstDrive issue tracker.
Questions and ideas are welcome on the TypstDrive Discord.
Full documentation, including a user guide, self-hosting, administration and the API reference, is at sirblobby.github.io/TypstDrive.
- Live Preview: Pages update as you type, with zoom, a resizable split, and a view menu to show the editor and preview, the editor only, or the preview only. Click the preview to jump to its source, or click the text to scroll the preview there, and choose how quickly the preview updates.
- Editor: Syntax highlighting for Typst, LaTeX, BibTeX, YAML and TOML, autocompletion, inline errors, auto-closing brackets, a Format document shortcut for Typst and smart features from the tinymist language server.
- Formatting Toolbar: Headings, bold, italic, code, quotes, math, lists, a font picker and page settings.
- LaTeX Documents: Write LaTeX documents and projects with a LaTeX editor and toolbar, compiled on the server by Tectonic, which downloads the packages a document uses. Compiles run in a locked-down sandbox, packages a command needs are added to the preamble for you, and administrators can turn LaTeX off.
- Quick Insert: Images, tables, other documents, symbols and emoji, with an image picker that searches your drive and uploads by button, drop or paste.
- Slash Commands: Type
/for a searchable list of formatting, insert, export, view and review actions, or select text and press/to apply one to it. - Learn Typst and LaTeX: Step-by-step guides for both languages in the documentation, with the rendered result under every example.
- Find and Replace, line comments and a spell checker that skips code and math.
- Customizable Keybinds: Change the editor shortcuts and spot conflicts at a glance.
- Editor Settings: Font, font size, line numbers, a minimap, word wrap, indent size, auto-closing brackets, editor tabs (on or off, reopened on return, with a limit) and preview sync.
- Real-Time Collaboration: See other people's changes and cursors instantly, follow someone's cursor by clicking their picture, see who is in which file of a project, and whether each person is editing, suggesting or viewing.
- Comments: Comment on text in documents and project files, reply, and resolve or reopen threads.
- Suggestions: Type in suggesting mode to propose edits inline, shown live to others and in the preview, for owners and editors to accept or reject.
- Version History: Automatic and manual versions of documents and of whole projects, a timeline of who edited, side-by-side changes for each file and one-click restore.
- Drive: Folders with custom colors, sorting, grid and list views, stars, file previews, duplicating documents and projects, selecting several items to move, star or delete them together, and a trash that keeps deleted items for 30 days.
- Search: A search bar with
type:,is:,before:andafter:filters, anddoc:to search the text inside documents. - Projects: Multi-file workspaces for books, theses and templates, with editor tabs, live Markdown previews, image and PDF previews in the file list, downloadable as a ZIP.
- Git Sync: Link a project to a folder in a GitHub, GitLab, Gitea, Forgejo or Codeberg repository, pull changes and push your own as commits, with GitHub and GitLab tokens saved once in your settings and stored encrypted. Only the document files are copied, so large repositories are fine.
- Templates: Start a document or project from any Typst Universe template, with search, type filters and previews, and fill in author names and affiliations from ORCID. Only the templates people use are downloaded.
- Packages: Publish a project as a package everyone on your server can import, with private packages for people and teams.
- Fonts and Images: Upload once and use everywhere, with an emoji font built in.
- Citations: Paste a DOI, arXiv, PubMed, PMC or Semantic Scholar ID to get a BibTeX or Hayagriva entry, and sync Zotero libraries and collections into bibliography files.
- Sharing: Share documents, projects and folders as editor, suggester or viewer, and hand over ownership.
- Share Links: Let anyone with the link view, suggest or edit, with an optional password and expiry date.
- Public Links: A named URL such as
/pdf/my-cvthat always serves the latest compiled PDF, plus/slides/my-talkto present slides from any computer and a password-protected speaker view with notes. - Team Spaces: Shared drives owned by a team, with owner, admin, member and viewer roles.
- Import: Turn Word, LaTeX, Markdown and HTML files into Typst documents.
- Export: PDF, HTML, PNG, SVG and Typst or LaTeX source from the editor or straight from the drive's action menu, plus Word, Markdown, LaTeX and HTML through Pandoc.
- Presentation Mode: Full-screen slides with a slide overview, timer, progress bar, laser pointer, pen, highlighter and eraser, plus a speaker view with the next slide and speaker notes from Touying, Polylux or Mosaic.
- Developer API: Turn Typst and LaTeX into PDF, PNG, SVG or HTML from your own code, render single formulas and snippets as tightly cropped images, pick a page and size, check documents for errors, and read your documents, projects, files, account, storage and API usage, with scoped keys, rate limits and usage charts.
- Typst Desktop: Keep documents on your computer and in sync with the Typst Desktop app.
- Sign-In Options: Passwords, one-time email codes, Google, GitHub and any OpenID Connect provider such as Keycloak, Authentik or Authelia.
- Email: Branded emails for sign-in codes, password resets, team invitations, sharing and ownership offers.
- Account Security: Email verification, password reset, active sessions, connected accounts and sign-in lockout.
- Themes: Cerberus, Catppuccin, Arch Linux and Sandstone themes in light and dark mode, site themes added by admins, and personal themes made with color pickers or uploaded as YAML, plus text size and high contrast options.
- Branding: Your own site name, logo, accent color, tagline and sign-in message.
- Admin Tools: Users, registration rules, sign-in methods, email testing, team limits, storage quotas, document and project version history, editor suggestion limits, package rules, public link rules, citation services, LaTeX support, Git sync, site themes, trash retention, API limits and an audit log.
- Performance Page: Uptime, CPU, memory, disk and live-editing activity, with charts of page load, server response, Typst compile and LaTeX compile times.
- Flexible Hosting: SQLite, PostgreSQL or MySQL/MariaDB with automatic upgrades, plus Redis or Valkey and S3-compatible storage for larger installs.
- [] Add language support for more languages.
TypstDrive runs as a single Docker container.
-
Generate a secret that keeps people signed in across restarts:
openssl rand -hex 64
-
Save this as
docker-compose.ymland paste the secret intoCOOKIE_SECRET:services: typstdrive: image: ghcr.io/sirblobby/typstdrive:latest container_name: typstdrive restart: unless-stopped ports: - "3000:3000" environment: - COOKIE_SECRET=paste-your-secret-here - PUBLIC_URL=http://localhost:3000 - RUST_LOG=info volumes: - ./data:/data
-
Start it:
docker compose up -d
-
Open
http://localhost:3000and create the administrator account on the setup page.
Keep passwords and keys, such as email or sign-in provider secrets, in a .env file next to the compose file: copy example.env to .env, fill in what you need, and add env_file: .env to the service. .env is ignored by git.
Everything is stored in ./data, so that is the folder to back up. To update, run docker compose pull and docker compose up -d; the database is upgraded automatically.
Before opening TypstDrive to the internet, put it behind a reverse proxy with HTTPS and set PUBLIC_URL to your domain. The documentation covers each step:
- Install with Docker
- HTTPS and reverse proxies
- Updates and backups
- Databases
- Sign-in and single sign-on and email
- Settings reference
- Your first document
- Learn Typst and LaTeX
- User guide
- Self-hosting
- Administration
- API reference
- Contributing
Thanks to everyone who has contributed code to TypstDrive:
![]() SirBlobby |
![]() Nikhil Verma |
![]() douxev |
|---|
See the Contributing guide to get involved.
TypstDrive is built on the work of many open-source projects and services:
- Typst and its open-source compiler, which turns documents into PDF, PNG, SVG and HTML (Apache License 2.0). Thanks to the Typst team and contributors for making it possible to build tools like this.
- The authors of the packages and templates on Typst Universe, which TypstDrive downloads and offers as templates.
- tinymist for language server features such as completions and hover help.
- Tectonic for compiling LaTeX documents.
- Hayagriva, Typst's bibliography format, used for
.ymlreference files. - Pandoc for converting to and from Word, Markdown, LaTeX and HTML.
- SvelteKit, Svelte, Vite and Tailwind CSS for the web app.
- CodeMirror for the editor, with codemirror-lang-typst and codemirror-lang-latex for highlighting.
- Yjs, y-websocket and y-codemirror.next in the browser, and yrs on the server, for live collaboration.
- PDF.js for PDF previews, Chart.js for charts and Iconify for icons.
- Rust, Tokio, Axum and SQLx for the server, with lettre for email, redis-rs for running several copies and object_store for S3 storage.
- Catppuccin and the other color palettes that inspired the built-in themes.
- The services behind the citation tools: doi.org, Crossref, DataCite, arXiv, the National Library of Medicine for PubMed and PMC, Semantic Scholar, ORCID and Zotero.
- Git, and the GitHub and GitLab APIs used by Git sync.
Each project keeps its own license. TypstDrive is not affiliated with any of them.
TypstDrive is released under the Apache License 2.0.
TypstDrive uses the Typst compiler, which is also released under the Apache License 2.0.
TypstDrive is a community application and is not affiliated with, endorsed by, or supported by the official Typst project. "Typst" is used only to describe the document language TypstDrive works with. Links to Typst documentation and Typst Universe open the official Typst website.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If you like this project, consider donating to me. It will help me to maintain this project and make more projects like this.
As a broke college student, every donation goes straight to the important things: textbooks, energy drinks, and upgrading my diet from instant ramen to slightly more expensive instant ramen.
















