Home Server › Containers

Self-hosting Outline Wiki with Authelia OIDC and local storage

Run Outline Wiki in Docker Compose with Authelia OIDC SSO, local file storage instead of S3, PostgreSQL, Redis, and Gmail SMTP notifications.

Self-hosting Outline Wiki with Authelia OIDC and local storage

Cloud note tools like Notion get awkward when you want to document internal server IPs, network topologies, or private runbooks. Here is how I self-hosted Outline Wiki with Authelia OIDC single sign-on, local volume file storage instead of S3, and Gmail SMTP alerts.

Tested with Outline (outlinewiki/outline:latest), PostgreSQL, Redis 8 Alpine, Authelia OIDC, and Nginx Proxy Manager on Docker Compose.


Why Outline fits a homelab knowledge base

I used to keep server runbooks and study notes in cloud SaaS tools, and three annoyances kept showing up:

  • If external internet drops, local infrastructure documentation goes unreachable right when you need it most.
  • Storing private network diagrams, internal hostnames, and runbooks on a third-party cloud feels unnecessary when you already run a home server.
  • SaaS tools don’t integrate with a local SSO portal, leaving yet another account and session lifecycle to manage.

Outline is an open-source React and Node.js wiki with fast Markdown editing, slash (/) commands, code syntax highlighting, real-time collaboration, and nested document trees.

One design choice to know upfront: Outline has no built-in username/password registration. It delegates authentication completely to an external identity provider (OIDC, Google, Slack, etc.). Because I already run Authelia as an OIDC provider backed by LLDAP, Outline plugs straight into the existing identity stack.

OptionAuth modelFile storageBest fit
Outline (local storage)External OIDC/OAuth2 requiredLocal Docker volume (FILE_STORAGE=local)Homelabs that already run Authelia/Authentik and want Notion-like speed
BookStackBuilt-in local auth + optional OIDC/LDAPLocal filesystemQuick standalone wikis when you don’t want to run an OIDC IdP
Outline + MinIO/S3External OIDC/OAuth2 requiredS3-compatible object storageMulti-node setups or teams uploading large media assets

When not to use local file storage: If you plan to run multiple Outline replicas behind a load balancer, FILE_STORAGE: local won’t share uploads across containers. In that case, point Outline at an S3-compatible store like MinIO. For a single-node homelab, a named Docker volume saves you an entire extra service.


Outline Wiki architecture

Outline sits behind Nginx Proxy Manager on proxy_network and shares the central PostgreSQL and Redis stack on database_network. Attachments go straight into a local volume mounted at /var/lib/outline/data, while document invites and notifications go out over Gmail SMTP on port 465.

flowchart TD
    subgraph Ingress["Web gateway"]
        User["Browser"] -->|"HTTPS (outline.namju.kim)"| NPM["Nginx Proxy Manager"]
    end

    subgraph Knowledge["Knowledge stack (Docker Compose)"]
        NPM --> Outline["Outline Wiki<br/>(Node.js / port 3000)"]
        VolData[("Local file volume<br/>/var/lib/outline/data")]
        Outline --- VolData
    end

    subgraph Core["Auth and data tiers"]
        Outline -->|"OIDC SSO token exchange"| Auth["Authelia (SSO)"]
        Outline -->|"Sessions & pub/sub"| RD["Redis 8 (Alpine)"]
        Outline -->|"Document storage"| PG["PostgreSQL (db: outline)"]
    end

    subgraph External["Outbound mail"]
        Outline -.->|"Invites & alerts (SMTP 465)"| Gmail["Gmail SMTP"]
    end

Outline Docker Compose configuration

Here is services/knowledge/docker-compose.yaml. Generate OUTLINE_SECRET_KEY and OUTLINE_UTILS_SECRET with openssl rand -hex 32 and store them in .env.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# services/knowledge/docker-compose.yaml
name: knowledge

