Outline logo

Outline

The fastest knowledge base for growing teams

Alternative to: notion, confluence


Outline is a fast, collaborative knowledge base built for growing teams, combining real-time document editing with powerful organization and search. It supports markdown, nested documents, comments, and integrations with tools like Slack, serving as a self-hosted alternative to Notion and Confluence.

Outline Docker Compose example

Self-host Outline on your own server, homelab, or VPS starting from this Docker Compose example. It runs Outline in Docker containers using the official outlinewiki/outline:latest, postgres:16-alpine, redis:7-alpine images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  outline:
    image: outlinewiki/outline:latest
    # Apply any pending database migrations, then start the server. The outline
    # image does not auto-migrate on `yarn start`, so it is done here on boot.
    command: sh -c "yarn sequelize:migrate --env=production-ssl-disabled && yarn start"
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    environment:
      NODE_ENV: "production"
      # 32-byte hex secret used to encrypt data at rest. Generate a real value
      # with: openssl rand -hex 32
      SECRET_KEY: "380ec62512f5fae54d397eba71d7066fff021f01dfd371a15f234dfaea2fa7ad"
      # Separate 32-byte hex secret used for signing. Generate a real value
      # with: openssl rand -hex 32
      UTILS_SECRET: "ad6c7c9599673e0ea04bcc7b644bcc1c0c22e7fabd18e97623f900617b14eaa6"
      # Fully-qualified, publicly reachable URL of this Outline install (no
      # trailing slash). Must match the address users open in their browser.
      URL: "http://localhost:3000"
      # Port the Outline server listens on inside the container.
      PORT: "3000"
      # Postgres connection string. Points at the bundled postgres service.
      DATABASE_URL: "postgres://outline:outline@postgres:5432/outline"
      # Disable SSL for the connection to the bundled Postgres on the same
      # private network (it does not serve TLS).
      PGSSLMODE: "disable"
      # Redis connection string. Points at the bundled redis service.
      REDIS_URL: "redis://redis:6379"
      # Keep uploaded documents/attachments on a local disk volume ("local")
      # instead of an external S3-compatible store ("s3").
      FILE_STORAGE: "local"
      # Directory (on the data volume) where local attachments are written.
      FILE_STORAGE_LOCAL_ROOT_DIR: "/var/lib/outline/data"
      # Maximum allowed size, in bytes, for an uploaded attachment (250 MB).
      FILE_STORAGE_UPLOAD_MAX_SIZE: "262144000"
      # Set to true only when TLS is terminated by a proxy in front of Outline.
      # Kept false so a plain-HTTP `docker compose up` does not redirect to an
      # unserved https port.
      FORCE_HTTPS: "false"
      # Default interface language.
      DEFAULT_LANGUAGE: "en_US"
      # Enable the global request rate limiter.
      RATE_LIMITER_ENABLED: "true"
      # Log verbosity: error, warn, info, http, verbose, debug, or silly.
      LOG_LEVEL: "info"
      # ---- Email sign-in (optional) ----
      # Outline has no local username/password login. Configure an SMTP server
      # here to enable magic-link email sign-in, or use the OIDC block below.
      SMTP_HOST: ""
      SMTP_PORT: ""
      SMTP_USERNAME: ""
      SMTP_PASSWORD: ""
      SMTP_FROM_EMAIL: ""
      # Use an implicit TLS connection to the SMTP server (usually port 465).
      SMTP_SECURE: "true"
      # ---- OIDC single sign-on (optional) ----
      # Fill these to allow sign-in through any OpenID Connect provider.
      OIDC_CLIENT_ID: ""
      OIDC_CLIENT_SECRET: ""
      OIDC_AUTH_URI: ""
      OIDC_TOKEN_URI: ""
      OIDC_USERINFO_URI: ""
      # JWT claim used as the username.
      OIDC_USERNAME_CLAIM: "preferred_username"
      # Label shown on the OIDC sign-in button.
      OIDC_DISPLAY_NAME: "OpenID Connect"
      # Space-separated OAuth scopes requested from the provider.
      OIDC_SCOPES: "openid profile email"
    volumes:
      - data:/var/lib/outline/data
    restart: unless-stopped

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: "outline"
      POSTGRES_PASSWORD: "outline"
      POSTGRES_DB: "outline"
    volumes:
      - database:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U outline -d outline"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

volumes:
  data:
  database:

Prefer a managed setup? WinterFlow installs, configures, and updates Outline for you using this same Docker Compose configuration.