Truy cập trang quản trị Ghost
URL: https://<server-ip>/ghost
Hoàn tất thiết lập ban đầu: tạo tài khoản quản trị và cấu hình site.
Quản lý Ghost qua 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
Thông tin đăng nhập & Cấu hình
Lưu tại /root/ghost/.env và /root/ghost/docker-compose.yml.
Cài đặt Email
Bỏ ghi chú mail phần trong /root/ghost/docker-compose.yml.
Khởi động lại các container:
cd /root/ghost; docker compose restart
Đảm bảo quyền truy cập SMTP đã được cấp.
Ví dụ dùng 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
Tên miền & SSL
Trỏ tên miền về địa chỉ IP của máy chủ.
Cập nhật /root/ghost/docker-compose.yml URL theo tên miền (url: https://your-domain).
Khởi động lại các container:
cd /root/ghost; docker compose restart
Đối với Certbot SSL:
apt install -y certbot python3-certbot-nginx certbot certonly --nginx --non-interactive --agree-tos --email <your-email> -d <your-domain>
Thay đường dẫn SSL trong /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;
Tải lại Nginx:
nginx -t && systemctl reload nginx