ウェブアクセス
- ブラウザから Poznote にアクセス:
https://<SERVER-IP> - SSL の警告を承認する(自己署名証明書)。
- Poznote の認証情報は以下に安全に保存されています:
/root/poznote/.env
重要なパス
- インストールディレクトリ:
/root/poznote - 永続データ
/root/poznote/data - 環境ファイル
/root/poznote/.env - docker-compose ファイル:
/root/poznote/docker-compose.yml - Nginxコンフィグ:
/etc/nginx/sites-available/poznote - SSL証明書:
/etc/nginx/ssl/
サービスの管理
Docker:
cd /root/poznote
docker compose ps
docker compose logs -f
docker compose restart
Nginx:
systemctl status nginx
systemctl restart nginx
ドメインを使った SSL の有効化
1. ドメインをサーバーのIPアドレスに向けてください。
2. Nginx の設定ファイルを開き、以下の両方を置き換えてください server_name <IP>; ドメイン(<your-domain>) は HTTP (ポート 80) と HTTPS (ポート 443) の両ブロックに適用されます:
vim /etc/nginx/sites-available/poznote
3. Certbotをインストールします:
apt install -y certbot python3-certbot-nginx
4. 次のコマンドを実行して、有効な Let's Encrypt 証明書を生成します:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Nginx の設定ファイルで SSL のパスを置き換える:
vim /etc/apache2/sites-available/poznote
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. 変更を反映するために、Nginxを再起動します。
systemctl restart nginx
7. ブラウザを開いて、次のURLにアクセスしてください: https://yourdomain.com