Skip to main content

How to Self-Host Docmost in 2026: Complete Setup Guide

·OSSAlt Team
docmostself-hostedwikidocumentationconfluencenotiondockersetup guide2026

What Docmost Is

Docmost (19K+ GitHub stars, AGPL-3.0) is an open source collaborative wiki and documentation platform. It provides what Confluence and Notion offer for team knowledge management — without per-user pricing or data leaving your infrastructure.

Core capabilities:

  • Real-time collaborative editing (multiple users editing simultaneously)
  • Hierarchical page structure (spaces → pages → subpages)
  • Rich editor: tables, code blocks, math (LaTeX), diagrams (Mermaid, Draw.io, Excalidraw)
  • Comments and @mentions
  • Version history with rollback
  • Role-based permissions (workspace, space, page level)
  • Native Notion and Confluence importers

What makes it stand out: Docmost focuses on doing documentation well, not being a complete app platform. This makes it significantly more approachable than Outline (which is more developer-oriented) or AFFiNE (which tries to be everything).

Server Requirements

Docmost is lightweight compared to Confluence or tools that bundle Elasticsearch.

Minimum

  • 1 CPU core
  • 2GB RAM
  • 10GB storage
  • 2+ CPU cores
  • 4GB RAM
  • 20GB+ storage (grows with document attachments)
Use CaseServerMonthly
Personal / Small team (1-10)CAX11 (4GB ARM)$4
Medium team (10-50)CAX21 (8GB ARM)$6
Large team (50+)CPX31 (8GB)$10

Step 1: Prepare Your Server

# Update system
sudo apt update && sudo apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

# Verify
docker --version
docker compose version

Step 2: Create Docker Compose Configuration

Create a directory for Docmost:

mkdir -p /opt/docmost && cd /opt/docmost

Create docker-compose.yml:

services:
  docmost:
    image: docmost/docmost:latest
    depends_on:
      - db
      - redis
    environment:
      APP_URL: "http://localhost:3000"
      APP_SECRET: "your-long-random-secret-key-here"
      DATABASE_URL: "postgresql://docmost:docmost@db:5432/docmost?schema=public"
      REDIS_URL: "redis://redis:6379"
    ports:
      - "3000:3000"
    restart: unless-stopped
    volumes:
      - docmost_storage:/app/data/storage

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: docmost
      POSTGRES_USER: docmost
      POSTGRES_PASSWORD: docmost
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    image: redis:7.2-alpine
    restart: unless-stopped
    volumes:
      - redis_data:/data

volumes:
  docmost_storage:
  db_data:
  redis_data:

Generate a Secure Secret Key

openssl rand -base64 32

Replace "your-long-random-secret-key-here" with the generated key.

Step 3: Configure Environment Variables

For production use, create a .env file instead of embedding secrets in docker-compose.yml:

# Application
APP_URL=https://docs.yourdomain.com
APP_SECRET=generated-secret-key-here

# Database
DATABASE_URL=postgresql://docmost:strongpassword@db:5432/docmost?schema=public
POSTGRES_DB=docmost
POSTGRES_USER=docmost
POSTGRES_PASSWORD=strongpassword

# Redis
REDIS_URL=redis://redis:6379

# Email (optional — for invitations and notifications)
MAIL_DRIVER=smtp
SMTP_HOST=smtp.yourprovider.com
SMTP_PORT=587
SMTP_USERNAME=your@email.com
SMTP_PASSWORD=yourpassword
MAIL_FROM_ADDRESS=docs@yourdomain.com
MAIL_FROM_NAME=Docmost

# Storage (optional — for S3-compatible storage)
# STORAGE_DRIVER=s3
# AWS_S3_BUCKET=your-bucket
# AWS_S3_ENDPOINT=https://s3.amazonaws.com
# AWS_ACCESS_KEY_ID=your-key
# AWS_SECRET_ACCESS_KEY=your-secret
# AWS_DEFAULT_REGION=us-east-1

Update docker-compose.yml to use the env file:

services:
  docmost:
    image: docmost/docmost:latest
    env_file: .env
    depends_on:
      - db
      - redis
    ports:
      - "3000:3000"
    restart: unless-stopped
    volumes:
      - docmost_storage:/app/data/storage

Step 4: Start Docmost

cd /opt/docmost
docker compose up -d

Monitor startup:

docker compose logs -f docmost

Docmost is ready when you see output indicating the application has started. This typically takes 30-60 seconds.

Verify:

docker compose ps
# All containers should show "running"

Step 5: Initial Setup

Navigate to http://your-server-ip:3000

Create Workspace

Docmost's first screen guides you through workspace creation:

  1. Create Account: Enter name, email, password (this becomes the admin)
  2. Create Workspace: Give your team's workspace a name
  3. Invite Members (optional — can be done later)

Create Your First Space

Spaces organize documentation by team or project:

  1. Click New Space in the sidebar
  2. Name it (Engineering, Marketing, Product, etc.)
  3. Set visibility: Public to workspace, or private (invite-only)

Create Pages

