Skip to content

การติดตั้งและเริ่มต้นเร็ว

Microbase ทำงานเป็น Single-binary Go server พร้อม Admin UI (Svelte 5) ฝังไว้ที่ /_/ และใช้ PostgreSQL (pgvector) เป็นฐานข้อมูลหลัก

วิธีที่ 1: ดาวน์โหลด Prebuilt Binary

Section titled “วิธีที่ 1: ดาวน์โหลด Prebuilt Binary”

ดาวน์โหลดไฟล์สำหรับ OS/CPU ของคุณจาก GitHub Releases:

Terminal window
# ตัวอย่างสำหรับ Linux amd64
curl -L -o microbase.zip https://github.com/techasit5415/microbase/releases/latest/download/microbase_0.12.18_linux_amd64.zip
unzip microbase.zip
chmod +x microbase

วิธีที่ 2: รันผ่าน Docker

Section titled “วิธีที่ 2: รันผ่าน Docker”
Terminal window
docker pull ghcr.io/techasit5415/microbase:latest

วิธีที่ 3: Build จาก Source Code

Section titled “วิธีที่ 3: Build จาก Source Code”

ต้องมี Go 1.24+ และ Node.js 24+:

Terminal window
git clone https://github.com/techasit5415/microbase.git
cd microbase
cd ui && npm ci && npm run build && cd ..
CGO_ENABLED=0 go build -trimpath -o microbase ./cmd/server

การรันครั้งแรกและสร้าง Superuser

Section titled “การรันครั้งแรกและสร้าง Superuser”
Terminal window
./microbase
  1. หากรันครั้งแรกโดยยังไม่มี microbase.conf ระบบจะสร้างไฟล์ (สิทธิ์ 0600) พร้อมสุ่ม JWT_SECRET และ ENCRYPTION_KEY ให้อัตโนมัติ
  2. หากยังไม่มีบัญชีใน _superusers ระบบจะพิมพ์ Setup OTP 8 หลัก (อายุ 5 นาที) ในกรอบเด่นบน terminal
  3. เปิด http://localhost:3000/_/ กรอกอีเมล, รหัสผ่าน (อย่างน้อย 8 ตัว), และ Setup OTP
  4. หรือสร้าง Superuser ผ่าน CLI:
Terminal window
./microbase superuser upsert admin@example.com "StrongPassword123!"