Log inSign up

Outline knowledge base on your own server

Outline runs as a container next to PostgreSQL and Redis, so the quickest path is a Docker Compose file, an outline.env with two random secrets, and Caddy in front for HTTPS. Outline has no local passwords: you must connect an authentication provider, and OpenID Connect is the most flexible choice for a self-hosted setup.

Topic: Self-hosted apps · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

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.net at 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 32

The 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-stopped

Pin 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 email

FORCE_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 1

A 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 status

Because 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=false

SMTP_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.yaml

To 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 -f

Keep 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 URL exactly, 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=disable is 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.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-2small team with light editing1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months
A2-4larger team with many attachments2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months

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.