Tài liệu › Agent

Cài trên Windows

Cài agent làm Windows Service bằng một lệnh PowerShell; token chỉ hiện một lần.

Bước 1 — Đăng ký agent

Hạ tầng → Agent → Đăng ký agent, đặt tên (ví dụ web-01), bấm tạo. Hộp thoại hiện token (chỉ hiện một lần) và lệnh cài sẵn địa chỉ máy chủ.

Bước 2 — Chạy lệnh cài (PowerShell, Run as Administrator)

Invoke-WebRequest https://console.mettacert.com/downloads/certman-agent-windows-amd64.exe -OutFile certman-agent.exe
$env:CERTMAN_AGENT_TOKEN = Read-Host 'Agent token (dán token ở trên)'
.\certman-agent.exe service install -server https://console.mettacert.com -allow-dirs "C:\certs" -allow-hosts "*.congty.local"
  • service install cài Windows Service certman-agent, tự chạy khi khởi động máy, chạy bằng LocalSystem.
  • Tham số -allow-dirs, -allow-hosts, -allow-cmds, -allow-aws-accounts đặt giới hạn trên máy: xem Quyền trên máy chạy agent. Thiếu tham số thì sau này sửa trong C:\ProgramData\certman-agent\agent.json.
  • Kiểm tra chữ ký: trang tải về hiện SHA-256 của file; bản phát hành còn kèm chữ ký .sig kiểm bằng ssh-keygen -Y verify với khóa công khai của Metta.

Bước 3 — Kiểm tra

Trong khoảng 1 phút, trang của agent trên dashboard hiện phiên bản, hệ điều hành, lần báo cáo gần nhất. Không thấy: xem log C:\ProgramData\certman-agent\agent.log hoặc Get-Service certman-agent.

Gỡ

.\certman-agent.exe service uninstall

Rồi Thu hồi agent trên dashboard để token vô hiệu.

Lưu ý Dịch vụ chạy bằng LocalSystem đọc file credentials AWS tại C:\Windows\System32\config\systemprofile\.aws\credentials nếu bạn dùng cách này cho kho AWS ACM.
Cập nhật 10/10/2026Bài này có hữu ích?