幽灵

专业出版平台,助力创建、分享并发展内容型业务。

访问幽灵管理员

URL: https://<server-ip>/ghost

完成初始设置:创建管理员用户并配置站点。

通过 Docker Compose 管理 Ghost

cd /root/ghost
docker compose ps        # 查看运行中的容器
docker compose up -d     # 启动 Ghost
docker compose down      # 停止 Ghost
docker compose restart   # 重启 Ghost

凭证与配置

存储在 /root/ghost/.env 和 /root/ghost/docker-compose.yml 中。

电子邮件设置

取消注释 mail 在...部分 /root/ghost/docker-compose.yml.

重启容器:

cd /root/ghost;docker compose restart

确保授予SMTP访问权限。

使用Gmail应用密码的示例:

邮件传输协议: SMTP
邮件选项主机: smtp.gmail.com
邮件选项端口: 465
邮件选项安全模式: true
邮件选项认证用户: [email protected]
邮件选项认证密码: your-app-password

域名与SSL

将您的域名指向服务器IP地址。

更新 /root/ghost/docker-compose.yml URL 指向域名(网址:https://your-domain)。

重启容器:

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.

# 示例
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

 

申请详情