← All templates · Notes and wikis
Deploy Docmost in one click
A collaborative wiki and docs, with spaces, real-time editing and diagrams
A self-hosted alternative to Notion and Confluence.
What is Docmost?
Docmost is open-source software for wikis and documentation. Pages live in spaces, each with its own members and permissions, and several people can edit the same page at once. The editor takes slash commands, tables, file attachments and embeds such as Airtable, Loom and Miro, and draws diagrams with Draw.io, Excalidraw and Mermaid. Every page keeps its history, which can be restored, people comment on what they read, search covers the full text, and a page can be shared publicly by link.
Teams self-host Docmost as a knowledge base or an internal wiki in place of Confluence or Notion, with pages imported from Notion, Markdown or HTML. This template runs the free Community edition with PostgreSQL and Redis, and makes the workspace and its owner from the fields before Docmost answers anyone. The catch: SSO, two-factor authentication, AI, API keys, permissions per page and the Confluence importer are in the paid Business edition.
Hosting Docmost on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at Docmost. You fill in what it asks for and click Create project: Username, Email, Admin password.
- In a minute or two Docmost is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about Docmost
Is Docmost free?
Yes. The Community edition is open source under the AGPL-3.0 and free to self-host, with real-time collaboration, spaces and full-text search. The Business edition costs $6 per seat a month, billed yearly for at least 10 seats, and adds SSO, two-factor authentication, AI, API keys and permissions per page.
Docmost vs Confluence or Notion?
Docmost covers the same ground as a wiki: spaces, pages in a tree, real-time editing, comments and page history. Confluence and Notion run in their makers’ clouds, while Docmost runs where you deploy it, and its Community edition is free for any number of users.
Can I import my Notion pages into Docmost?
Yes. Docmost imports a Notion export, and Markdown and HTML files, into a space. The Confluence importer is part of the paid Business edition.
Can several people edit a Docmost page at once?
Yes. Its editor is collaborative in real time: everyone on a page sees the others’ changes as they type, and the page history keeps each version.
How do I invite people to Docmost?
With Invite People, by email and with a role. Docmost has no public sign-up, so a person joins through their invitation, which it emails once SMTP_HOST and the other SMTP_ settings are in the project’s .env. Until then, Copy link on a pending invitation in Settings → Members gives the link to send yourself.
How much memory and disk does Docmost need?
Docmost is light: about 300 MB of memory with Postgres and Redis, and pages grow slowly; attachments take what their files take. On Pethost the Starter plan is enough for it, with room for other apps beside it.
Docmost Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: docmost (docmost/docmost:0.97), postgres (postgres:18-alpine), redis (redis:8-alpine).
Volumes, in the nightly backup: data, db, redis.
services:
docmost:
image: docmost/docmost:0.97
restart: unless-stopped
# Docmost does not stop on SIGTERM as the first process: an init passes it on.
init: true
# Any setting of Docmost can be added to the project's .env, such as SMTP_HOST and the other
# SMTP_ settings, which send its invitations and password resets by email.
env_file: .env
environment:
APP_URL: ${URL}
APP_SECRET: ${APP_SECRET}
DATABASE_URL: postgresql://docmost:${POSTGRES_PASSWORD}@postgres:5432/docmost
REDIS_URL: redis://redis:6379
ADMIN_NAME: ${ADMIN_NAME}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
# A new Docmost offers its setup, which makes the workspace and its owner, to whoever opens it
# first. So while it has no workspace, it runs on port 3001, which nobody reaches, and the
# owner is made there from the fields; only then does Docmost answer on 3000.
command:
- sh
- -c
- |
set -e
cd /app/apps/server
if ! node -e '
const sql = require("postgres")(process.env.DATABASE_URL, { max: 1 });
(async () => {
for (let i = 0; i < 60; i++) {
try {
const [row] = await sql`select count(*)::int as n from workspaces`;
process.exit(row.n > 0 ? 0 : 1);
} catch (error) {
// No such table: a new database, which the migrations of Docmost have yet to fill.
if (error.code === "42P01") process.exit(1);
await new Promise((done) => setTimeout(done, 1000));
}
}
process.exit(1);
})();
'; then
NODE_ENV=production PORT=3001 node dist/main &
setup=$$!
node -e '
const setUp = async () => {
const response = await fetch("http://127.0.0.1:3001/api/auth/setup", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
workspaceName: "Docmost",
name: process.env.ADMIN_NAME,
email: process.env.ADMIN_EMAIL,
password: process.env.ADMIN_PASSWORD
})
});
// 403: a workspace exists already, made by an earlier start.
if (response.ok || response.status === 403) return;
const body = await response.text();
if (response.status === 400) {
console.error("Docmost refused the administrator: " + body);
process.exit(1);
}
throw new Error("setup: " + response.status + " " + body);
};
(async () => {
let failure;
for (let i = 0; i < 180; i++) {
try {
return await setUp();
} catch (error) {
failure = error;
await new Promise((done) => setTimeout(done, 1000));
}
}
console.error(failure);
process.exit(1);
})();
'
kill $$setup
wait $$setup || true
fi
NODE_ENV=production exec node dist/main
volumes:
- data:/app/data/storage
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: docmost
POSTGRES_USER: docmost
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U docmost -d docmost"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
redis:
image: redis:8-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"]
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
volumes:
data:
db:
redis:
More in Notes and wikis
- MemosShort Markdown notes on a private timeline
- HedgeDocMarkdown notes you write together in real time
- Obsidian LiveSyncA CouchDB server that syncs your Obsidian vaults with Self-hosted LiveSync
- BookStackA wiki organised as shelves, books, chapters and pages
- EtherpadDocuments edited together in real time: each author in their own colour, with chat, history and plugins
- MediaWikiThe wiki software of Wikipedia: pages anyone can read, edited in the visual or the source editor
