GICT knowledge base
Complete Docmost Deployment: The Self-Hosted Wiki That Replaces Confluence
Published
Confluence charges per user per month. Notion charges per workspace. If your team is large enough, the bills add up fast. Docmost is an open-source wiki that does most of what both platforms do, runs on your own VPS, and costs you the price of your server.
It has real-time collaborative editing, page permissions, spaces for different teams, comments, page history, file attachments, Draw.io and Excalidraw diagrams, and Mermaid flowcharts. It also has a built-in AI assistant that connects to Ollama or any OpenAI-compatible API so your documentation stays private. It has 3 million downloads and 20,000 GitHub stars.
What you need
Docker and Docker Compose are the only requirements. Docmost ships as three containers — the application itself, PostgreSQL for data, and Redis for session management. You need about 2GB of RAM minimum and a domain or subdomain pointed at your server.
Deploy with Docker Compose
Create a directory and download the compose file:
mkdir docmost && cd docmost
curl -O https://raw.githubusercontent.com/docmost/docmost/main/docker-compose.yml
Open the file and update the required values. You must change three things:
APP_URL— your domain, for examplehttps://docmost.example.comAPP_SECRET— a long random string. Generate one withopenssl rand -hex 32POSTGRES_PASSWORD— a strong database password. Update it in both the environment block and theDATABASE_URL
The working compose file looks like this:
services:
docmost:
image: docmost/docmost:latest
depends_on:
- db
- redis
environment:
APP_URL: "https://docmost.example.com"
APP_SECRET: "YOUR_SECRET_HERE"
DATABASE_URL: "postgresql://docmost:PASSWORD@db:5432/docmost"
REDIS_URL: "redis://redis:6379"
ports:
- "3002:3000"
restart: unless-stopped
volumes:
- docmost:/app/data/storage
db:
image: postgres:18
environment:
POSTGRES_DB: docmost
POSTGRES_USER: docmost
POSTGRES_PASSWORD: YOUR_DB_PASSWORD
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql
redis:
image: redis:8
command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"]
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
docmost:
db_data:
redis_data:
Start the stack:
docker compose up -d
If port 3000 is already in use on your server, change 3000:3000 to 3002:3000 in the ports section and update the Nginx proxy_pass to match.
Configure Nginx as a reverse proxy with SSL and WebSocket support
Docmost needs to run behind a reverse proxy. It requires WebSockets for the real-time collaborative editor, so Nginx must be configured to forward the Upgrade and Connection headers. Without this, the editor falls back to read-only mode.
Install Certbot if you do not have it:
sudo apt install certbot python3-certbot-nginx -y
Create the Nginx site config:
sudo nano /etc/nginx/sites-available/docmost
Put this in the file:
server {
server_name docmost.example.com;
location / {
proxy_pass http://127.0.0.1:3002;
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;
# WebSocket support -- required for real-time collaborative editing
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
listen 80;
}
Enable the site and get an SSL certificate:
sudo ln -s /etc/nginx/sites-available/docmost /etc/nginx/sites-enabled/
sudo nginx -t
sudo certbot --nginx -d docmost.example.com
Reload Nginx:
sudo systemctl reload nginx
Verify the installation
Open your domain in a browser. You should see the Docmost setup page where you create your workspace and first admin account. If you see a blank page or a 502 error, the containers may not be ready yet — wait 30 seconds and try again.
Check the health endpoint:
curl https://docmost.example.com/api/health
A healthy response returns a JSON object with a status field.
Check the container logs if something is wrong:
docker compose logs docmost
docker compose logs db
What to do after setup
You become the workspace owner automatically. From there, you can create spaces, invite members, set permissions per space or page, and start writing. The editor supports slash commands, mentions, page links, and inline diagrams.
If you are migrating from Confluence, Docmost has an import tool for Confluence Spaces and Notion exports. The HTML and Markdown import options are also available if you are moving from older systems.
proxy_http_version 1.1 and the Upgrade/Connection lines are present and outside the comment block.Related guides
How to Self-Host DocuSeal for Document Signing
Self-host DocuSeal with private administrator setup, PostgreSQL and HTTPS. Test signing, understand email data flows and create consistent backups.
Self HostedHow to Self-Host Docmost with Docker on Ubuntu 24.04
Install Docmost with Docker, PostgreSQL and Redis. Set up a private workspace and verify editing, live updates and attachment retrieval.
Self HostedHow to Remove Image Backgrounds Locally with rembg
Remove image backgrounds locally with rembg. Preserve originals, check PNG transparency and inspect cutout quality on both light and dark backgrounds.
Self HostedHow to Translate Text Offline with Argos Translate
Translate plain text locally with Argos Translate. Install a language pair, prepare caches, verify offline operation and review translation quality.
