Skip to content

Configure an obs-agent Forward Proxy

This guide explains how to route self-hosted obs-agent traffic to Beak, LLM and AI Hub services, remote MCP servers, and Agent release services through an HTTP forward proxy.

Prepare Proxy Information

Prepare the proxy URL and bypass list:

export HTTP_PROXY='http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>'
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY='localhost,127.0.0.1,::1,<INTERNAL-DOMAIN>'

The current version supports unauthenticated HTTP proxies, Basic Auth in URL user information, uppercase and lowercase forms of HTTP_PROXY, HTTPS_PROXY, and NO_PROXY, and enterprise CAs selected with SSL_CERT_FILE or SSL_CERT_DIR.

The proxy endpoint must use http://. For HTTPS and WSS targets, the Agent establishes an HTTP CONNECT tunnel and then validates the target TLS certificate. If uppercase and lowercase forms of the same variable are both set, their values must match. The installer fills in the other case and always retains localhost,127.0.0.1,::1 in NO_PROXY.

Protect proxy credentials

Proxy URLs may contain usernames and passwords. Do not include complete URLs in tickets, public logs, chats, or screenshots. /etc/obs-agent/config.toml contains sensitive configuration and should remain readable only by administrators and the obs-agent group.

Use a Proxy During Linux Installation

Export the proxy variables, then run the installation command from the Beak installation page. When you use sudo, preserve these variables explicitly:

export HTTP_PROXY='http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>'
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY='localhost,127.0.0.1,::1,<INTERNAL-DOMAIN>'

curl -fsSL https://static.truewatch.com/obs-agent/install.sh \
  -o /tmp/obs-agent-install.sh

sudo --preserve-env=HTTP_PROXY,http_proxy,HTTPS_PROXY,https_proxy,NO_PROXY,no_proxy,SSL_CERT_FILE,SSL_CERT_DIR \
  bash /tmp/obs-agent-install.sh <INSTALL-OPTIONS-FROM-BEAK>

The first curl command runs in the current shell and uses the exported proxy variables. The installer writes the normalized settings to:

/etc/obs-agent/config.toml

After installation, synchronize the compatibility file, restart, and check the service:

sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo systemctl restart obs-agent
systemctl status obs-agent
journalctl -u obs-agent -n 100

These log messages indicate that the Agent loaded the proxy configuration and connected to Beak:

obs-agent forward proxy configured
obs-agent websocket connected

Startup logs hide the username and password in proxy URLs.

Add a Proxy to an Existing Linux Installation

Back up the configuration:

sudo cp /etc/obs-agent/config.toml /etc/obs-agent/config.toml.bak

Edit /etc/obs-agent/config.toml and set the proxy group:

[proxy]
http = "http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>"
https = "http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>"
no_proxy = ["localhost", "127.0.0.1", "::1", "<INTERNAL-DOMAIN>"]

Check file ownership and permissions, export the compatibility file, and restart:

sudo chown root:obs-agent /etc/obs-agent/config.toml
sudo chmod 0640 /etc/obs-agent/config.toml
sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo systemctl restart obs-agent

To restore the previous configuration:

sudo cp /etc/obs-agent/config.toml.bak /etc/obs-agent/config.toml
sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo systemctl restart obs-agent

Keep Automatic Updates on the Proxy

The Linux update service and older updaters still read the generated /etc/obs-agent/agent.env. After editing TOML, run the export command above to synchronize this file. Do not edit the generated file directly. The same proxy is used to fetch latest-version.json, download install.sh, release archives and checksums, report upgrade status to Beak, and update Owl CLI.

systemctl status obs-agent-update-check.timer
systemctl list-timers obs-agent-update-check.timer
journalctl -u obs-agent-update-check.service -n 100

sudo systemctl start obs-agent-update-check.service
journalctl -u obs-agent-update-check.service -n 100

sudo /usr/local/bin/obs-agent-updater

If the proxy is unavailable or authentication fails, the update fails while the installed version remains unchanged; it does not silently fall back to direct internet access.

Use a Proxy with Docker

Store proxy variables in a protected env file:

cat > obs-agent-proxy.env <<'EOF'
HTTP_PROXY=http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>
http_proxy=http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>
HTTPS_PROXY=http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>
https_proxy=http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>
NO_PROXY=localhost,127.0.0.1,::1,<INTERNAL-DOMAIN>
no_proxy=localhost,127.0.0.1,::1,<INTERNAL-DOMAIN>
EOF
chmod 0600 obs-agent-proxy.env
docker run -d \
  --name obs-agent \
  --restart unless-stopped \
  --env-file ./obs-agent.env \
  --env-file ./obs-agent-proxy.env \
  -v obs-agent-work:/app \
  -v obs-agent-profile-cache:/var/lib/obs-agent/profile-cache \
  "${OBS_AGENT_IMAGE}"

