Skip to content

Documentation

SSH vs Direct mTLS

Choose between zero-setup SSH auto-bootstrap (--stdio) and persistent mTLS daemon mode (:9443).

SSH Auto-Bootstrap (--stdio)

Best for personal VPS instances, homelabs, and teams already managing access with SSH keys and ~/.ssh/config.

  • No open extra ports: Uses your existing SSH port and ProxyJump bastions.
  • No lingering process: hako-agent --stdio exits as soon as you disconnect.
  • Host trust: Verifies remote host keys against known_hosts with Trust-On-First-Use (TOFU) and blocks mismatched keys.

Direct mTLS Daemon (:9443)

Best for servers where SSH is restricted or when you want explicit RBAC roles (viewer, operator, admin).

Server setup

  1. Download the standalone Linux agent binary from GitHub Releases:

    sudo curl -fsSL https://github.com/Panharoth06/hako/releases/latest/download/hako-agent-linux-amd64 -o /usr/local/bin/hako-agent
    sudo chmod +x /usr/local/bin/hako-agent

    (Use hako-agent-linux-arm64 for ARM64 hosts.)

  2. Install and enable the systemd unit (MemoryMax=50M, GOMEMLIMIT=36MiB, GOGC=50):

    sudo curl -fsSL https://raw.githubusercontent.com/Panharoth06/hako/main/agent/deployments/hako-agent.service -o /etc/systemd/system/hako-agent.service
    sudo systemctl daemon-reload
    sudo systemctl enable --now hako-agent
  3. Mint a one-time enrollment token on the server:

    sudo hako-agent enroll --role operator
  4. In Hako, open Servers → Add Server → Direct mTLS, and paste the host, port (9443), enrollment token, and server SHA-256 fingerprint.

Your desktop generates its own ECDSA P-256 client certificate, stores the private key in your OS Keychain, and pins the server certificate fingerprint.