Web Access
URL: https://<IP>/
HTTP port 80 redirects to HTTPS 443.
Default account:
- Username:
owner - Password:
owner123
Quan trọng: Đổi mật khẩu mặc định ngay trong giao diện web.
Environment Configuration
File: /opt/zy/.env
Để cập nhật biến môi trường, chỉnh sửa .env và khởi động lại dịch vụ:
systemctl restart zy.service
Các file và thư mục quan trọng
- Zy binary:
/opt/zy/zy - Biến môi trường (token API, URL công khai):
/opt/zy/.env - Systemd unit:
/etc/systemd/system/zy.service - Cấu hình site Nginx:
/etc/nginx/sites-available/zy - Nginx site đã được kích hoạt:
/etc/nginx/sites-enabled/zy - Chứng chỉ SSL tự ký:
/etc/nginx/ssl/
Quản lý Systemd Service
# 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
Kích hoạt SSL với tên miền
1. Trỏ tên miền của bạn về địa chỉ IP của máy chủ.
2. Chỉnh sửa cấu hình Nginx và thay thế cả hai server_name <IP>; với tên miền của bạn (<your-domain>) cho cả HTTP (cổng 80) và HTTPS (cổng 443) như sau:
vim /etc/nginx/sites-available/zy
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. Chạy lệnh sau để tạo chứng chỉ Let's Encrypt hợp lệ:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Thay thế đường dẫn SSL trong cấu hình Nginx:
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. Khởi động lại Nginx để áp dụng các thay đổi:
systemctl restart nginx
7. Update PUBLIC_BASE_URL in /opt/zy/env:
PUBLIC_BASE_URL=https://yourdomain.com
8. Khởi động lại Zy để áp dụng các thay đổi:
systemctl restart zy
9. Mở trình duyệt và truy cập: https://yourdomain.com