The entrypoint validates proxy variables before requesting Beak configuration. Check with docker logs obs-agent 2>&1 | tail -n 100.

Use a Proxy with Kubernetes or Helm

Store proxy URLs with credentials in a Kubernetes Secret alongside the Agent credentials:

kubectl -n obs-agent create secret generic obs-agent-secret \
  --from-literal=AGENT_ID='<AGENT-ID>' \
  --from-literal=AGENT_API_KEY='<AGENT-API-KEY>' \
  --from-literal=HTTP_PROXY='http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>' \
  --from-literal=HTTPS_PROXY='http://<PROXY-USER>:<PROXY-PASSWORD>@<PROXY-HOST>:<PROXY-PORT>'

Reference the Secret and set NO_PROXY separately in the Deployment. For Helm, ensure secret.keys includes HTTP_PROXY and HTTPS_PROXY, then upgrade:

helm upgrade obs-agent obs-agent/obs-agent \
  --namespace obs-agent \
  --reuse-values \
  --set 'secret.keys={AGENT_API_KEY,AGENT_ID,HTTP_PROXY,HTTPS_PROXY}'

After changing the Secret or values, wait for the Pod to be recreated and inspect kubectl -n obs-agent logs deploy/obs-agent --tail=100.

Configure an Enterprise CA

An HTTP CONNECT tunnel that does not replace the target certificate normally needs no additional CA. If the proxy inspects TLS and signs certificates with an enterprise CA, install that CA in the system trust store or set:

export SSL_CERT_FILE='/etc/ssl/certs/<CORPORATE-CA-FILE>'

The Linux installer writes explicitly configured SSL_CERT_FILE or SSL_CERT_DIR values to config.toml and generates agent.env for older updaters. In containers, mount the CA file read-only and use its container path:

docker run -d \
  --name obs-agent \
  --env-file ./obs-agent.env \
  --env-file ./obs-agent-proxy.env \
  -e SSL_CERT_FILE=/etc/ssl/certs/corporate-ca.pem \
  -v /etc/obs-agent/corporate-ca.pem:/etc/ssl/certs/corporate-ca.pem:ro \
  "${OBS_AGENT_IMAGE}"

Do not disable TLS verification to bypass certificate errors.

Confirm Which Requests Use the Proxy

The proxy applies to Beak config API and WebSocket traffic, LLM and AI Hub requests, remote MCP HTTP traffic, release metadata and downloads, installer and updater requests, and Owl update requests. Local filesystem and process tools do not use the proxy. Targets matched by NO_PROXY connect directly.

Troubleshoot Proxy Connections

Agent Reports Conflicting Proxy Variables

Export TOML to the compatibility file, then check that uppercase and lowercase variables have the same values. Edit [proxy] in config.toml to change settings. Do not edit the generated agent.env:

sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo grep -E '^(HTTP_PROXY|http_proxy|HTTPS_PROXY|https_proxy|NO_PROXY|no_proxy)=' \
  /etc/obs-agent/agent.env

After correcting TOML, export it and restart:

sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo systemctl restart obs-agent

Proxy Returns 407 Proxy Authentication Required

Verify the username, password, and proxy authorization policy. URL-encode special characters in credentials. Do not print the complete proxy URL while troubleshooting.

HTTPS Requests Report Certificate Errors

Confirm that the enterprise CA file exists and the Agent can read it. Export the configuration and check the CA settings:

sudo test -r /etc/ssl/certs/<CORPORATE-CA-FILE>
sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo grep -E '^(SSL_CERT_FILE|SSL_CERT_DIR)=' /etc/obs-agent/agent.env

After correcting the CA, restart the Agent and the automatic update check:

sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo systemctl restart obs-agent
sudo systemctl start obs-agent-update-check.service

Internal Addresses Incorrectly Use the Proxy

Add internal domains, IPs, or CIDRs to both NO_PROXY and no_proxy. Do not use NO_PROXY=* as a permanent configuration because it bypasses the proxy for every target.

Agent Connects but Automatic Updates Fail

Check the configuration and logs used by the update service:

sudo systemctl cat obs-agent-update-check.service
sudo journalctl -u obs-agent-update-check.service -n 100
sudo obs-agent --config-tool agent-export --input /etc/obs-agent/config.toml --output /etc/obs-agent/agent.env
sudo grep '^AGENT_UPDATE_BASE_URL=' /etc/obs-agent/agent.env

Confirm that the domain in AGENT_UPDATE_BASE_URL is not incorrectly listed in NO_PROXY. The proxy must allow downloads of latest-version.json, install.sh, Agent archives, and checksums.