ติดตั้งบน production

ติดตั้ง Portal แบบ TLS-only บน Ubuntu ที่รองรับจาก release archive ที่ตรวจสอบแล้ว

ตรวจให้พร้อมก่อนติดตั้ง

  • ใช้ Ubuntu Server 24.04 หรือ 25.04 amd64 ตามเส้นทางที่รองรับ
  • สร้าง A หรือ AAAA record สำหรับ Portal FQDN และตรวจจาก target host ด้วย getent ahosts portal.example.com
  • เปิด inbound TCP 80 และ 443 เพราะ Certbot HTTP-01 ต้องใช้ port 80
  • ตรวจว่า port 3100 ว่าง Portal bind เฉพาะ loopback ส่วน Nginx เป็น public listener

หากใช้ CDN proxy ให้เปลี่ยนเป็น DNS-only และปิด forced HTTPS ชั่วคราวในช่วงออก certificate แรก แล้วเปิด proxy กลับเมื่อ origin ใช้ Full (strict) TLS ได้

ตรวจและแตก release

REPO=raptercode/dashboard-portal-control
TAG=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | grep -m1 '"tag_name"' | cut -d '"' -f4)
VERSION=${TAG#v}
curl -fsSLO "https://github.com/${REPO}/releases/download/${TAG}/dashboard-portal-${VERSION}.tar.gz"
curl -fsSLO "https://github.com/${REPO}/releases/download/${TAG}/dashboard-portal-${VERSION}.tar.gz.sha256"
sha256sum --check "dashboard-portal-${VERSION}.tar.gz.sha256"
mkdir "dashboard-portal-${VERSION}"
tar -C "dashboard-portal-${VERSION}" --extract --gzip --file "dashboard-portal-${VERSION}.tar.gz"
cd "dashboard-portal-${VERSION}"

รัน installer

sudo ./dashboard-portal.sh --domain=portal.example.com --email=admin@example.com

installer จะถามรหัส owner เฉพาะครั้งแรก ติดตั้ง Nginx, Certbot, Git, curl, CA certificates และ xz-utils; ตรวจและ pin Node.js 24.18.0 กับ Bun 1.3.13; สร้าง service account dashboardportal และ helper; ขอ TLS, บังคับ HTTPS/HSTS และตรวจ https://portal.example.com/api/health

ตรวจรับการติดตั้ง

sudo systemctl is-active dashboard-portal hostmgr-deploy-helper nginx
curl -fsS http://127.0.0.1:3100/api/health
curl -fsSI https://portal.example.com/

ห้ามเปิด port 3100 สู่สาธารณะ configuration เป็น root:dashboardportal mode 0640 และระบบเก็บ pre-change snapshot ตามเวลาใน /var/backups/dashboard-portal

ตรวจทานล่าสุด: 2026-08-25
ดู source ของ Portal