Skip to content
Docs

Install AgentWatch Connect on Linux

AgentWatch Connect brings AI traffic from a Linux machine under AgentWatch governance: it redirects known AI services to a local service, inspects the request, stamps the employee’s identity and forwards it to your AgentWatch gateway. This page is the Linux walkthrough, from download to a verified machine in Agent Fleet. For how enrollment works across all platforms, see Endpoint Enrollment; for Windows, see Install Connect on Windows.

Requirement Detail
Distribution Ubuntu / Debian (.deb), and RHEL / CentOS / Rocky / Alma / Fedora (.bin or the one-line installer)
Architecture x86_64 (amd64) or aarch64 (arm64)
Init system systemd. Without it (containers, minimal images) Connect can run in the foreground — see Troubleshooting
Privileges sudo rights, once, for the install
Your AgentWatch address The https:// address you open the console with, for example https://agentwatch.acme.com — the bare origin, with no path
An employee in AgentWatch The person the machine belongs to must exist in Employee Management (by hand, CSV, SCIM or SSO Auto create users)
Tray icon (desktops, optional) GNOME, KDE or XFCE with AppIndicator support. The .deb recommends python3-gi, gir1.2-gtk-3.0, gir1.2-ayatanaappindicator3-0.1 and libnss3-tools (the last puts the certificate into Chrome and Firefox)
Server version AgentWatch 2.0.360 or later for the one-line installer
Installer File Use it for
Debian package agentwatch-connect_<version>_amd64.deb, …_arm64.deb Ubuntu and Debian desktops and servers; managed rollouts with an MDM
Self-extracting installer AgentWatch-Connect-<version>-linux-x64.bin, …-linux-aarch64.bin Any distribution, including the RHEL family; asks its questions in a terminal
One-line installer https://<your-agentwatch-host>/agent/install.sh Servers and VMs set up from a shell or a provisioning script; installs, configures and enrolls in one step

All three install the same Connect: a machine-wide systemd service named agentwatch-connect, the Connect certificate in the system trust store, and the agentwatch-connect command.

Who Where
An employee The enrollment portal — Install Connect offers the right file. The link is in Agent Fleet → Agent Connect Settings
IT Agent Fleet → Deploy with an MDM → Linux → Installer, or directly from your server

The server lists the current files:

Terminal window
SERVER="https://agentwatch.acme.com"
curl -fsS "$SERVER/agent/version"
# {"latestVersion":"1.0.186", "installers":{"linux-x64-deb":"/agent/bundle/agentwatch-connect_1.0.186_amd64.deb", ...}}
  1. Download and install the package.

    Terminal window
    SERVER="https://agentwatch.acme.com"
    V="1.0.186" # from $SERVER/agent/version
    ARCH=$(dpkg --print-architecture) # amd64 or arm64
    curl -fsSL -o /tmp/agentwatch-connect.deb "$SERVER/agent/bundle/agentwatch-connect_${V}_${ARCH}.deb"
    sudo apt install -y /tmp/agentwatch-connect.deb

    You can also double-click the .deb and install it with Ubuntu Software. The package never asks a question during install, so it always starts as a personal computer unless your MDM has already placed /etc/agentwatch/connect.json (see Which settings can I configure?).

  2. Find the icon. The AgentWatch A icon appears in the top bar.

  3. Connect it to your organization — see How do I connect the machine to my organization?.

How do I install it with the .bin installer?

Section titled “How do I install it with the .bin installer?”

Use this on RHEL-family desktops, or wherever you prefer one file for any distribution:

Terminal window
chmod +x AgentWatch-Connect-1.0.186-linux-x64.bin
sudo ./AgentWatch-Connect-1.0.186-linux-x64.bin

When run from a terminal it asks Who uses this computer? before installing anything:

  • 1) Personal computer — one person; they connect it afterwards from the tray icon or the portal.
  • 2) Organization-managed or shared computer — it then asks for the server URL and the enrollment token (the token is not echoed; only its length is printed), and optionally the email domain and corporate proxy.

Press Ctrl-C at any question to stop without installing anything.

How do I install it on a server or VM (one line)?

Section titled “How do I install it on a server or VM (one line)?”

The one-line installer downloads the matching binary from your AgentWatch server, installs the service, writes the credentials and switches interception on. It is idempotent: running it again upgrades in place. Run it as a normal user with sudo rights (not in a root shell), so the service runs as that user:

