---
title: "A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki"
description: "A complete guide on how to set up the open-source knowledge base Outline Wiki using Docker Compose, complete with a full walkthrough for data backup and restoration with MinIO and PostgreSQL."
canonical_url: "https://blog.markkulab.net/en/post/outline-wiki-knowledge-base-system"
author: "Mark Ku"
author_url: "https://blog.markkulab.net/en/author/mark-ku"
site: "Mark Ku's Tech Notes"
date_published: "2025-06-11 01:01:35 +0800"
category: "Management"
tags: ["outline", "wiki", "knowledge base", "docker", "minio", "postgresql", "backup", "self-hosted"]
language: "en"
license: "CC BY 4.0"
license_url: "https://creativecommons.org/licenses/by/4.0/"
attribution: "when reusing or quoting, credit the author and link back to the original"
---

# A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki

> **TL;DR** — 歡迎收聽 Mark 的 Tech Insights，我是人工智慧主持人璦廷。在追求高效協作的路上，你是否正尋找一套完美的知識庫系統？ 今天為大家介紹一款免費開源、類似 Notion 的工具：Outline Wiki。它能解決常見限制，提升團隊資訊管理效率。 讓我們來看看它的核心技術。透過 Docker Compose 就能快速佈署。這個重點值得注意，它不支援傳統帳密，而是採用第三方授權，例如企業版 Google、GitHub 或微軟帳號登入。 在實際維護上，若圖片無法顯示，只需在 MinIO 手動建立資料夾。系統資料分為儲存文字紀錄的 PostgreSQL，以及存放檔案的 MinIO。文章提供了完整的備份與還原指令，確保資產安全。 總結來說，Outline 是建立專屬知識庫的優秀選擇。不妨思考看看，你的團隊目前最需要改善的資訊共享痛點是什麼呢？

## Background

In the pursuit of efficient data and knowledge sharing, many companies and teams face the challenge of choosing the right tools. We tried various knowledge base tools, but feedback from our engineers indicated they still had many limitations. After extensive evaluation and searching, we ultimately found Outline to be an excellent knowledge base solution for team collaboration, effectively boosting work efficiency and information management.

---

## What is Outline?

