DEV Community

Cover image for Deploying Outline – Open-Source Knowledge Base Platform
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya • Originally published at docs.vultr.com

Deploying Outline – Open-Source Knowledge Base Platform

Outline is an open-source knowledge base and team documentation platform including real-time collaborative editing, collections for structured content, and auth-provider integrations. This guide deploys it via Docker Compose with PostgreSQL, Redis, and Traefik-managed HTTPS, then builds a collection, writes a doc, and invites a team member.

Prerequisites: a Linux server (2 vCPU / 4GB RAM minimum), Docker + Docker Compose, a domain A record (e.g. outline.example.com), optional SMTP credentials (needed for invitations, password resets, notifications).


Set Up the Project

$ mkdir -p ~/outline/{data,pgdata,redis,letsencrypt}
$ cd ~/outline
Enter fullscreen mode Exit fullscreen mode
  • data/ — attachments/uploads
  • pgdata/ — database files
  • redis/ — cache/session data
  • letsencrypt/ — Traefik ACME certs

Generate two secrets (run twice, save both):

$ openssl rand -hex 32
Enter fullscreen mode Exit fullscreen mode

Environment file:

$ nano .env
Enter fullscreen mode Exit fullscreen mode
NODE_ENV=production
DOMAIN=outline.example.com
LETSENCRYPT_EMAIL=admin@example.com

URL=https://outline.example.com
PORT=3000
SECRET_KEY=FIRST_GENERATED_SECRET
UTILS_SECRET=SECOND_GENERATED_SECRET

POSTGRES_DB=outline
POSTGRES_USER=outline
POSTGRES_PASSWORD=STRONG_DATABASE_PASSWORD
DATABASE_URL=postgres://outline:${POSTGRES_PASSWORD}@postgres:5432/outline
PGSSLMODE=disable

REDIS_URL=redis://redis:6379

FILE_STORAGE=local
FILE_STORAGE_LOCAL_ROOT_DIR=/var/lib/outline/data

LOG_LEVEL=info

# Optional: SMTP Configuration for outgoing emails
# SMTP_HOST=smtp.example.com
# SMTP_PORT=587
# SMTP_USERNAME=SMTP_USERNAME
# SMTP_PASSWORD=SMTP_PASSWORD
# SMTP_FROM_ADDRESS=noreply@outline.example.com
# SMTP_SECURE=false
Enter fullscreen mode Exit fullscreen mode

Outline runs without SMTP, but invitations, password resets, and email notifications need it — uncomment for production.


Deploy with Docker Compose

$ nano docker-compose.yml
Enter fullscreen mode Exit fullscreen mode
services:
  traefik:
    image: traefik:v3.6.15
    container_name: traefik
    restart: unless-stopped
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

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

  redis:
    image: redis:7-alpine
    container_name: outline-redis
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - "./redis:/data"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 3

  outline:
    image: docker.getoutline.com/outlinewiki/outline:1.7.0
    container_name: outline
    restart: unless-stopped
    env_file:
      - .env
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    expose:
      - "3000"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.outline.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.outline.entrypoints=websecure"
      - "traefik.http.routers.outline.tls.certresolver=letsencrypt"
      - "traefik.http.services.outline.loadbalancer.server.port=3000"
    volumes:
      - "./data:/var/lib/outline/data"
Enter fullscreen mode Exit fullscreen mode
$ docker compose up -d
$ docker compose ps -a
$ docker compose logs
Enter fullscreen mode Exit fullscreen mode

Four containers: Outline, PostgreSQL, and Redis should show healthy; Traefik shows Up (no health check configured on it).


First-Run Setup

Visit https://outline.example.com:

  1. Create Workspace — workspace name, admin name, admin email.
  2. Continue to reach the super admin account.

Build a Knowledge Base

1. Create a collection: sidebar → New Collection, name it (e.g. March Articles), pick default access (Can edit / View only / No access), optionally configure Advanced options (templates, public sharing, comments), Create.

2. Write a document: + New doc, title it, use the rich text editor — type / for headings, lists, tables, code blocks.

3. Invite team members: sidebar → + Invite people, pick a role per invite (Admin / Editor / Viewer), enter email + name, + Add another for more, Send Invites.

Email invites need working SMTP — without it, share via public links or create accounts manually instead.


Next Steps

Outline is running with persistent storage, caching, and automatic HTTPS. From here:

  • Configure SMTP so invitations and notifications actually send
  • Set up an OIDC/SAML provider for team SSO
  • Explore the API for programmatic doc creation and integrations

For the full guide, visit the original article on Vultr Docs.

Top comments (0)