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 | shsudo usermod -aG docker $USER mkdir -p /opt/outline && cd /opt/outlinemkdir -p data redis3. Tạo docker-compose.yml
# /opt/outline/docker-compose.ymlservices: 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/.envNODE_ENV=productionURL=https://wiki.yourdomain.comSECRET_KEY=$(openssl rand -hex 32)UTILS_SECRET=$(openssl rand -hex 32)PORT=3000FORCE_HTTPS=true # DatabaseDATABASE_URL=postgres://outline:strong_db_password@postgres:5432/outlineDATABASE_CONNECTION_POOL_MIN=DATABASE_CONNECTION_POOL_MAX=PGSSLMODE=disable # RedisREDIS_URL=redis://redis:6379 # File storage (S3 compatible)AWS_ACCESS_KEY_ID=your-r2-keyAWS_SECRET_ACCESS_KEY=your-r2-secretAWS_REGION=autoAWS_S3_UPLOAD_BUCKET_URL=https://your-account.r2.cloudflarestorage.comAWS_S3_UPLOAD_BUCKET_NAME=outline-filesAWS_S3_FORCE_PATH_STYLE=trueAWS_S3_ACL=private # Authentication - Google OAuth (lấy từ Google Cloud Console)GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=xxxGOOGLE_ALLOWED_DOMAINS=yourcompany.com # Email SMTPSMTP_HOST=smtp.resend.comSMTP_PORT=587SMTP_USERNAME=resendSMTP_PASSWORD=re_xxx[email protected][email protected] # LanguageDEFAULT_LANGUAGE=vi_VN5. Start services và migrate DB
docker compose pulldocker compose up -d # Chạy migrationdocker compose exec outline yarn db:migrate --env=production-ssl-disabled # Logsdocker 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/Caddyfilewiki.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/bashset -ecd /opt/outlineTS=$(date +%Y%m%d-%H%M) # Dump Postgresdocker compose exec -T postgres pg_dump -U outline outline | gzip > /tmp/outline-db-$TS.sql.gz # Tar data foldertar -czf /tmp/outline-data-$TS.tar.gz data # Upload S3rclone copy /tmp/outline-*-$TS.* r2:my-bucket/outline-backup/ # Cleanup localrm /tmp/outline-*-$TS.* chmod +x /usr/local/bin/outline-backup.sh # Cron daily 3amecho '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 |
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. 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.
