Ghost 管理画面にアクセス
URL: https://<server-ip>/ghost
初期セットアップを完了する: 管理者ユーザーの作成とサイトの設定。
Docker Compose で Ghost を管理
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
認証情報と設定
/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.
# Example 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