Truy cập quản trị viên Ghost
URL: https://<server-ip>/ghost
Hoàn tất thiết lập ban đầu: tạo người dùng quản trị và định cấu hình trang web.
Quản lý Ghost thông 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 xác thực & cấu hình
Được lưu trữ trong /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 container:
cd /root/ghost; docker compose restart
Đảm bảo quyền truy cập SMTP được cấp.
Ví dụ sử dụng Mật khẩu ứng dụng Gmail:
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 của bạn đến IP máy chủ.
Cập nhật /root/ghost/docker-compose.yml URL tới tên miền (url: https://your-domain).
Khởi động lại container:
cd /root/ghost; docker compose restart
Đối với SSL của Certbot:
apt install -y certbot python3-certbot-nginx certbot certonly --nginx --non-interactive --agree-tos --email <your-email> -d <your-domain>
Thay thế đườ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