# Outline

> Modern team knowledge base and wiki.

- Category: Productivity & Collaboration
- Difficulty: advanced
- Components: outline, postgres, redis, minio
- Tags: outline, wiki, documentation, knowledge
- Source: https://docker.recipes/productivity/outline-wiki

## Overview

Outline is an open-source team wiki and knowledge base platform built by the team behind Figma, designed to help organizations create, organize, and share documentation in real-time. Unlike traditional wiki software, Outline emphasizes collaborative editing with a modern interface that supports real-time collaboration, structured content organization through collections, and powerful search capabilities across all documentation. This Docker stack combines Outline with PostgreSQL for robust document and user data storage, Redis for session management and real-time features, and MinIO for S3-compatible file storage, creating a self-hosted alternative to services like Notion or Confluence. The architecture leverages PostgreSQL's full-text search capabilities for document indexing, Redis for caching frequently accessed content and managing WebSocket connections for live collaboration, while MinIO handles document attachments, images, and exported content with S3 API compatibility. This combination is ideal for development teams, startups, and organizations that need complete control over their knowledge base infrastructure while maintaining the modern collaborative features expected from cloud-based documentation platforms. The stack provides enterprise-grade document management without vendor lock-in, making it particularly valuable for teams with security requirements or those operating in air-gapped environments.

## Features

- Real-time collaborative markdown editing with conflict resolution powered by Redis WebSocket management
- Full-text search across all documents using PostgreSQL's advanced text search with ranking and highlighting
- S3-compatible file attachment handling through MinIO with automatic image optimization and CDN-like delivery
- Collection-based document organization with nested structures stored efficiently in PostgreSQL
- Document version history and audit trails leveraging PostgreSQL's MVCC transaction system
- OAuth/OIDC/SAML authentication integration with session state managed through Redis
- Slack integration for document notifications and slash commands with Redis-backed message queuing
- Public document sharing with configurable permissions and Redis-cached access control

## Use cases

- Engineering teams maintaining technical documentation, API specs, and runbooks with real-time collaboration
- Startup knowledge bases requiring rapid content creation without per-user licensing costs
- Educational institutions hosting course materials and collaborative research documentation
- Open source projects providing contributor guides, architecture docs, and community wikis
- Consulting firms managing client documentation with granular access controls and audit trails
- Remote teams building company handbooks, processes, and institutional knowledge repositories
- Development teams integrating documentation workflows with Slack and GitHub for automated updates

## Prerequisites

- Minimum 4GB RAM (Outline: 1GB, PostgreSQL: 1GB, Redis: 512MB, MinIO: 2GB recommended)
- Available ports 3000 (Outline web interface) and ensure no conflicts with existing services
- OpenSSL or equivalent for generating SECRET_KEY and UTILS_SECRET (32-byte hex values required)
- OAuth provider configured (Google, Slack, Azure AD, or custom OIDC) as Outline requires external authentication
- Understanding of environment variable management for sensitive credentials and database passwords
- MinIO administration knowledge for bucket creation and S3 access policy configuration

## docker-compose.yml

```yaml
services:
  outline:
    image: outlinewiki/outline:latest
    container_name: outline
    restart: unless-stopped
    environment:
      SECRET_KEY: ${SECRET_KEY}
      UTILS_SECRET: ${UTILS_SECRET}
      DATABASE_URL: postgres://outline:${DB_PASSWORD}@postgres:5432/outline
      REDIS_URL: redis://redis:6379
      URL: http://localhost:3000
      PORT: 3000
      AWS_ACCESS_KEY_ID: minio
      AWS_SECRET_ACCESS_KEY: ${MINIO_PASSWORD}
      AWS_REGION: us-east-1
      AWS_S3_UPLOAD_BUCKET_URL: http://minio:9000
      AWS_S3_UPLOAD_BUCKET_NAME: outline
      AWS_S3_FORCE_PATH_STYLE: "true"
      AWS_S3_ACL: private
    ports:
      - "3000:3000"
    depends_on:
      - postgres
      - redis
      - minio

  postgres:
    image: postgres:15-alpine
    container_name: outline-db
    environment:
      POSTGRES_USER: outline
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: outline
    volumes:
      - outline_db:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    container_name: outline-redis

  minio:
    image: minio/minio:latest
    container_name: outline-minio
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: minio
      MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
    volumes:
      - outline_minio:/data

volumes:
  outline_db:
  outline_minio:
```

## .env

```bash
SECRET_KEY=generate-a-32-byte-key-here
UTILS_SECRET=generate-another-key-here
DB_PASSWORD=changeme
MINIO_PASSWORD=changeme123
```

## Usage notes

- Docs: https://docs.getoutline.com/
- Access at http://localhost:3000 - requires OIDC/SAML/Slack/Google auth
- Generate secrets: openssl rand -hex 32
- Create MinIO bucket before first use
- Real-time collaborative editing with markdown
- Integrations: Slack, Figma, Diagrams.net, GitHub

## Troubleshooting

- Authentication redirect loops: Verify URL environment variable matches your actual domain and OAuth provider redirect URIs
- File upload failures with 'AccessDenied' errors: Create the outline bucket in MinIO and set proper S3 bucket policies through MinIO console
- Slow document loading and search: Increase PostgreSQL shared_buffers and work_mem, ensure adequate RAM allocation to database container
- Real-time collaboration not working: Check Redis connectivity and ensure WebSocket connections aren't blocked by reverse proxy configuration
- Database migration failures on startup: Ensure PostgreSQL container fully initializes before Outline starts using depends_on and health checks
- MinIO connection refused errors: Verify MINIO_ROOT_PASSWORD matches AWS_SECRET_ACCESS_KEY and MinIO container is accessible on port 9000

