On this page
- What do you need before installing Outline?
- How do you lay out the project folder?
- What goes into the Compose file?
- Which settings go into outline.env?
- How do you start Outline and check it?
- How do you publish it with HTTPS?
- How do you send invitations and notices by mail?
- How do you back up and upgrade Outline?
- What are common Outline problems?
- Questions
What do you need before installing Outline?
Prepare a server with Docker Engine and the Compose plugin, a domain name, and an identity source for logins.
- Server: Ubuntu 24.04, Ubuntu 22.04, Debian 12 or Debian 13. Outline, PostgreSQL and Redis together sit comfortably in 2 GB; 4 GB leaves headroom for a larger team and search indexing.
- Docker: install it as described in the Docker Engine tutorial, or start from the Docker app image.
- DNS: point
wiki.example.netat the server with A and AAAA records. - Login provider: an OpenID Connect provider (for example a self-hosted Authelia or Zitadel), or one of the hosted sign-in options Outline supports such as Slack or Microsoft accounts.
How do you lay out the project folder?
Keep everything under one directory so backups are simple.
sudo mkdir -p /opt/outline/data
cd /opt/outline
sudo chown -R 1001:1001 /opt/outline/data
openssl rand -hex 32
openssl rand -hex 32The two hex strings become SECRET_KEY and UTILS_SECRET. The data folder is owned by UID 1001 because the Outline image runs as that unprivileged user and stores uploaded files there when local storage is used.
What goes into the Compose file?
Create /opt/outline/compose.yaml. Only Outline is published, and only on the loopback address, so the database and cache never face the internet.
services:
outline:
image: docker.getoutline.com/outlinewiki/outline:latest
env_file: ./outline.env
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./data:/var/lib/outline/data
depends_on:
- postgres
- redis
restart: unless-stopped
redis:
image: redis:7
restart: unless-stopped
postgres:
image: postgres:16
environment:
POSTGRES_USER: outline
POSTGRES_PASSWORD: change-this-db-pass
POSTGRES_DB: outline
volumes:
- ./pg:/var/lib/postgresql/data
restart: unless-stoppedPin a specific Outline version tag instead of latest once you are happy with a release, so upgrades happen when you choose.
Which settings go into outline.env?
The environment file holds the URL, secrets, database link, storage and login provider. A minimal OIDC example:
NODE_ENV=production
URL=https://wiki.example.net
PORT=3000
SECRET_KEY=first-hex-string
UTILS_SECRET=second-hex-string
DATABASE_URL=postgres://outline:change-this-db-pass@postgres:5432/outline
PGSSLMODE=disable
REDIS_URL=redis://redis:6379
FILE_STORAGE=local
FILE_STORAGE_LOCAL_ROOT_DIR=/var/lib/outline/data
FILE_STORAGE_UPLOAD_MAX_SIZE=26214400
FORCE_HTTPS=false
OIDC_CLIENT_ID=outline
OIDC_CLIENT_SECRET=secret-from-your-idp
OIDC_AUTH_URI=https://id.example.net/authorize
OIDC_TOKEN_URI=https://id.example.net/token
OIDC_USERINFO_URI=https://id.example.net/userinfo
OIDC_DISPLAY_NAME=Company login
OIDC_SCOPES=openid profile emailFORCE_HTTPS=false is set because Caddy terminates TLS and talks plain HTTP to the container. In your identity provider, register the redirect URL https://wiki.example.net/auth/oidc.callback. Protect the file with chmod 600 outline.env, since it holds secrets.
How do you start Outline and check it?
Pull the images and start the stack. Database migrations run when the Outline container starts.
cd /opt/outline
sudo docker compose pull
sudo docker compose up -d
sudo docker compose ps
sudo docker compose logs -f outline
curl -sI http://127.0.0.1:3000 | head -n 1A line saying the server is listening on port 3000 means it is ready. If the logs complain about permissions, recheck the owner of /opt/outline/data.
How do you publish it with HTTPS?
Caddy obtains and renews the certificate on its own and forwards WebSocket traffic, which Outline uses for live collaborative editing. With Caddy installed from its official repository (see Caddy HTTPS), the whole site block is:
wiki.example.net {
reverse_proxy 127.0.0.1:3000
}Reload with sudo systemctl reload caddy and open the ports for web traffic only:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw statusBecause the container port is bound to 127.0.0.1, Docker does not expose it to the world, which matters since Docker port rules otherwise skip UFW. Prefer Nginx? Use an Nginx reverse proxy and add the Upgrade and Connection headers for WebSockets.
How do you send invitations and notices by mail?
Outline mails invitations, mentions and digests, and it can offer email magic-link sign-in to members once SMTP works. Rather than counting on port 25 (open a support ticket first if you really need it), route mail through an authenticated relay on port 587 as covered in the SMTP relay guide:
SMTP_HOST=smtp.relay.example.net
SMTP_PORT=587
SMTP_USERNAME=wiki@example.net
SMTP_PASSWORD=relay-password
SMTP_FROM_EMAIL=wiki@example.net
SMTP_SECURE=falseSMTP_SECURE=false means STARTTLS on 587 rather than implicit TLS on 465. Run sudo docker compose up -d after editing so the container picks up the new values.
How do you back up and upgrade Outline?
Back up the database and the data folder together.
cd /opt/outline
sudo docker compose exec -T postgres pg_dump -U outline outline > outline-$(date +%F).sql
sudo tar czf outline-files-$(date +%F).tar.gz data outline.env compose.yamlTo upgrade, read the release notes, change the image tag if you pinned one, then pull and recreate:
sudo docker compose pull outline
sudo docker compose up -d
sudo docker image prune -fKeep the PostgreSQL major version fixed; moving from 16 to a newer major needs a dump and restore, not just a new tag.
What are common Outline problems?
- Sign-in loops back: the redirect URL in the identity provider does not match
URLexactly, including https. - Live editing stops syncing: the proxy is not forwarding WebSockets. Caddy does this by default; for Nginx add the upgrade headers.
- Uploads fail: the data folder is not owned by UID 1001, or the file is larger than
FILE_STORAGE_UPLOAD_MAX_SIZE. - Database errors at start:
PGSSLMODE=disableis missing while PostgreSQL runs without TLS inside the stack.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about Outline knowledge base
Can I log in to Outline with a username and password?
Not directly. Outline delegates authentication to a provider such as OpenID Connect, Slack or Microsoft accounts. Email magic links can be used once SMTP is configured, but you still need a provider for the workspace setup.
Do I need S3 storage for Outline?
No. FILE_STORAGE=local keeps attachments on the server disk in the mounted data folder.
How much memory does Outline need?
A small team runs well on 2 GB with PostgreSQL and Redis in the same stack. Choose 4 GB for many active editors.
Can Outline import from other wikis?
Yes. It imports Markdown and several export formats through the settings area, which helps when moving from another tool.
Is Outline free to self-host?
The source is available under the Business Source License, which allows self-hosting for your own team. Read the license text for the exact terms.
More in Self-hosted apps
- Nextcloud on Nginx
- ownCloud Infinite Scale
- Seafile file sync
- Vaultwarden password vault
- Passbolt team password manager
- Gitea Git hosting
- Forgejo Git server
- GitLab Community Edition
- Gogs Git service
- Wiki.js
- BookStack documentation
- Paperless-ngx documents
- n8n workflow automation
- Activepieces automation
- Plausible Analytics (Community Edition)
- Umami analytics
- Mattermost team chat
- Matrix Synapse with Element
- Jitsi Meet video calls
- ONLYOFFICE Docs with Nextcloud
- HashiCorp Vault secrets server
- OpenBao secrets management
- Infisical secrets manager
- Authelia SSO and forward auth
- Zitadel identity platform
- VS Code in the browser (code-server)
- Joplin Server for notes sync
- Firefly III personal finance
- Snipe-IT asset tracking
- Odoo ERP on Ubuntu or Debian
- ERPNext with frappe_docker
- Dolibarr ERP and CRM with Nginx
- Penpot design tool with Docker
- Planka kanban boards
- Leantime project management
- Wekan boards with Docker
- Cal.com scheduling
- Chatwoot support inbox
- Mautic marketing automation
- DocuSeal document signing
- Metabase dashboards
- Appwrite backend server
- Self-hosted Supabase
- PocketBase backend
- RustDesk relay server
- Traccar GPS tracking
- Redmine project tracker
- The Lounge IRC client
- CyberChef data toolbox
- Typebot chat forms
- AFFiNE workspace
- Overleaf Community Edition
- Neko shared virtual browser
- imgproxy image resizing
- NetBox network inventory
- UVdesk help desk
- YetiForce CRM