Terminal window
export AGENTWATCH_SERVER_URL="https://agentwatch.acme.com"
export AGENTWATCH_EMAIL="john.doe@acme.com" # the employee this machine belongs to
export AGENTWATCH_API_KEY="ak_…" # that employee's gateway key
curl -fsSL "$AGENTWATCH_SERVER_URL/agent/install.sh" | sudo -E sh

Keep the -E: it passes the three variables through sudo. If your sudo policy does not allow it, pass them to sudo directly:

Terminal window
curl -fsSL "$AGENTWATCH_SERVER_URL/agent/install.sh" | \
sudo AGENTWATCH_SERVER_URL="$AGENTWATCH_SERVER_URL" AGENTWATCH_EMAIL="$AGENTWATCH_EMAIL" \
AGENTWATCH_API_KEY="$AGENTWATCH_API_KEY" sh

The installer ends with Installed. On a slow link, allow longer before a stalled download is retried: export AGENTWATCH_DOWNLOAD_STALL_SECONDS=120 AGENTWATCH_DOWNLOAD_ATTEMPTS=8 before the one-liner.

How do I connect the machine to my organization?

Section titled “How do I connect the machine to my organization?”

After a .deb or .bin personal install, Connect needs to know which server and which employee. Use whichever fits; all of them leave Connect holding that employee’s own gateway key.

Section titled “Option A — Finish setup from the enrollment portal (recommended)”

Needs Connect 1.0.152 or later.

  1. Open the portal link and sign in (SSO, or the emailed six-digit code).
  2. Click Finish setup. The browser asks to open AgentWatch Connect — allow it.
  3. Connect asks Connect this computer to agentwatch.acme.com? Click Connect. It switches interception on and shows Connected as john.doe@acme.com.

If clicking Finish setup does nothing, copy the setup link the portal shows, open AgentWatch Connect and choose Finish setup with a code.

Click the A icon → Connect. A setup page opens in the browser: enter the portal address (your AgentWatch address), the employee’s email and their API key (from My Dashboard). No further password prompt is needed — the install already set up the permission to switch interception on and off.

Option C — With the enrollment token, from a terminal

Section titled “Option C — With the enrollment token, from a terminal”
Terminal window
agentwatch-connect enroll --server https://agentwatch.acme.com --token aw-enroll-0b6f… --email john.doe@acme.com

A successful run prints Enrollment successful!. The console shows this command with your server and token filled in under Agent Fleet → Agent Connect Settings → Advanced: scripted / headless install. Write each flag and value as two words, never --flag=value.

On a machine with no desktop, configure writes the server, email and key and switches interception on without a browser:

Terminal window
agentwatch-connect configure --server-url https://agentwatch.acme.com --email john.doe@acme.com --api-key "ak_…"

It also reads AGENTWATCH_SERVER_URL, AGENTWATCH_EMAIL and AGENTWATCH_API_KEY from the environment. Prefer the environment over flags for the key: a command line is visible to other users in the process list and stays in shell history.

An MDM or IT script configures Connect through one file:

/etc/agentwatch/connect.json

It must be owned by root and not group- or world-writable (mode 0644 or 0600); otherwise Connect ignores it, because anyone able to edit it could redirect intercepted traffic. Place it before installing the .deb, and the package sets Connect up for the whole machine with no questions.

{
"ServerURL": "https://agentwatch.acme.com",
"EnrollmentToken": "aw-enroll-0b6f…",
"EmailDomain": "acme.com"
}
Key Example Purpose
ServerURL https://agentwatch.acme.com Required. Your AgentWatch address
EnrollmentToken aw-enroll-0b6f… Required (or apiKey). Identifies your organization; the machine exchanges it for the employee’s own key
Email john.doe@acme.com The employee, when the machine belongs to one known person
EmailDomain acme.com Fallback identity <login name>@acme.com
apiKey ak_… One employee’s gateway key instead of a token
UpstreamProxy http://proxy.acme.com:8080 or direct Corporate proxy Connect uses to reach AI sites
PerUserIdentity "1" Attribute each Linux user separately (shared workstations)

The ready-made file is Agent Fleet → Deploy with an MDM → Linux → Settings (connect.json). To place it by hand:

Terminal window
sudo install -d -m 0755 /etc/agentwatch
sudo install -o root -g root -m 0644 connect.json /etc/agentwatch/connect.json
sudo systemctl restart agentwatch-connect # only if Connect is already installed

