Skip to content

🏗️ สถาปัตยกรรมระบบ

ภาพรวมระดับสูง

ระบบ Nextcloud NAS ถูกออกแบบให้แยกจาก Services อื่นบนเซิร์ฟเวอร์ โดยใช้ Docker Container Isolation

┌─────────────────────────────────────────────────────────────┐
│                    Server 103/101                           │
│                Server (Dedicated)                          │
├─────────────────────────────────────────────────────────────┤
│  Existing Services (ไม่แตะต้อง)                             │
│  - CCAP (port 8900)                                        │
│  - ComfyUI (port 8188)                                     │
│  - Forgejo (port 4224)                                     │
│  - Ollama, MinIO, Signal API                               │
├─────────────────────────────────────────────────────────────┤
│  Nextcloud Stack (แยกอิสระ)                                │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  Cloudflare CDN (proxy + DDoS protection)          │   │
│  │         │                                           │   │
│  │    HTTPS :443 (encrypted)                          │   │
│  │         │                                           │   │
│  │    nginx Reverse Proxy                              │   │
│  │    /etc/nginx/sites-available/cloudcdm              │   │
│  │         │                                           │   │
│  │    Port 9090 → Docker Container                    │   │
│  │         │                                           │   │
│  │  ┌─────────────────────────────────────────────┐   │   │
│  │  │  nextcloud-app (Nextcloud 29 + Apache)     │   │   │
│  │  │  - PHP 8.2                                  │   │   │
│  │  │  - Read-only filesystem via bind mount      │   │   │
│  │  └────────────┬────────────────────────────────┘   │   │
│  │               │                                      │   │
│  │  ┌────────────┴──────────────────────┐             │   │
│  │  │  nextcloud-db (PostgreSQL 16)    │             │   │
│  │  │  nextcloud-redis (Redis 7)       │             │   │
│  │  │  nextcloud-cron (Background)     │             │   │
│  │  └───────────────────────────────────┘             │   │
│  └─────────────────────────────────────────────────────┘   │
│                                                             │
│  Docker Network: nextcloud-net (172.30.0.0/16)             │
│                                                             │
│  Storage: /data/ (5.5 TB) — Bind-mounted read-only         │
└─────────────────────────────────────────────────────────────┘

Docker Containers

ContainerImagePortหน้าที่
nextcloud-appnextcloud:29-apache9090 → 80Nextcloud Web Server
nextcloud-dbpostgres:16-alpineinternalฐานข้อมูล
nextcloud-redisredis:7-alpineinternalCache & Session
nextcloud-cronnextcloud:29-apacheinternalBackground Jobs

การจัดการไฟล์ (File Access)

ServerData View

Admin View

  • Admin (admin user) มี ServerData/ โฟลเดอร์ที่ mount /data/ ทั้งหมด
  • เป็นแบบ Read-Only — ไม่สามารถแก้ไข/ลบไฟล์ต้นฉบับได้
  • เหมาะสำหรับการเรียกดูไฟล์ทั้งหมด

User View (Group Folders)

  • ผู้ใช้ทั่วไปเห็นเฉพาะ Group Folder ที่ได้รับสิทธิ์
  • ใช้ระบบ Group Folders App จัดการ
  • Bind-mount บน Host (/data/Company/XX → __groupfolders/ID/XX)
  • GID-based access control (nas_admin=1008, nas_accounting=1009, ฯลฯ)

Group Folders

Network Flow

User Browser
    │  HTTPS

Cloudflare CDN (104.21.37.153)
    │  HTTP/HTTPS to Origin

nginx (port 80/443)
    │  proxy_pass

nextcloud-app:80 (Docker)
    │  TCP

nextcloud-db:5432
nextcloud-redis:6379

SSL Certificate

รายการค่า
ProviderLet's Encrypt
RenewalAuto-renew via certbot
ExpiryOct 2, 2026
Config/etc/letsencrypt/live/cloudcdm.contentsdigital.us/

Nextcloud NAS Documentation