# Connect to a remote Runtime Host [简体中文](./runtime-host-remote-access.zh-CN.md) Maka Desktop, TUI, and CLI can connect to a Runtime Host through TLS, SSH, or explicitly enabled plaintext WebSocket. The CLI and TUI also support the experimental direct-peer transport described below. ## Set up a Linux or macOS Host On a machine with Node.js 22.19 or newer, the released CLI can install and verify a persistent Runtime Host in one command. Linux uses a systemd user service; macOS uses a LaunchAgent and requires an active GUI login session for that user. ```sh npx --yes --package maka-agent@latest maka runtime-host setup \ --principal my-desktop \ --preset desktop-client \ --root "$HOME/.maka/runtime-host" \ --project-root "projects=$HOME/Projects" ``` Use a stable identifier for `--principal`; rerunning the command replaces that Client's credential instead of accumulating credentials. The command installs its exact Maka package into a managed directory, starts a loopback-only service, verifies the new credential, and then prints the connection details once. Use `terminal-client` for TUI or CLI. Run `npx --yes --package maka-agent@latest maka runtime-host service uninstall` on the Host to remove the service and managed package. The State Root and Project data are retained. ## Manual Host setup Build Maka on the remote machine, choose a persistent State Root, and register each Project remote Clients may use: ```sh npm run build npm --workspace maka-agent exec -- maka runtime-host project add /srv/projects/example --root /srv/maka npm --workspace maka-agent exec -- maka runtime-host project list --root /srv/maka ``` The Desktop directory picker publishes the service user's home directory by default. Managed services persist that default as an explicit Project root policy. To publish a different allowlist, pass one or more named roots when starting the service: ```sh npm --workspace maka-agent exec -- maka runtime-host serve \ --root /srv/maka \ --project-root projects=/srv/projects \ --project-root data=/mnt/data \ --websocket-port 7443 ``` When any `--project-root