[**Outline**](https://www.getoutline.com/) is a clean and powerful knowledge base management tool with an interface and user experience similar to Notion. It supports Markdown editing, full-text search, and various third-party login methods, making it ideal for companies or teams building a shared knowledge base. Outline is open-source, feature-complete, and designed for teams, significantly improving knowledge management and collaboration efficiency.

---

## Setup Guide (Docker Compose Example)

Below is an example configuration for quickly setting up Outline using Docker Compose:

```yaml
version: '3'

services:
  outline:
    image: outlinewiki/outline:latest
    ports:
      - "27777:3000"
    environment:
      - DATABASE_URL=postgres://postgres:postgres@postgres:5432/outline
      - REDIS_URL=redis://redis:6379
      - SECRET_KEY=你的隨機字串
      - UTILS_SECRET=你的隨機字串
      - URL=http://localhost:27777
      - NODE_ENV=production
      - FORCE_HTTPS=false
      - PORT=3000
      - AWS_ACCESS_KEY_ID=minio
      - AWS_SECRET_ACCESS_KEY=minio123
      - AWS_REGION=us-east-1
      - AWS_S3_UPLOAD_BUCKET_URL=http://localhost:9000
      - AWS_S3_UPLOAD_BUCKET_NAME=uploads
      - AWS_S3_FORCE_PATH_STYLE=true
      - AWS_S3_ACL=private
      - AWS_S3_UPLOAD_MAX_SIZE=26214400
      - PGSSLMODE=disable
      - OIDC_CLIENT_ID=你的OIDC客戶端ID
      - OIDC_CLIENT_SECRET=你的OIDC客戶端密鑰
      - OIDC_AUTH_URI=https://github.com/login/oauth/authorize
      - OIDC_TOKEN_URI=https://github.com/login/oauth/access_token
      - OIDC_SCOPES=read:user user:email
      - OIDC_USERINFO_URI=https://api.github.com/user
      - OIDC_USERNAME_CLAIM=name
      - OIDC_DISPLAY_NAME=GitHub
    depends_on:
      - postgres
      - redis
      - minio

  postgres:
    image: postgres:13
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=outline
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:6
    volumes:
      - redis_data:/data

  minio:
    image: minio/minio
    ports:
      - "9000:9000"
      - "9001:9001"
    environment:
      - MINIO_ROOT_USER=minio
      - MINIO_ROOT_PASSWORD=minio123
    volumes:
      - minio_data:/data
    command: server /data --console-address ":9001"

volumes:
  postgres_data:
  redis_data:
  minio_data:
```

Command to start the services:

```bash
docker-compose up -d
```

P.S. If you can't upload, create a bucket named "uploads".

```
http://localhost:9001/
```

---

## 🚪 Login Methods

Outline does not support username/password login, only various third-party account logins. Here are the main options and things to note:

*   **Google Login**
    Requires a Google Workspace (business) account; personal Gmail accounts are not supported.

*   **GitHub Login**
    Supports personal GitHub accounts: [GitHub Application Authorization Settings](https://github.com/settings/applications/3037670)

*   **Microsoft Login**
    Supports Azure AD (business) accounts and personal Microsoft accounts.
    [Reference](https://medium.com/chouhsiang/%E9%96%8B%E7%99%BC%E4%BB%8B%E6%8E%A5azure-ad-1-sso-86d90cdba13)

---

## Fixing the Issue of MinIO Images Not Displaying Correctly
### 3. If article images fail to upload, log in to the MinIO Web UI and manually create a bucket named "uploads"
### 4. Profile pictures not displaying
```
# 1. 進入 Minio 容器
docker exec -it outline-wiki-minio-1 sh

# 2. 設定 mc 別名
mc alias set myminio http://localhost:9000 account password


# 3. 設定 uploads bucket 為匿名可讀
mc anonymous set download myminio/uploads

# 4. 檢查設定是否成功
mc anonymous get myminio/uploads

# 5. 離開容器
exit
```

## 💾 Data Backup Essentials

Outline data consists of two main parts:

1.  **PostgreSQL database**: Stores page content, user information, and version history
2.  **MinIO storage**: Stores all images and files uploaded by users, acting as a local Amazon S3 equivalent.

---

## Access
```
http://localhost:27777/
```
![Editing interface](https://blog.markkulab.net/content/markku/posts/outline-wiki-knowledge-base-system/images/screenshot.png)

## Minor Bug
After logging out, you need to close the browser tab to be able to log in again.

## ✅ Backup

### Step 1: Back up the PostgreSQL Database

```bash
docker exec -t $(docker ps -qf name=postgres) pg_dump -U postgres outline > outline_backup.sql
```

> **Note:**
>
> *   The exported file will be in SQL format and saved in the current directory.
> *   If your container name is not `postgres`, use `docker ps` to find it and replace accordingly.

---

### Step 2: Back up MinIO Data

```bash
docker run --rm -v minio_data:/volume -v $(pwd):/backup alpine tar czf /backup/minio_backup.tar.gz -C /volume .
```

> **Note:**
>
> *   This will compress all files in the MinIO volume into `.tar.gz`.
> *   `minio_data` is the name of the MinIO volume. Adjust it according to your actual setup.

---

## ♻️ Restore Process

### Restore the PostgreSQL Database

```bash
cat outline_backup.sql | docker exec -i $(docker ps -qf name=postgres) psql -U postgres -d outline
```

### Restore MinIO Data

```bash
docker run --rm -v minio_data:/volume -v $(pwd):/backup alpine sh -c "cd /volume && tar xzf /backup/minio_backup.tar.gz"
```

---

## About this article and its author

Originally published on [Mark Ku's Tech Notes](https://blog.markkulab.net/en/post/outline-wiki-knowledge-base-system)

License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) — when reusing or quoting, credit the author and link back to the original

### About the author

**[Mark Ku](https://blog.markkulab.net/en/author/mark-ku)** — Software Solution Provider

- 10+ years senior software engineer, now an AI Builder
- Focused on large-platform architecture — North-American e-commerce, AI SaaS subscription billing
- Combining AI Agents and automation to build evolvable product foundations

### Free tools built by the author

All of these are free to use:

- [Free PDF Sign Tool](https://blog.markkulab.net/en/tools/pdf-sign): Online PDF sign tool — draw, type, or upload a signature, then drag, resize, and download. Everything runs in your browser; nothing is uploaded.
- [VS Code Refactory](https://blog.markkulab.net/en/tools/refactory): Refactory is a VS Code refactoring extension: 34 actions plus a 37-rule code-smell inspection layer with a Code Health dashboard, across 18 languages, backed by 534 tests. It learns your repo's conventions: where interfaces live, where DI is registered, whether 'use client' belongs. It ranks files by git churn × complexity so you know what to fix first, and hands any smell to the Claude Code already on your machine. Free to use, and your source never leaves your computer.
- [DB-Kit Database Manager](https://blog.markkulab.net/en/tools/db-kit): DB-Kit is a lightweight, cross-platform database manager built with Tauri + Rust + React. Manage MySQL, MariaDB, PostgreSQL, SQL Server, Oracle, SQLite, MongoDB, Redis, Kafka, Elasticsearch and RabbitMQ from one consistent interface: passwords encrypted in the OS keychain, SSH tunnels, full CRUD, a visual query builder, stacked multi-statement result sets, cross-connection data transfer and compare/sync, Excel / CSV import & export, visualized execution plans, ER diagrams, scheduled backups, SQL stress testing with p50–p99 latency percentiles, a 15-rule SQL review engine, Kafka message browsing with monitoring & alerts, a bilingual UI (Traditional Chinese / English), a built-in AI assistant (natural-language SQL, AI review and tuning advice) and the dbk CLI. Free and open source (MIT), with installers for Windows, macOS and Linux.
- [VS Code Super Mermaid](https://blog.markkulab.net/en/tools/super-mermaid): Super Mermaid is a VS Code extension for beautiful Mermaid diagrams out of the box: auto-colored live preview, mouse pan & zoom, high-res PNG / SVG export, 21 templates and multiple themes. Free and open source (MIT).
- [React Super Mermaid](https://blog.markkulab.net/en/tools/react-super-mermaid): react-super-mermaid is an open-source React component library: render beautiful Mermaid diagrams with a single <MermaidViewer>, with built-in colorful / sketch themes, pan & zoom, in-diagram search, and high-res SVG / PNG export. Lightweight, SSR-safe, fully typed. Free and open source (MIT).
- [Jira / Confluence Super Mermaid](https://blog.markkulab.net/en/tools/jira-super-mermaid): An Atlassian Forge app: write Mermaid syntax directly inside a Jira issue or a Confluence page and get flowcharts, sequence diagrams, state machines and Gantt charts. 11 diagram types, SVG / PNG export, light and dark themes, full CJK support. Runs on Atlassian: your diagrams live in your own site and the app calls no third-party service. Free, coming soon to the Atlassian Marketplace.
- [Mermaid Live Preview](https://blog.markkulab.net/en/tools/mermaid-preview): Write Mermaid in your browser, see it render instantly, and share the whole diagram as a single link. No sign-up, nothing uploaded to a server, and mermaid.live share links work as-is.
- [React Intl Phone Number](https://blog.markkulab.net/en/tools/react-intl-phone-number): react-intl-phone-number is an open-source React component: framework-agnostic and antd-free, with E.164 in/out, a searchable flag / country-code dropdown, configurable validation levels (strict / mobile-strict / loose), themeable CSS, and i18n — phone logic powered by google-libphonenumber. Lightweight and fully typed. Free and open source (MIT).
- [Uptime Kuma Cluster](https://blog.markkulab.net/en/tools/uptime-kuma-cluster): Turn single-node Uptime Kuma into a highly available cluster: OpenResty + Lua smart load balancing, shared MariaDB state, health checks and automatic failover, plus cluster-management REST APIs. One Docker Compose command to start. Free and open source (MIT).
- [Special Education](https://blog.markkulab.net/en/education): Learning materials crafted for special education students

### Daily podcasts

- [Mark's Tech Insights — Daily AI News](https://blog.markkulab.net/en/category/tech-news): Daily curated AI and tech trends. Catch the latest developments via audio summaries — covering AI applications, software architecture, DevOps, and engineering practice. — RSS: https://blog.markkulab.net/feed.xml
- [AI股市蝦聊](https://blog.markkulab.net/en/category/ai-stock-chat): Every trading day, an AI-analyzed take on the Taiwan stock market, delivered as a two-host conversation covering the session and the next-day outlook. — RSS: https://blog.markkulab.net/ai-stock-chat/feed.xml
- [開源好物週報](https://blog.markkulab.net/en/category/open-source-weekly): A weekly two-host pick of free open-source tools surfaced from real Hacker News, GitHub, and Reddit buzz — what pain they solve and the fastest way to get started. — RSS: https://blog.markkulab.net/open-source-weekly/feed.xml

### Newsletter

[Subscribe to the newsletter](https://blog.markkulab.net/en/subscribe) — Be the first to know about new posts. No spam, unsubscribe anytime.
