Truy cập
- Mở trình duyệt và truy cập:
https://<SERVER_IP>/_/admin - Chứng chỉ SSL tự ký đang được sử dụng, trình duyệt sẽ hiển thị cảnh báo.
- Đăng nhập bằng thông tin xác thực admin được lưu trên máy chủ:
/root/.cloudzy-creds - Để xem thông tin xác thực, chạy lệnh:
/root/.cloudzy-creds
Các tệp và thư mục quan trọng
- Nhị phân:
/usr/local/bin/trail - Thư mục dữ liệu:
/var/lib/trailbase/traildepot - Tệp dịch vụ:
/etc/systemd/system/trailbase.service - Cấu hình môi trường:
/etc/default/trail - Cấu hình Nginx:
/etc/nginx/sites-available/trailbase - Trang web đã bật:
/etc/nginx/sites-enabled/trailbase - Chứng chỉ SSL:
/etc/nginx/ssl/fullchain.pem,/etc/nginx/ssl/privkey.pem - Thông tin đăng nhập quản trị
/root/.cloudzy-creds
Hướng dẫn sử dụng Trail CLI
Những lệnh hữu ích:
# Show all available commands
trail help
# Version
trail --version
# Start server (manual run)
trail run --help
trail --data-dir /var/lib/trailbase/traildepot run --address 127.0.0.1:4000
# Create user
trail --data-dir /var/lib/trailbase/traildepot user add <email> <password>
# Delete user
trail --data-dir /var/lib/trailbase/traildepot user delete <email>
# Change password
trail --data-dir /var/lib/trailbase/traildepot user change-password <email> <new-password>
# Change email
trail --data-dir /var/lib/trailbase/traildepot user change-email <old-email> <new-email>
# Admin commands
trail --data-dir /var/lib/trailbase/traildepot admin list
trail --data-dir /var/lib/trailbase/traildepot admin promote <email>
trail --data-dir /var/lib/trailbase/traildepot admin demote <email>
# Export OpenAPI definitions
trail openapi
# Components (WASM)
trail components list
Ghi chú
- Chạy dưới dạng systemd service
- Chạy với người dùng không phải root (
trailbase) - Liên kết nội bộ với
127.0.0.1:4000và được expose qua Nginx HTTPS - Sử dụng SSL tự ký
- Một số lệnh CLI yêu cầu quyền rõ ràng
--data-dir - Bạn có thể dừng instance mặc định và khởi chạy một instance mới nếu cần:
systemctl stop trailbase - Cập nhật Nginx nếu có thay đổi về routing hoặc port