Ir al contenido

Agent Configuration

Esta página aún no está disponible en tu idioma.

The installed agent reads its settings from one YAML file. woho-client install writes it, and the systemd unit’s ExecStart is just -config /etc/woho/woho-client.yaml — so the connection key never appears in systemctl cat, systemctl show or /proc/<pid>/cmdline.

flag typed on the command line > config file > built-in default

A flag’s default never overrides the file. There is no built-in server: -server, or server: in the file, is required.


Running asDefault pathIf missing
root (the installed service)/etc/woho/woho-client.yamlRuns on flags and defaults
another user~/.config/woho/woho-client.yamlSame
anyone, with -config <path>the given pathError
# WoHo server tunnel endpoint. Required.
server: 'woho.example.com:9000'
# Name shown in the panel. Empty means the hostname.
name: 'web-prod-01'
# Connection key. A credential — keep this file root-only.
auth_key: 'XXXX-XXXX-XXXX'
# SPKI pins, for a server certificate the system root store does not trust.
spki_pins: []
# Disable TLS. Only for a server with tunnel_insecure.
insecure: false
# Confine file operations from the panel to this directory. Empty: unconfined.
files_root: ''
# Tell the machine's logged-in users when an admin connects or leaves.
notify_console: false
FieldFlagRules
server-serverhost:port, port 1–65535. Use the hostname the server’s certificate covers; by IP you usually need a pin
name-nameFree text. Empty means the hostname
auth_key-keyA key from Connection keys
spki_pins-pinEach sha256//<base64> or bare base64 of a SHA-256. Empty means the system root store
insecure-insecuretrue disables TLS; the agent warns on every connection. Cannot be combined with pins
files_root-files-rootAbsolute path. In the Files tab ~ becomes this root; nothing outside it is reachable, symlinks resolved. Terminals are not confined
notify_consolefile onlytrue writes a line to every logged-in user via wall when an admin connects or leaves — WoHo: support engineer alice connected, with - this session is recorded when the server records terminals. Linux only; a missing wall is logged and changes nothing else

The file is read once at startup and validated strictly. YAML that does not parse, an unknown field (reported with the known ones), a wrong type, server without a valid port, a pin that is not a SHA-256, insecure: true with pins, or a relative files_root stops the agent with an error naming the field.

auth_key is a credential: whoever reads it can register as this machine. The installer creates /etc/woho with mode 0700, writes the file 0600 owned by root, atomically, and never prints the key. If you write the file yourself, keep it 0600; the agent warns when a file with a key is readable by others.

Terminal window
vi /etc/woho/woho-client.yaml
systemctl restart woho-client

Or rerun install with just the flag — it keeps every other setting:

To changeRun
Serverwoho-client install -server support.example.com:9000
Namewoho-client install -name web-prod-01
Keywoho-client install -key XXXX-XXXX-XXXX
TLS pinwoho-client install -pin sha256//…
Drop the pinwoho-client install -pin ""
Plaintext (test only)woho-client install -insecure -pin ""
Back to TLSwoho-client install -insecure=false
File rootwoho-client install -files-root /srv/exchange
Unconfinewoho-client install -files-root ""

Then restart. install does not restart a running service.


FlagDefaultDescription
-configthe default path when it existsYAML config file. A path given explicitly must exist
-servernone — requiredhost:port
-namehostnameName in the panel
-keyfrom the fileConnection key. With a config file, -key applies to that run and is not saved
-pinfrom the fileSPKI pin(s), comma-separated
-insecurefalseConnect without TLS
-files-rootunconfinedConfine panel-driven file operations to this directory
-vVerbose logging: stream, terminal, file and reconnect detail
-versionPrint version and exit

There is no automatic fallback to plaintext. If the server cannot be verified, the agent refuses to connect and retries the same way.

Terminal window
# Run by hand with a trusted certificate
woho-client -server woho.example.com:9000 -key XXXX-XXXX-XXXX
# Pinned
woho-client -server 10.0.0.5:9000 -key XXXX-XXXX-XXXX -pin sha256//zCpPIQlFlembt2NvzEfpM3FKvYno8QhKwxQPe74gR6k=
# On the installed service's settings, verbose
woho-client -config /etc/woho/woho-client.yaml -v

CommandDoes
installCopy the binary to /usr/local/bin/woho-client, write the config file, create and enable the systemd unit, create /var/lib/woho. Rerunning changes only the flags you pass
uninstallStop the service; remove the unit, the binary, the config file and legacy auth_key / spki_pin files. Keeps /etc/woho/client_id
start, stop, statusThe service

The unit it writes:

[Unit]
Description=WoHo Remote Support Client
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/woho-client -config '/etc/woho/woho-client.yaml'
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=woho-client
WorkingDirectory=/var/lib/woho
TasksMax=512
[Install]
WantedBy=multi-user.target

Do not add flags to ExecStart: a flag there overrides the file and makes it misleading.

An install from before the config file existed keeps working after a binary upgrade. Running install once migrates it: the old unit’s flags and the auth_key / spki_pin files are imported into the YAML file, the unit is rewritten to -config, and only then are the old files removed.

Terminal window
journalctl -u woho-client -f

Normal logs cover connection state, admin connections and file operations; -v adds stream, terminal and reconnect detail. Transport is named on every connection: TLS 1.3, system root store, TLS 1.3, pinned (1 pin(s)), or PLAINTEXT (insecure).

Log lineCauseFix
certificate signed by unknown authorityNot publicly trusted, no pinA trusted certificate, or -pin
does not match any configured SPKI pinWrong pin, or the server’s key changedCompare with the server’s startup log
certificate is valid for X, not Y-server names a host the certificate does not coverUse the covered hostname, or a pin
read server handshake: EOF after an INSECURE MODE warning-insecure against a TLS serverRemove -insecure
AUTH_REQUIRED / AUTH_FAILEDKey missing, revoked, or bound to another machineConnection keys
The service restarts every 10 sA refused registration — usually a revoked keySame

Reconnect backoff: 1, 2, 5, 10, 30 s, then 60 s, reset after a successful connection. Heartbeats every 30 s; the server drops a connection silent for 120 s. Stats are reported every 10 s.

The client ID is stable across reconnects; the server session is not. When the tunnel drops, running terminals end, and the panel offers Reconnect once the machine is back. Why a session ended is on the machine’s timeline: agent closed, read timeout, replaced by a new connection, key revoked, closed by admin, server shutdown.

Each agent generates a UUID on first run and keeps it in client_id in its config directory: /etc/woho/ as root, ~/.config/woho/ as another user, %AppData%\woho\ on Windows. The server tracks the machine by it, and the connection key is bound to it. uninstall keeps the file, so a reinstall is the same machine. After an OS reinstall the UUID is new: Reset the machine’s key in the panel.