services:
  outline:
    image: outlinewiki/outline:latest
    container_name: outline
    restart: unless-stopped
    environment:
      TZ: Asia/Seoul
      NODE_ENV: production
      PORT: "3000"

      # Public URL and reverse proxy trust
      URL: https://outline.namju.kim
      FORCE_HTTPS: "false"
      PROXY_HEADERS_TRUSTED: "true"

      # App secrets (generate with: openssl rand -hex 32)
      SECRET_KEY: ${OUTLINE_SECRET_KEY:?required}
      UTILS_SECRET: ${OUTLINE_UTILS_SECRET:?required}

      # PostgreSQL and Redis connections
      DATABASE_URL: "postgres://outline_user:${OUTLINE_DB_PASSWORD}@postgres:5432/outline"
      PGSSLMODE: disable
      REDIS_URL: redis://redis:6379

      # Local volume storage without AWS S3 (25 MB upload limit)
      FILE_STORAGE: local
      FILE_STORAGE_LOCAL_ROOT_DIR: /var/lib/outline/data
      FILE_STORAGE_UPLOAD_MAX_SIZE: "26214400"

      # Authelia OIDC SSO endpoints
      OIDC_CLIENT_ID: outline
      OIDC_CLIENT_SECRET: ${OUTLINE_OIDC_SECRET:?required}
      OIDC_AUTH_URI: https://auth.namju.kim/api/oidc/authorization
      OIDC_TOKEN_URI: https://auth.namju.kim/api/oidc/token
      OIDC_USERINFO_URI: https://auth.namju.kim/api/oidc/userinfo
      OIDC_USERNAME_CLAIM: preferred_username
      OIDC_DISPLAY_NAME: Authelia
      OIDC_SCOPES: "openid offline_access profile email"

      # Outbound email notifications (Gmail App Password)
      EMAIL_ENABLED: "true"
      SMTP_HOST: smtp.gmail.com
      SMTP_PORT: 465
      SMTP_SECURE: true
      SMTP_USERNAME: ${OUTLINE_SMTP_USER:?required}
      SMTP_PASSWORD: ${OUTLINE_SMTP_PASSWORD:?required}
      SMTP_FROM_EMAIL: ${OUTLINE_SMTP_FROM_EMAIL:?required}
      SMTP_REPLY_EMAIL: ${OUTLINE_SMTP_FROM_EMAIL:?required}

    volumes:
      - outline_data:/var/lib/outline/data

    networks:
      - proxy_network
      - database_network

volumes:
  outline_data:

networks:
  proxy_network:
    external: true
  database_network:
    external: true

Preventing reverse-proxy redirect loops

When Outline runs behind Nginx Proxy Manager, two flags prevent the most common startup failure:

  • PROXY_HEADERS_TRUSTED: "true": Tells Outline to trust X-Forwarded-Proto and X-Forwarded-For from Nginx. Without it, Outline thinks incoming requests arrived over plain HTTP and bounces browsers into an infinite redirect loop.
  • FORCE_HTTPS: "false": Leaves TLS termination strictly to Nginx Proxy Manager instead of having Node.js attempt its own HTTPS redirects.

Registering Outline as an Authelia OIDC client

Add the outline client under identity_providers.oidc.clients in identity/authelia/configuration.yml and restart Authelia:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# identity/authelia/configuration.yml (Outline OIDC excerpt)
      - client_id: outline
        client_name: Outline
        client_secret: '$pbkdf2-sha512$310000$/xmjkLoxQOA.zHN4vXwdqg$OXtGoOfLtdVVDA8Y0EiZ.zaSffbl/f9U8KKg8g7yUbTrLV6MIcsVGirISKsM7bfe5MPcia8sCNcFsEbj5S8mxg'
        public: false
        authorization_policy: one_factor
        require_pkce: false
        redirect_uris:
          - https://outline.namju.kim/auth/oidc.callback
        scopes:
          - openid
          - offline_access
          - profile
          - email
        response_types:
          - code
        grant_types:
          - authorization_code
          - refresh_token
        token_endpoint_auth_method: client_secret_post

Pay close attention to two fields here:

  • redirect_uris: Must match https://outline.namju.kim/auth/oidc.callback exactly. Any trailing slash mismatch causes Authelia to reject the authorization request.
  • scopes and grant_types: Include offline_access and refresh_token alongside email so Outline can map the user identity and keep sessions alive without forcing constant re-authentication.

Starting the stack and verifying SSO login

Bring up the container:

1
docker compose up -d

Open https://outline.namju.kim in your browser. You should see Outline’s sign-in screen with a Continue with Authelia button.

flowchart TD
    Step1["1. Open https://outline.namju.kim"] --> Step2["2. Click Continue with Authelia"]
    Step2 --> Step3["3. Sign in on auth.namju.kim (LLDAP)"]
    Step3 --> Step4["4. Approve consent & enter Outline workspace"]

Clicking the button redirects to auth.namju.kim. After signing in with your LLDAP account and approving the OIDC consent prompt, Outline creates your workspace user automatically and drops you into the editor. Pasting or uploading an image writes straight to /var/lib/outline/data, and page loads stay snappy over the local network.


Production caveats and checklist

Local volume permissions: Outline’s container runs as a non-root user (nodejs, UID 1001). Named Docker volumes (as shown above) handle ownership cleanly, but if you switch to a host bind mount, run chown -R 1001:1001 on the host directory or image uploads will fail with EACCES.

WebSockets in Nginx Proxy Manager: Outline relies on WebSockets for real-time collaborative editing and live document updates. Make sure Websockets Support is toggled on in the Nginx Proxy Manager host settings for outline.namju.kim.

Before migrating your notes into Outline, verify:

  • Websockets Support is enabled on the outline.namju.kim proxy host in Nginx Proxy Manager.
  • Both the outline PostgreSQL database and the outline_data volume are backed up together so attachments stay in sync with document records.
  • OUTLINE_SMTP_PASSWORD uses a dedicated Gmail App Password (with 2FA enabled on the Google account), not your primary Google password.
  • Signing out and back in works cleanly through Authelia without redirect loops or invalid_redirect_uri errors.
This post is licensed under CC BY 4.0 by the author.