Web Access
URL: https://<IP>/
HTTP port 80 redirects to HTTPS 443.
Default account:
- Username:
owner - Password:
owner123
重要:Webインターフェース上でデフォルトのパスワードをすぐに変更してください。
Environment Configuration
File: /opt/zy/.env
環境変数を更新するには、編集してください .env サービスを再起動する:
systemctl restart zy.service
主要なファイルとディレクトリ
- Zy binary:
/opt/zy/zy - 環境変数(API トークン、公開 URL):
/opt/zy/.env - Systemd unit:
/etc/systemd/system/zy.service - Nginx サイト設定:
/etc/nginx/sites-available/zy - Nginx サイトが有効化されました:
/etc/nginx/sites-enabled/zy - 自己署名 SSL 証明書:
/etc/nginx/ssl/
systemd サービス管理
# Restart the Zy service
systemctl restart zy.service
# Check Zy status
systemctl status zy.service
# Restart the Nginx service
systemctl restart nginx.service
# Check Nginx status
systemctl status nginx.service
ドメインを使った SSL の有効化
1. ドメインをサーバーのIPアドレスに向けてください。
2. Nginx の設定ファイルを開き、以下の両方を置き換えてください server_name <IP>; ドメイン(<your-domain>) は HTTP (ポート 80) と HTTPS (ポート 443) の両ブロックに適用されます:
vim /etc/nginx/sites-available/zy
3. Install 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/zy
# 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. Update PUBLIC_BASE_URL in /opt/zy/env:
PUBLIC_BASE_URL=https://yourdomain.com
8. 変更を反映させるため、Zy を再起動する:
systemctl restart zy
9. ブラウザを開き、次のURLにアクセスします: https://yourdomain.com