Inside a Space:

  1. Click New Page or the "+" icon
  2. Title your page
  3. Start writing in the rich editor

Keyboard shortcuts (familiar from Notion):

  • / — Open block menu (insert headings, images, code blocks, tables)
  • [[ — Link to another page
  • @ — Mention a team member
  • **text** — Bold
  • --- — Horizontal rule

Step 6: Set Up HTTPS

HTTPS is required for:

  • Real-time collaboration to work reliably across browsers
  • Secure authentication and session management
  • Mobile browser compatibility
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install caddy

/etc/caddy/Caddyfile:

docs.yourdomain.com {
    reverse_proxy localhost:3000
}
sudo systemctl restart caddy

Option B: Nginx + Let's Encrypt

sudo apt install -y nginx certbot python3-certbot-nginx

Create /etc/nginx/sites-available/docmost:

server {
    listen 80;
    server_name docs.yourdomain.com;

    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_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        client_max_body_size 100M;
    }
}
sudo ln -s /etc/nginx/sites-available/docmost /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d docs.yourdomain.com

Update APP_URL

After setting up HTTPS, update your .env file:

APP_URL=https://docs.yourdomain.com

Restart Docmost:

docker compose up -d docmost

Step 7: Invite Your Team

Via Email Invitation (Requires SMTP)

  1. SettingsMembersInvite Members
  2. Enter email addresses (comma-separated for multiple)
  3. Select role: Admin, Member, or Guest
  4. Invited users receive setup instructions via email

Manual Account Creation (Without SMTP)

If you haven't configured SMTP:

  1. SettingsMembersInvite Members
  2. Copy the invitation link (shown after submitting email)
  3. Share the link directly with team members

Step 8: Migrate from Confluence or Notion

Docmost includes native importers.

Import from Confluence

  1. Export from Confluence: Space SettingsExportHTML format
  2. In Docmost: SettingsImportImport from Confluence
  3. Upload the Confluence export ZIP
  4. Docmost converts pages and preserves hierarchy

Note: Confluence macro content (e.g., JIRA issue lists, specialized macros) won't transfer — only page content and basic formatting.

Import from Notion

  1. Export from Notion: SettingsWorkspaceExport all workspace contentHTML format
  2. In Docmost: SettingsImportImport from Notion
  3. Upload the Notion export ZIP

Notion exports preserve most content, including tables, code blocks, and page hierarchy.

Manual Migration

For wikis in other formats:

  • Copy/paste content into Docmost pages
  • Use Docmost's Markdown support: paste Markdown directly into the editor
  • Drag-and-drop images during content creation

Step 9: Configure Storage for Production

Default Docmost storage saves uploads locally in the Docker volume. For production, use S3-compatible storage:

Hetzner Object Storage (Cost-Effective)

Hetzner offers S3-compatible object storage at €0.005/GB/month — much cheaper than AWS S3.

STORAGE_DRIVER=s3
AWS_S3_BUCKET=docmost-attachments
AWS_S3_ENDPOINT=https://nbg1.your-objectstorage.com
AWS_ACCESS_KEY_ID=your-hetzner-access-key
AWS_SECRET_ACCESS_KEY=your-hetzner-secret-key
AWS_DEFAULT_REGION=eu-central-1

AWS S3

STORAGE_DRIVER=s3
AWS_S3_BUCKET=docmost-attachments
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_DEFAULT_REGION=us-east-1

Restart after changing storage settings:

docker compose up -d docmost

Step 10: Backup Strategy

Docmost data lives in PostgreSQL and the storage volume.

Database Backup

# Manual backup
docker exec docmost-db-1 pg_dump -U docmost docmost | gzip > /opt/backups/docmost-$(date +%Y%m%d).sql.gz

# Automated daily backup (add to crontab)
0 3 * * * docker exec docmost-db-1 pg_dump -U docmost docmost | gzip > /opt/backups/docmost-$(date +\%Y\%m\%d).sql.gz && find /opt/backups -name "docmost-*.sql.gz" -mtime +7 -delete

Storage Backup

# If using local storage, sync to remote
rsync -avz /var/lib/docker/volumes/docmost_docmost_storage/ user@backup-server:/backups/docmost-storage/

# If using S3, it's handled by AWS/provider redundancy

Updating Docmost

cd /opt/docmost
docker compose pull
docker compose up -d

Check release notes at github.com/docmost/docmost/releases.

Cost Comparison

Confluence Cloud (Annual, 10 Users)

PlanMonthlyAnnual
Standard$5.75/user$690
Premium$11/user$1,320

Notion (Annual, 10 Users)

PlanMonthlyAnnual
Plus$8/user$960
Business$15/user$1,800

Docmost Self-Hosted

ComponentMonthlyAnnual
Hetzner CAX11 (4GB)$4$48
Domain~$1~$12
Total$5$60

Savings vs Confluence Standard: $630/year for 10 users. Grows linearly with team size — no per-seat billing.

Find More Documentation Tools

Browse all Confluence and Notion alternatives on OSSAlt — compare Docmost, Outline, AFFiNE, Wiki.js, and every other open source documentation platform with deployment guides.

Comments