Outline is a beautifully fast, Markdown-friendly knowledge base for teams. Think Notion or Confluence, but self-hostable: nested documents, real-time collaborative editing, powerful search, templates, and integrations with Slack and other tools. It’s popular for engineering handbooks, runbooks and company wikis.
Other wiki options: Wiki.js, BookStack, MediaWiki and DokuWiki.
Important: authentication
Outline has no built-in username and password login. Users sign in through an identity provider:
- OIDC (Keycloak, Authentik, Authelia, Zitadel, Google Workspace, Microsoft Entra ID);
- Slack or Google OAuth;
- email magic links (passwordless sign-in via SMTP).
Plan this first. A self-hosted OIDC provider is a good fit if you don’t use Google or Microsoft. See OAuth 2.0 and OIDC explained.
Requirements
- 2 vCPU and 2–4 GB RAM.
- Docker and Docker Compose. See install Docker.
- A domain (
wiki.example.com) with HTTPS. - PostgreSQL and Redis (in the compose file), plus file storage: local disk or S3-compatible. See MinIO.
Docker Compose
# /opt/outline/compose.yaml
services:
outline:
image: docker.getoutline.com/outlinewiki/outline:latest
restart: unless-stopped
env_file: ./docker.env
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./storage:/var/lib/outline/data
depends_on: [postgres, redis]
redis:
image: redis:7
restart: unless-stopped
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: outline
POSTGRES_PASSWORD: change-me-db
POSTGRES_DB: outline
volumes:
- ./postgres:/var/lib/postgresql/data
docker.env (key settings; start from the project’s .env.sample):
NODE_ENV=production
URL=https://wiki.example.com
SECRET_KEY=<openssl rand -hex 32>
UTILS_SECRET=<openssl rand -hex 32>
DATABASE_URL=postgres://outline:change-me-db@postgres:5432/outline
PGSSLMODE=disable
REDIS_URL=redis://redis:6379
FILE_STORAGE=local
FILE_STORAGE_LOCAL_ROOT_DIR=/var/lib/outline/data
FORCE_HTTPS=false # TLS is terminated by Nginx
# OIDC example
OIDC_CLIENT_ID=outline
OIDC_CLIENT_SECRET=…
OIDC_AUTH_URI=https://auth.example.com/application/o/authorize/
OIDC_TOKEN_URI=https://auth.example.com/application/o/token/
OIDC_USERINFO_URI=https://auth.example.com/application/o/userinfo/
OIDC_DISPLAY_NAME=Company SSO
# email (magic links, notifications)
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=…
SMTP_PASSWORD=…
SMTP_FROM_EMAIL[email protected]
sudo mkdir -p /opt/outline/storage && sudo chown 1001:1001 /opt/outline/storage
cd /opt/outline && docker compose up -d
docker compose logs -f outline
Database migrations run on start. Variable names change occasionally between versions, so check the current sample file.
HTTPS via Nginx
server {
server_name wiki.example.com;
client_max_body_size 100M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
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";
}
# listen 443 ssl; certbot --nginx -d wiki.example.com
}
WebSockets are required for real-time collaboration. See Nginx WebSocket proxy.
Using Outline
- Collections group documents (Engineering, HR, Runbooks). Each has its own permissions.
- Documents nest infinitely, with backlinks, mentions, embeds and templates for recurring docs.
- Import from Markdown, Notion or Confluence exports.
- API and integrations: a Slack app for search and link previews, and a REST API for automation.
Backups
Back up the PostgreSQL database, plus the file storage (local ./storage, or your S3 bucket):
docker compose exec -T postgres pg_dump -U outline outline > /backups/outline-$(date +%F).sql
tar -czf /backups/outline-files-$(date +%F).tar.gz -C /opt/outline storage
Outline also offers workspace exports (Markdown/JSON) in Settings, which is useful as a portable extra copy. See backup strategy.
Updates and security
- Update:
docker compose pull && docker compose up -d. Read the release notes. See updating self-hosted apps. - Restrict sign-in to your domain or IdP group (
ALLOWED_DOMAINS, or IdP policies). - Keep PostgreSQL and Redis on the internal network only.
Quick reference
| Item | Value |
|---|---|
| App port | 3000 |
| Public URL | URL=https://wiki.example.com |
| Login | OIDC, Slack, Google or email magic link |
| Storage | FILE_STORAGE=local or s3 |
| Backup | pg_dump + storage directory |
Related: Docker Compose and zero trust networking.