Shared or organization-managed machines. To switch an installed personal machine to one where each Linux user signs in as themselves, run sudo agentwatch-connect computer-type and choose 2. From a script, pass the token on standard input rather than the command line:

Terminal window
printf '%s' "$TOKEN" | sudo agentwatch-connect computer-type --shared \
--server https://agentwatch.acme.com --email-domain acme.com --token-file /dev/stdin

sudo agentwatch-connect computer-type --personal --user <name> switches back. The details, including what status prints for each type, are in Organization-Managed and Shared Computers → How do I set up a Linux computer?.

How do I use Connect behind a corporate proxy?

Section titled “How do I use Connect behind a corporate proxy?”

Connect looks for an upstream proxy in this order: UpstreamProxy in connect.json, then HTTPS_PROXY in the service environment. PAC files are not evaluated. If the proxy inspects TLS, Connect 1.0.147 and later trust the system’s certificate store automatically; otherwise exempt your AgentWatch address from inspection.

Terminal window
systemctl is-active agentwatch-connect # active
agentwatch-connect status # server, email, computer type, interception state
getent hosts api.openai.com # 127.0.0.1 — routed through Connect
agentwatch-connect diagnose # full self-check

Within about 30 seconds the machine appears under Agent Fleet with Proxy running, CA trusted and Hosts active. Send a request from the machine (a browser chat, or the OpenAI SDK) and it shows up in Usage Insights under the employee.

What Path
Service agentwatch-connect (systemd, starts at boot)
Managed settings /etc/agentwatch/connect.json
Machine configuration /var/lib/agentwatch-connect/
Personal configuration ~/.agentwatch-connect/
Logs the system journal — Connect writes no log file of its own
Terminal window
sudo journalctl -u agentwatch-connect -n 200 --no-pager # recent lines
sudo journalctl -u agentwatch-connect -f # follow live
sudo journalctl -u agentwatch-connect --since "1 hour ago" > agentwatch-connect.log # export for support

Install the newer .deb or .bin over the existing one, or re-run the one-liner; configuration is kept. Connect can also update itself, following Agent Fleet → Fleet controls → Connect updates: on Linux it swaps in the new binary and rolls back automatically if the new version cannot reach the server within 90 seconds. agentwatch-connect update checks immediately.

Installed with Remove Remove including personal settings
.deb sudo apt remove agentwatch-connect sudo apt purge agentwatch-connect
.bin or one-liner sudo agentwatch-connect uninstall sudo agentwatch-connect uninstall --purge

This removes the service, the hosts-file redirection, the certificate from the system and browser stores, and the helpers, restoring direct access. An MDM-placed /etc/agentwatch/connect.json is kept (remove it in the MDM); --purge and apt purge delete it only if computer-type wrote it. Check:

Terminal window
grep -i "AgentWatch Connect" /etc/hosts # nothing
systemctl status agentwatch-connect # could not be found
Symptom Cause Fix
AGENTWATCH_SERVER_URL, AGENTWATCH_EMAIL and AGENTWATCH_API_KEY must all be set sudo without -E dropped the variables Keep sudo -E, or pass them to sudo directly
Error: Node.js is required, or Exec format error The server is older than 2.0.360 and serves a legacy installer Upgrade the AgentWatch server and re-run
download failed: HTTP 404 No Connect binary for this architecture on the server Ask your AgentWatch administrator
the download is not a Linux binary AGENTWATCH_SERVER_URL points at a login page or proxy Use the console’s https:// address
No systemd on this machine A container or minimal image Run it in the foreground: sudo agentwatch-connect run
No tray icon after installing the .deb The desktop lacks AppIndicator support, or the recommended packages were skipped sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-ayatanaappindicator3-0.1; on GNOME enable the AppIndicator extension. Connect itself runs without the icon
Browser shows a certificate warning The certificate is not in that user’s browser store sudo apt install libnss3-tools, then sign out and back in
connect.json seems ignored Not owned by root, or group/world-writable sudo chown root:root /etc/agentwatch/connect.json && sudo chmod 0644 /etc/agentwatch/connect.json
computer-type changes the whole computer: run with sudo. Run without root Add sudo
chatgpt.com / claude.ai answer 502 with AgentWatch local impersonate unavailable The network allows traffic only through a proxy Set UpstreamProxy in connect.json
unable to get local issuer certificate, machine never appears in Agent Fleet A TLS-inspecting gateway re-signs the connection Use Connect 1.0.147+, or exempt your AgentWatch address from inspection