Quản trị viên Access 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à cấu hình trang web.
Quản lý Ghost thông qua Docker Compose
cd /root/ghost docker compose ps # Xem các container đang chạy docker compose up -d # Khởi động Ghost docker compose down # Dừng Ghost docker compose restart # Khởi động lại Ghost
Thông tin đăng nhập & Cấu hình
Được lưu trữ trong /root/ghost/.env và /root/ghost/docker-compose.yml.
Thiết lập email
Bỏ bình luận mail phần trong /root/ghost/docker-compose.yml.
Khởi động lại các container:
cd /root/ghost; docker compose restart
Hãy đả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
Hãy trỏ tên miền của bạn đến địa chỉ IP của máy chủ.
Cập nhật /root/ghost/docker-compose.yml URL đến 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 thế đường dẫn SSL trong /etc/nginx/sites-enabled/ghost.
# Ví dụ: ssl_certificate /etc/letsencrypt/live/your-domain/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-domain/privkey.pem;
Khởi động lại Nginx:
nginx -t && systemctl reload nginx