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.
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 and a view menu to show the editor and preview, the editor only, or the preview only.
- Editor: Syntax highlighting for Typst, LaTeX, BibTeX, YAML and TOML, autocompletion, inline errors, auto-closing brackets 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 basic LaTeX documents and projects with a LaTeX editor and toolbar, rendered through MiTeX.
- Quick Insert: Images, tables, other documents, symbols and emoji.
- 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 and a minimap.
- Real-Time Collaboration: See other people's changes and cursors instantly, follow someone's cursor by clicking their picture, and see who is in which file of a project.
- Comments: Comment on text, reply, and resolve or reopen threads.
- Suggestions: Propose edits for others to accept or reject.
- Version History: Automatic and manual versions, a timeline of who edited, side-by-side changes 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, 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 PDF Links: A named URL such as
/pdf/my-cvthat always serves the latest compiled PDF, for CVs and living documents. - 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.
- Render API: Turn Typst into PNG, PDF or HTML from your own code, 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 and Arch Linux 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, version history limits, package rules, PDF link rules, citation services, Git sync, site themes, trash retention, API limits and an audit log.
- 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
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.
- MiTeX for rendering LaTeX documents with Typst.
- 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.











