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 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:
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:
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
-
Microsoft Login Supports Azure AD (business) accounts and personal Microsoft accounts. Reference
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:
- PostgreSQL database: Stores page content, user information, and version history
- MinIO storage: Stores all images and files uploaded by users, acting as a local Amazon S3 equivalent.
Access
http://localhost:27777/

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
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, usedocker psto find it and replace accordingly.
Step 2: Back up MinIO Data
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_datais the name of the MinIO volume. Adjust it according to your actual setup.
♻️ Restore Process
Restore the PostgreSQL Database
cat outline_backup.sql | docker exec -i $(docker ps -qf name=postgres) psql -U postgres -d outline
Restore MinIO Data
docker run --rm -v minio_data:/volume -v $(pwd):/backup alpine sh -c "cd /volume && tar xzf /backup/minio_backup.tar.gz"




























Comments