ゴースト管理ツールにアクセスする
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アプリパスワードの使用例:
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).
コンテナを再起動する:
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 nginx を再読み込み