Why self-host Docmost instead of Notion or Confluence
Notion and Confluence are convenient, but they come with tradeoffs that matter for developer teams: per-seat pricing that scales with headcount, docs living on a SaaS vendor's infrastructure, and export restrictions if you ever want to leave. Docmost runs on your own VPS — all pages, attachments and search indexes stay on your server. You control the backup policy, the retention rules and who gets access. For companies handling client data or internal technical documentation, this is not a minor detail.
What you get with a self-hosted Docmost instance
- Real-time collaborative editing — multiple team members on the same page, zero conflicts, changes appear instantly.
- Nested page tree with drag-and-drop reorganisation and unlimited depth.
- Built-in Mermaid, Draw.io and Excalidraw blocks — no external plugins needed for diagrams.
- Full-text search across all pages and file attachments.
- Page history and diff — see exactly who changed what and roll back in one click.
- Fine-grained permissions: workspace, group and per-page level access control.
- Zero per-seat cost — pay only for your VPS.
Requirements
You need a VPS with at least 2 GB RAM (4 GB for teams of 10+), Docker and Docker Compose installed, and a domain or subdomain pointing to your VPS IP. Docmost's stack is three containers: the app (Node.js), PostgreSQL 16 and Redis 7. On a modern 2 vCPU VPS you will comfortably serve 20-30 concurrent editors.
Deploy Docmost on your VPS
Install Docker
SSH into your VPS and run curl -fsSL https://get.docker.com | sh to install Docker and the Compose plugin in one step. Verify with docker compose version.
Generate secrets
Run openssl rand -hex 32 twice — once for APP_SECRET, once for POSTGRES_PASSWORD. Create /opt/docmost/.env with APP_URL=https://docs.yourdomain.com, APP_SECRET=<value>, DATABASE_URL=postgresql://docmost:<pg-pw>@db/docmost and REDIS_URL=redis://redis:6379.
Write docker-compose.yml
Create /opt/docmost/docker-compose.yml with three services: docmost (docmost/docmost:latest, port 3000:3000, env vars from .env), db (postgres:16-alpine, POSTGRES_DB=docmost, volume docmost_db) and redis (redis:7-alpine, --appendonly yes, volume docmost_redis). Then run docker compose up -d.
Set up reverse proxy and SSL
With Caddy (easiest): add docs.yourdomain.com { reverse_proxy localhost:3000 } to your Caddyfile and reload. With Nginx: proxy_pass http://127.0.0.1:3000; in a server block, then run Certbot. Update APP_URL in .env and restart: docker compose restart docmost.
Create your workspace
Open the URL in your browser, register the first admin account and name your workspace. Invite teammates from Settings -> Members by email. Start with a home page, then build your page tree — drag pages to reorganise at any time.
Logging in for the first time
Open the URL immediately after installation: Docmost displays its initial setup screen, where you create the workspace and the owner account (name, email, password). This first account has full rights.
Back up your volumes
All Docmost data lives in two Docker volumes: docmost_db (PostgreSQL) and docmost_data (attachments). Schedule a daily backup: docker run --rm -v docmost_db:/data -v /backups:/out alpine tar czf /out/docmost-$(date +%F).tar.gz /data. Store off-server for a complete disaster-recovery story.
The official documentation
For advanced configuration and tool-specific options, refer to the official Docmost documentation. This guide covers going live on a VPS; the vendor documentation remains the reference for fine-tuning, major updates and specific use cases.