Docmost

Self-hosted collaborative wiki and knowledge base with real-time editing, diagrams, AI assistance, and enterprise access controls — a modern alternative to Confluence and Notion.

20.8Kstars
1.4Kforks
GNU AGPLv3
TypeScript

Docmost is an open-source, self-hostable wiki and documentation platform that gives teams full ownership of their knowledge base without sacrificing the collaborative features they expect from SaaS tools. It supports simultaneous real-time editing using CRDT-based synchronization, meaning multiple users can co-author a document without conflicts, complete with live cursors showing who is editing where.

The platform ships with a rich Tiptap-based editor supporting slash commands, tables, code blocks, mentions, and embedded diagrams via Draw.io, Excalidraw, and Mermaid — all without leaving the editor. File attachments, inline comments, page history, and public sharing are included in the open-source core. Teams can organize content into Spaces, manage granular permissions via RBAC, and search across pages and indexed file attachments.

Docmost’s enterprise edition adds AI writing assistance, SAML 2.0 / OIDC / LDAP single sign-on, MFA, SCIM provisioning, page-level permissions, audit logs, page verification workflows, MCP integration, and DOCX/PDF import. The platform is designed for regulated environments and supports air-gapped, on-premises, and multi-instance deployments with Redis-backed collaboration.

Built on NestJS and React with a PostgreSQL backend, Docmost is actively maintained with a release cadence of roughly weekly updates. Migration tools for Confluence, Notion, HTML, and Markdown make it a practical replacement for legacy wiki deployments, with a growing community of contributors and localization support for over ten languages.

What You Get

  • Real-time Collaborative Editing - Multiple users can co-author any page simultaneously using CRDT-based synchronization (Hocuspocus + Yjs), with live cursors showing each collaborator’s position in real time.
  • Embedded Diagram Tools - Draw.io, Excalidraw, and Mermaid diagrams can be created and edited directly inside the Tiptap editor without leaving the page or loading an external service.
  • Spaces and RBAC Permissions - Content is organized into Spaces with group-based and page-level role controls, letting administrators restrict viewing, editing, and administration down to individual pages (page-level requires Enterprise).
  • Page History and Restore - Every edit is versioned with multi-contributor snapshots so teams can track changes over time and restore any previous version of a page.
  • Full-Text Search with Attachment Indexing - Integrated search covers page content as well as the contents of uploaded PDF and DOCX files, with Algolia available as an optional backend for larger deployments.
  • Public Sharing - Selected pages or spaces can be published as publicly accessible URLs without requiring reader accounts, suitable for external-facing documentation portals.
  • Enterprise SSO and MFA - SAML 2.0, OpenID Connect, and LDAP authentication integrations with optional multi-factor authentication are available for enterprise deployments.
  • Import from Confluence, Notion, HTML, and Markdown - Built-in importers migrate existing content from major platforms directly into Docmost without manual reformatting.
  • AI Writing Assistant - An AI assistant (Enterprise) integrated into the editor can summarize, translate, fix grammar, adjust tone, and generate content using configurable LLM providers.
  • MCP Integration - A Model Context Protocol server (Enterprise) lets AI agents and external tools read and write Docmost pages programmatically as part of broader workflows.
  • SCIM Provisioning and Audit Logs - Enterprise deployments can automate user lifecycle management via SCIM 2.0 and maintain a detailed audit trail for compliance monitoring.
  • Air-Gapped and On-Premises Deployment - The Docker-based deployment has no mandatory cloud dependencies, making it suitable for GDPR, ITAR, and FedRAMP-regulated environments.

Common Use Cases

  • Internal knowledge base for a remote-first engineering team - Engineers use Spaces to organize runbooks, architecture decision records, and onboarding guides, collaborating in real time during incident reviews and design discussions.
  • Replacing Confluence in a cost-reduction initiative - An enterprise IT team migrates thousands of Confluence pages using the built-in importer, then runs Docmost on their own infrastructure to eliminate per-user licensing fees.
  • Building a customer-facing documentation portal - A SaaS company publishes product docs and release notes as public Docmost pages, giving end-users searchable documentation without requiring login.
  • Compliance documentation for regulated industries - A healthcare or finance organization runs Docmost on an air-gapped server to store SOPs, audit checklists, and policy documents without transmitting sensitive content outside the perimeter.
  • AI-assisted technical writing - A product team uses Docmost’s enterprise AI assistant to draft release notes from raw bullet points, translate documentation into ten languages, and summarize long specification documents.
  • Multi-team wiki with access-controlled project spaces - A company creates a Space per department, applies RBAC groups to restrict cross-team access, and uses page verification workflows to enforce review before publishing.

