เข้าสู่หน้าจัดการ Ghost
URL: https://<server-ip>/ghost
ตั้งค่าเริ่มต้น: สร้างบัญชีผู้ดูแลระบบและกำหนดค่าเว็บไซต์
จัดการ Ghost ผ่าน Docker Compose
cd /root/ghost docker compose ps # View running containers docker compose up -d # Start Ghost docker compose down # Stop Ghost docker compose restart # Restart Ghost
ข้อมูลประจำตัวและการตั้งค่า
เก็บไว้ที่ /root/ghost/.env และ /root/ghost/docker-compose.yml
ตั้งค่าอีเมล
ยกเลิกการแสดงความเห็น mail ส่วนใน /root/ghost/docker-compose.yml.
รีสตาร์ท containers:
cd /root/ghost; docker compose restart
ตรวจสอบให้แน่ใจว่าได้รับสิทธิ์เข้าถึง SMTP แล้ว
ตัวอย่างการใช้งาน Gmail App Password:
mail__transport: SMTP mail__options__host: smtp.gmail.com mail__options__port: 465 mail__options__secure: true mail__options__auth__user: [email protected] mail__options__auth__pass: your-app-password
โดเมน & SSL
ชี้โดเมนของคุณไปยัง IP ของเซิร์ฟเวอร์
อัปเดต /root/ghost/docker-compose.yml อัปเดต URL เป็นโดเมน (url: https://your-domain)
รีสตาร์ท containers:
cd /root/ghost; docker compose restart
สำหรับ Certbot SSL:
apt install -y certbot python3-certbot-nginx certbot certonly --nginx --non-interactive --agree-tos --email <your-email> -d <your-domain>
แทนที่พาธ SSL ใน /etc/nginx/sites-enabled/ghost.
# Example ssl_certificate /etc/letsencrypt/live/your-domain/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-domain/privkey.pem;
รีโหลด Nginx:
nginx -t && systemctl reload nginx