Self-Hosting Docmost: An Open Source Alternative to Notion and Confluence
Every team needs a shared knowledge base. Meeting notes, onboarding docs, process documentation, architecture decisions — this information accumulates fast and rots even faster when scattered across Google Docs, Slack messages, and random Markdown files. The commercial options work (Notion, Confluence), but they mean trusting a third party with your organization's internal knowledge and paying per-seat fees that scale uncomfortably.
Docmost is an open source, self-hosted wiki and documentation platform with a modern block-based editor, real-time collaboration, and a clean interface. Think of it as an alternative to Notion or Confluence that runs on your own infrastructure.
What Docmost Does
Docmost focuses on collaborative documentation:
- Block-based editor — rich content blocks: text, headings, lists, tables, code, images, callouts, dividers, and more
- Real-time collaboration — multiple users edit the same page simultaneously, with live cursors
- Spaces — organize content into separate workspaces (engineering, marketing, ops, etc.)
- Page hierarchy — nested pages with drag-and-drop reordering
- Version history — track and revert changes to any page
- Diagrams — embedded draw.io and Mermaid diagrams directly in pages
- Permissions — granular access control per space and per page
- Full-text search — find anything across all spaces quickly
- Comments — inline comments on any page for discussion
- File attachments — upload and embed files within pages
Where it fits
Docmost sits in the "team wiki" category — it's for internal documentation, not public-facing docs sites. If you need a public documentation site with versioning and search, look at Docusaurus or MkDocs. Docmost is for the internal knowledge base: the runbooks, the onboarding guides, the meeting notes, the institutional knowledge that lives in people's heads until someone writes it down.
Docmost vs. BookStack vs. Wiki.js vs. Outline
| Feature | Docmost | BookStack | Wiki.js | Outline |
|---|---|---|---|---|
| Self-hosted | Yes | Yes | Yes | Yes |
| Block editor | Yes | WYSIWYG | Markdown/WYSIWYG | Yes |
| Real-time collab | Yes | No | No | Yes |
| Page hierarchy | Unlimited nesting | Book > Chapter > Page | Flexible tree | Nested collections |
| Spaces/workspaces | Yes | Shelves + Books | Namespaces | Collections |
| Diagrams | draw.io + Mermaid | draw.io | draw.io + PlantUML | Mermaid |
| Version history | Yes | Yes | Yes | Yes |
| Permissions | Space + page level | Role-based | Page-level | Collection-level |
| API | Yes | Yes | GraphQL | Yes |
| Full-text search | Yes | Yes | Yes (Elasticsearch) | Yes |
| Comments | Inline | Page-level | No | No |
| SSO/OIDC | Yes | SAML, OIDC | Multiple | OIDC |
| Tech stack | Node.js + PostgreSQL | PHP + MySQL | Node.js + PostgreSQL | Node.js + PostgreSQL |
| Resource usage | Moderate | Low | Moderate-High | Moderate |
| Maturity | Newer (active development) | Mature | Mature | Mature |
When to choose which
Docmost is best if you want a Notion-like experience with real-time collaboration and a modern block editor, self-hosted. It's the newest option on this list and developing quickly.
BookStack is best if you want a mature, stable, well-documented wiki with a traditional structure (shelves, books, chapters, pages). It's extremely reliable and has the lowest resource requirements.
Wiki.js is best if you need powerful search (Elasticsearch integration), want multiple editor modes (Markdown, WYSIWYG, raw HTML), or need advanced authentication options. It's the most feature-rich but also the heaviest.
Outline is best if you want a polished Notion-like editor with excellent Slack integration, and your team already uses Slack or a similar identity provider for SSO.
Self-Hosting Docmost: Setup
Server requirements
- Minimum: 1 GB RAM, 1 CPU core
- Recommended: 2 GB RAM, 2 CPU cores
- Storage: 500 MB base + growth depending on file attachments
Docker Compose setup
services:
docmost:
container_name: docmost
image: docmost/docmost:latest
ports:
- "3000:3000"
environment:
APP_URL: "https://wiki.yourdomain.com"
APP_SECRET: "change-me-to-a-random-string"
DATABASE_URL: "postgresql://docmost:docmost@postgres:5432/docmost"
REDIS_URL: "redis://redis:6379"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: always
postgres:
container_name: docmost-db
image: postgres:16-alpine
environment:
POSTGRES_DB: "docmost"
POSTGRES_USER: "docmost"
POSTGRES_PASSWORD: "docmost"
volumes:
- docmost-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U docmost"]
interval: 10s
timeout: 5s
retries: 5
restart: always
redis:
container_name: docmost-redis
image: redis:7-alpine
volumes:
- docmost-redis:/data
restart: always
volumes:
docmost-db:
docmost-redis:
Generating secrets
openssl rand -hex 32
Replace change-me-to-a-random-string with the generated value.
Starting the service
docker compose up -d
Access Docmost at http://your-server:3000. On first launch, you'll create an admin account and set up your first workspace.
Organizing Your Knowledge Base
Spaces
Spaces are the top-level organizational unit. Create spaces for different teams or areas:
- Engineering — architecture docs, runbooks, API documentation
- Operations — incident response, infrastructure, deployment procedures
- Product — specs, roadmaps, user research
- Company — policies, benefits, onboarding
Each space has its own page tree, permissions, and members.
Page hierarchy
Within each space, pages can be nested to any depth:
Engineering/
├── Architecture/
│ ├── System Overview
│ ├── Database Design
│ └── API Design/
│ ├── REST Conventions
│ └── Authentication Flow
├── Runbooks/
│ ├── Deployment
│ ├── Incident Response
│ └── Database Migrations
└── Onboarding/
├── Environment Setup
├── Codebase Tour
└── First Week Checklist
Pages can be reordered and reparented by dragging in the sidebar.
Templates
Create page templates for common document types:
- Meeting notes — date, attendees, agenda, decisions, action items
- Architecture Decision Record — context, decision, consequences
- Runbook — when to use, steps, rollback procedure
- Post-mortem — timeline, root cause, action items
Templates help maintain consistency across the knowledge base.
The Block Editor
Docmost's editor uses a block-based approach similar to Notion:
Available blocks
- Text — paragraphs with inline formatting (bold, italic, code, links)
- Headings — H1 through H3
- Lists — bullet, numbered, and task/checkbox lists
- Table — full table support with column/row operations
- Code block — syntax-highlighted code with language selection
- Image — upload or paste images directly into pages
- Callout — highlighted information, warning, or tip blocks
- Divider — visual section separator
- Toggle — collapsible content sections
- Mermaid diagram — embedded diagrams rendered from Mermaid syntax
- draw.io diagram — embedded visual diagrams via the draw.io editor
Slash commands
Type / anywhere in the editor to see available block types. This is the fastest way to insert new blocks:
/heading— insert a heading/code— insert a code block/table— insert a table/image— insert an image/callout— insert a callout block/mermaid— insert a Mermaid diagram
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Ctrl+B |
Bold |
Ctrl+I |
Italic |
Ctrl+K |
Insert link |
Ctrl+E |
Inline code |
Ctrl+Shift+8 |
Bullet list |
Ctrl+Shift+9 |
Numbered list |
Ctrl+Z |
Undo |
Ctrl+Shift+Z |
Redo |
Real-Time Collaboration
Multiple users can edit the same page simultaneously:
- Each user's cursor is visible with their name tag
- Changes appear in real-time for all editors
- Conflict resolution is handled automatically
- No manual merging or locking required
This is the feature that separates Docmost from older wiki systems like BookStack and Wiki.js, which use a lock-or-overwrite model.
Permissions
Docmost provides granular access control:
Space-level permissions
- Admin — full control over the space, including settings and members
- Editor — can create and edit pages
- Viewer — read-only access
Page-level permissions
Individual pages can have permissions that override space defaults, useful for sensitive documents like compensation plans or incident reports.
User management
- Invite users via email
- SSO/OIDC — connect to your identity provider (Authentik, Keycloak, Authelia, etc.)
- User roles — admin, member, and guest at the workspace level
Diagrams
Docmost supports two diagram types natively:
Mermaid diagrams
Insert a Mermaid block and write diagram code directly:
graph TD
A[Load Balancer] --> B[Web Server 1]
A --> C[Web Server 2]
B --> D[(Database)]
C --> D
The diagram renders inline in the page. Mermaid supports flowcharts, sequence diagrams, Gantt charts, class diagrams, and more.
draw.io diagrams
For visual, drag-and-drop diagrams, insert a draw.io block. This opens the full draw.io editor in a modal, and the diagram embeds directly in your page.
Reverse Proxy Setup
Caddy:
wiki.yourdomain.com {
reverse_proxy localhost:3000
}
Nginx:
server {
server_name wiki.yourdomain.com;
client_max_body_size 50M;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
WebSocket support (the Upgrade and Connection headers) is required for real-time collaboration.
Backup Strategy
Back up the PostgreSQL database and any uploaded files:
# Database backup
docker exec docmost-db pg_dump -U docmost docmost > docmost-backup-$(date +%Y%m%d).sql
# Volume backup (includes uploaded files)
docker run --rm -v docmost-db:/data -v $(pwd):/backup alpine tar czf /backup/docmost-db-$(date +%Y%m%d).tar.gz /data
Honest Trade-offs
Docmost is great if you:
- Want a Notion-like wiki experience, self-hosted
- Need real-time collaborative editing
- Want a modern block-based editor with diagram support
- Need space-based organization with granular permissions
- Value active development and a growing feature set
Consider BookStack instead if you:
- Want a mature, battle-tested wiki
- Prefer a traditional book/chapter/page structure
- Need the lowest possible resource usage
- Want extensive documentation and a large community
- Prefer PHP (easier to host on shared hosting)
Consider Wiki.js instead if you:
- Need powerful full-text search via Elasticsearch
- Want multiple editor modes (Markdown, WYSIWYG, raw HTML)
- Need extensive authentication options (LDAP, SAML, OAuth, etc.)
- Want built-in localization for multiple languages
Consider Outline instead if you:
- Use Slack heavily and want deep Slack integration
- Need a polished, production-ready team wiki
- Want a more mature block-based editor
The bottom line: Docmost is the most promising newcomer in the self-hosted wiki space. Its real-time collaboration and modern block editor put it ahead of older alternatives for teams that want a Notion-like experience. It's newer and less mature than BookStack or Wiki.js, which means fewer integrations and a smaller community — but the core editing and collaboration experience is already excellent. If you're starting a new knowledge base today, Docmost is worth serious consideration.