Under The Hood

Architecture Docmost is organized as a pnpm monorepo managed by NX, with clean separation between a NestJS server application, a React + Vite client, a shared Tiptap editor extension package, and enterprise feature modules. The backend is structured into domain-focused NestJS modules — Core (auth, pages, spaces, groups, search, comments), Integrations (storage, mail, queue, export, import, environment), Collaboration, and an optional EE module loaded dynamically at runtime, so the same codebase serves both community and enterprise editions without forking. Real-time collaboration runs as a separate deployable Hocuspocus process backed by Redis pub/sub, allowing multi-instance horizontal scaling of the collaboration layer independently of the HTTP API. Page ordering uses fractional indexing with jitter to resolve concurrent reordering conflicts without central coordination.

Tech Stack The server runs NestJS 11 on Node.js 22 with a Fastify adapter for HTTP performance, and uses Kysely as a type-safe query builder over PostgreSQL for all persistent storage. Redis (via ioredis) serves as the real-time collaboration broker, cache layer, and BullMQ job queue backend for background tasks including attachment indexing, AI jobs, and notification processing. The client is built with React 19 and Vite, using Mantine 8 as the UI component library and Tiptap 3 as the extensible rich-text editor, with Yjs CRDT document state synchronized through the @hocuspocus/provider WebSocket client. Excalidraw, Draw.io (via iframe embed), and Mermaid are integrated as first-class diagram extensions. The AI assistant backend supports multiple providers through the Vercel AI SDK, covering OpenAI-compatible, Google, and self-hosted model endpoints.

Code Quality The codebase uses TypeScript throughout with strict compiler settings and ESLint plus Prettier enforced across both server and client workspaces. Server tests exist using Jest (NestJS testing utilities), and client unit tests use Vitest, but coverage is uneven: most service and controller spec files only assert that the class instantiates, while utility and validator modules have thorough, edge-case-driven test suites with meaningful input/output assertions. Dependency injection is consistent through NestJS decorators, error handling surfaces as typed HTTP exceptions from NestJS, and structured logging is provided by Pino via nestjs-pino. CASL is used for declarative ability-based access control. Production-critical dependencies are pinned via pnpm overrides to prevent transitive version drift in the complex monorepo dependency tree.

What Makes It Unique Docmost’s collaboration architecture is notable for running the Hocuspocus WebSocket layer as a separate, independently scalable process that coordinates through Redis, rather than embedding real-time sync into the main HTTP server. This allows teams to scale the collaboration tier for write-heavy workloads without scaling the full application. The transclusion feature lets any page embed a live-rendered excerpt of another page, creating reusable content blocks that propagate updates automatically. The enterprise module loading pattern — where EE code is required at runtime but gracefully absent in community builds — lets a single Docker image serve both editions without build-time feature flags. MCP support exposes Docmost’s content graph to AI agents through a standardized protocol, a relatively uncommon capability in self-hosted wiki software.

Self-Hosting

Docmost core is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means you can use, modify, and self-host the software freely, including for commercial internal use, but any modifications you deploy over a network must be released under the same AGPL license. If you build a hosted service on top of Docmost and offer it to third parties, the AGPL requires you to make your source code available to those users. For most teams running an internal knowledge base on their own infrastructure, the AGPL imposes no practical restrictions — you are not distributing the software to external parties.

Running Docmost yourself requires PostgreSQL and Redis in addition to the application container, which the provided Docker Compose file bundles together for single-server setups. You are responsible for database backups, PostgreSQL upgrades, Redis persistence configuration, SSL termination, and monitoring. Multi-instance horizontal scaling is supported for the HTTP API but requires careful Redis configuration and a shared storage backend (S3-compatible or Azure Blob supported) for file attachments. The collaboration layer can be run as a separate process, which adds operational complexity if you need to scale it independently. Expect meaningful infrastructure work to reach a production-grade, highly available deployment compared to spinning up a SaaS alternative.

Enterprise features — including AI writing assistance, SAML/OIDC/LDAP SSO, MFA, SCIM provisioning, page-level permissions, audit logs, page verification workflows, MCP integration, Confluence import, DOCX/PDF import, and attachment indexing — are licensed separately under a proprietary Docmost Enterprise License that requires a paid subscription for production use. Without an enterprise subscription, those features are present in the repository for development and testing but cannot legally be used in production. The cloud-hosted version at docmost.com handles infrastructure, upgrades, HA, and backups for teams that prefer a managed experience, and includes enterprise features under its subscription tiers.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search