Accessing ToolJet
- Visit:
https://<SERVER-IP>/ - SSL の警告を承認する(自己署名証明書)。
- 初回アクセス時に、ToolJet が最初の管理者アカウントの作成を促します。
主要ファイルとディレクトリ
- ToolJet メインインストールディレクトリ:
/root/tooljet - 環境変数(データベース、シークレット、アプリ設定):
/root/tooljet/.env - Docker Compose 設定:
/root/tooljet/docker-compose.yaml - PostgreSQL の永続データ:
/root/tooljet/postgres_data - Nginx TLS 証明書(自己署名):
/etc/nginx/ssl/ - Nginx サイト設定:
/etc/nginx/sites-available/tooljet
ドメインを使った SSL の有効化
1. ドメインをサーバーのIPアドレスに向けてください。
2. Edit the /root/tooljet/.env ファイルでドメイン名を設定します: TOOLJET_HOST=https://your.domain.com
3. サービスを再作成する:
cd /root/tooljet/
docker compose up -d
4. Nginx の設定ファイルを編集し、両方の server_name <IP>; ドメイン(<your-domain>) は HTTP (ポート 80) と HTTPS (ポート 443) の両ブロックに適用されます:
vim /etc/nginx/sites-available/tooljet
5. Install Certbot:
apt install -y certbot python3-certbot-nginx
6. 以下のコマンドを実行して、有効な Let's Encrypt 証明書を生成します:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. Nginx 設定(TLS セクション)の SSL パスを置き換えます:
vim /etc/nginx/sites-available/tooljet
# 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;
8. Nginx を再起動して変更を反映します:
systemctl restart nginx
9. ブラウザを開き、次のURLにアクセスします: https://yourdomain.com