- Outline (getoutline.com) là wiki open source thay Notion cho team self-host.
- Markdown editor, realtime collab, SSO Google/GitHub/Slack/Microsoft.
- Cài Docker Compose 10 phút, dùng Postgres + Redis backend.
- UI clean, mobile PWA tốt, search Elasticsearch full-text.
- VPS 4GB chạy thoải mái team 20-50 user, chi phí 399k/tháng thay 5tr Notion.
Notion 10 USD/user/tháng cho team 10 người là 100 USD/tháng = 2.5 triệu/tháng. Scale 30 người là 7.5 triệu/tháng. Self-host Outline trên Cloud VPS 4GB chỉ 399k/tháng, không giới hạn user, data lưu trong VN. Đây là deal hấp dẫn cho startup VN scale team.
Outline khác Notion ở triết lý: focused vào team wiki/documentation, không cố làm everything (database, project management). Editor Markdown realtime, SSO doanh nghiệp, permission group, search Elasticsearch. Quality tương đương Notion 90% feature wiki core.
Bài này hướng dẫn deploy Outline trên Cloud VPS TND 4GB Ubuntu 24.04, setup SSO Google, migrate từ Notion, mobile PWA cho team field.
1. Yêu cầu hệ thống
- VPS 4GB RAM, 2 vCPU (Postgres + Redis + Outline + Elasticsearch).
- Ubuntu 22/24 hoặc Debian 12.
- Domain đã trỏ DNS về VPS IP.
- S3-compatible bucket (R2, MinIO) cho file upload.
- SMTP server gửi mail invite (Resend, Postmark, Mailgun).
2. Cài Docker và chuẩn bị
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
mkdir -p /opt/outline && cd /opt/outline
mkdir -p data redis3. Tạo docker-compose.yml
# /opt/outline/docker-compose.yml
services:
outline:
image: outlinewiki/outline:latest
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
depends_on:
- postgres
- redis
env_file: .env
volumes:
- ./data:/var/lib/outline/data
postgres:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_USER: outline
POSTGRES_PASSWORD: strong_db_password
POSTGRES_DB: outline
volumes:
- ./postgres:/var/lib/postgresql/data
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- ./redis:/data4. Tạo file .env config
# /opt/outline/.env
NODE_ENV=production
URL=https://wiki.yourdomain.com
SECRET_KEY=$(openssl rand -hex 32)
UTILS_SECRET=$(openssl rand -hex 32)
PORT=3000
FORCE_HTTPS=true
# Database
DATABASE_URL=postgres://outline:strong_db_password@postgres:5432/outline
DATABASE_CONNECTION_POOL_MIN=
DATABASE_CONNECTION_POOL_MAX=
PGSSLMODE=disable
# Redis
REDIS_URL=redis://redis:6379
# File storage (S3 compatible)
AWS_ACCESS_KEY_ID=your-r2-key
AWS_SECRET_ACCESS_KEY=your-r2-secret
AWS_REGION=auto
AWS_S3_UPLOAD_BUCKET_URL=https://your-account.r2.cloudflarestorage.com
AWS_S3_UPLOAD_BUCKET_NAME=outline-files
AWS_S3_FORCE_PATH_STYLE=true
AWS_S3_ACL=private
# Authentication - Google OAuth (lấy từ Google Cloud Console)
GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=xxx
GOOGLE_ALLOWED_DOMAINS=yourcompany.com
# Email SMTP
SMTP_HOST=smtp.resend.com
SMTP_PORT=587
SMTP_USERNAME=resend
SMTP_PASSWORD=re_xxx
[email protected]
[email protected]
# Language
DEFAULT_LANGUAGE=vi_VN5. Start services và migrate DB
docker compose pull
docker compose up -d
# Chạy migration
docker compose exec outline yarn db:migrate --env=production-ssl-disabled
# Logs
docker compose logs -f outline | head -50Khi log báo "Listening on http://0.0.0.0:3000" là server sẵn sàng.
6. Caddy reverse proxy
# /etc/caddy/Caddyfile
wiki.yourdomain.com {
reverse_proxy 127.0.0.1:3000
encode gzip
request_body {
max_size 100MB
}
}
sudo systemctl reload caddyTruy cập https://wiki.yourdomain.com - Outline welcome screen. Click "Sign in with Google" để vào lần đầu với account quản trị.
7. Setup Google OAuth
- Vào Google Cloud Console -> APIs -> Credentials.
- Create OAuth Client ID, type Web application.
- Authorized redirect URI: https://wiki.yourdomain.com/auth/google.callback.
- Copy Client ID + Secret vào .env, restart Outline container.
- GOOGLE_ALLOWED_DOMAINS giới hạn user trong domain công ty.
8. Tạo collection và document đầu tiên
Sau khi login, tạo collection (như Notion workspace section):
- Sidebar -> New collection -> "Engineering", icon, color.
- Inside collection -> New document -> Markdown editor mở.
- Slash command / để insert: heading, list, table, embed, code block.
- Mention @user, link [[document name]] auto-complete.
- Realtime collab giống Notion: nhiều người edit cùng lúc, cursor riêng.
9. Import từ Notion
# Trong Notion: Settings -> Workspace -> Export Content -> Markdown & CSV
# Download file .zip
# Trong Outline: Settings -> Import & Export -> Import from Notion
# Upload .zip, chờ 1-5 phút tùy size
# Outline parse markdown, tạo lại structure collection/documentMột số element không convert được: toggle, embed Notion native, database. Phần text/list/heading/image OK 95%.
10. Permission và sharing
- Collection permission: set view/edit cho group hoặc user cụ thể.
- Document share: tạo public link cho khách xem, expire sau N ngày.
- Group: Engineering, Marketing, Sales - assign collection theo team.
- Guest user: mời external collaborator (không cần email domain).
11. Mobile PWA
Mở https://wiki.yourdomain.com trên Safari iOS / Chrome Android, Add to Home Screen. PWA chạy như app native, offline cache document đã xem. Edit khá tốt nhưng UI nhỏ, phù hợp đọc hơn write.
12. Backup tự động
# /usr/local/bin/outline-backup.sh
#!/bin/bash
set -e
cd /opt/outline
TS=$(date +%Y%m%d-%H%M)
# Dump Postgres
docker compose exec -T postgres pg_dump -U outline outline | gzip > /tmp/outline-db-$TS.sql.gz
# Tar data folder
tar -czf /tmp/outline-data-$TS.tar.gz data
# Upload S3
rclone copy /tmp/outline-*-$TS.* r2:my-bucket/outline-backup/
# Cleanup local
rm /tmp/outline-*-$TS.*
chmod +x /usr/local/bin/outline-backup.sh
# Cron daily 3am
echo '0 3 * * * /usr/local/bin/outline-backup.sh' >> /etc/crontab13. Tích hợp Slack notification
Settings -> Integrations -> Slack. Authorize Outline app trong Slack workspace. Khi có document mới hoặc edit, Slack channel nhận notification realtime. Team không miss update.
14. So sánh chi phí 12 tháng
| Team size | Notion (12 tháng) | Outline self-host | Tiết kiệm |
|---|---|---|---|
| 5 user | ~15 triệu | ~5 triệu (VPS 4GB) | 10 triệu |
| 15 user | ~45 triệu | ~5 triệu | 40 triệu |
| 30 user | ~90 triệu | ~10 triệu (VPS 8GB) | 80 triệu |
Wiki team không giới hạn user chỉ 399k/tháng VPS
Cloud VPS TND sẵn AlmaLinux 9, Ubuntu 22/24, Debian 12/13. SSD CEPH, snapshot 1-click, backup hằng ngày, network 200Mbps trong nước. Outline + Postgres + Redis chạy thoải mái trên VPS 4GB cho team 30-50 user.
Xem 8 cấu hình Cloud VPS →FAQ
Outline có realtime collab như Google Docs không?
Có. Multi-cursor, see typing realtime, comment thread. Đủ tốt cho team edit cùng document. Latency phụ thuộc network, trong VN dùng VPS VN thì <100ms.
Có thể migrate Outline -> Notion sau này nếu muốn không?
Có. Outline export tất cả collection sang Markdown zip. Notion import Markdown OK 90% feature. Mất 1 chút format phức tạp nhưng text/structure giữ nguyên.
RAM tối thiểu cho Outline là bao nhiêu?
2GB chạy được cho team <10 user, không có Elasticsearch (dùng PG full-text). 4GB+ recommended cho team lớn, có Elasticsearch search nhanh hơn.
Có hỗ trợ tiếng Việt không?
Có. UI dịch tiếng Việt, search Vietnamese diacritic OK. Set DEFAULT_LANGUAGE=vi_VN trong .env. Editor hỗ trợ Unicode đầy đủ.
SSO OAuth có bắt buộc không?
Outline yêu cầu ít nhất 1 OAuth provider (Google, GitHub, Slack, Microsoft, OIDC). Không support email/password native vì security. Có thể tự host Keycloak làm OIDC nếu không muốn dùng SSO bên ngoài.
So với BookStack, Wiki.js thì Outline hơn ở điểm gì?
Outline có UI hiện đại hơn, realtime collab tốt nhất. BookStack đơn giản và nhẹ hơn. Wiki.js linh hoạt nhất nhưng phức tạp setup. Outline cân bằng giữa UX và performance.
- OpenClaw Voice Mode: nói chuyện với agent qua iPhone/Android (setup + wake word)
- gemini --yolo
- PingPong Payments: Giải Pháp Ngân Hàng - Thanh Toán Quốc Tế Cross-border e-commerce
- SQLite + Litestream backup VPS: stack đơn giản nhất cho dev solo
- Chrome DevTools MCP cho Claude, Codex, Gemini - AI agent thật sự control browser, debug như senior dev
- Antidetect browser cho Etsy: Multilogin vs GoLogin vs Dolphin



