Enable the local API
On a host or in Docker, set these variables, then restart Uplink. For the Helm chart, see With the Helm chart.-p 8443:8443.
The advertised URL must be reachable from the browsers of your users, for example a host name on your VPN. It does not need to be reachable from the internet. Use a certificate that these browsers trust for that host name.
A trusted HTTPS proxy can end TLS in place of Uplink. Then set
UPLINK_LOCAL_API_ADVERTISE_URL to the URL of the proxy.
With the Helm chart
The chart setsUPLINK_LOCAL_API_ADDR=0.0.0.0:9090 and UPLINK_LOCAL_API_ALLOW_EXTERNAL=true, because its probes use the local API. You cannot change these values or turn off the local API. The Service uplink exposes the local API on port 9090.
The local API serves plain HTTP until you set TLS. It issues access tokens and returns session content, so set TLS and keep port 9090 on a private network.
To let the dashboard show content:
-
Store the certificate and its key in a Secret:
-
Add these settings to a values file, for example
local-api-values.yaml. Set the TLS variables inconfig, not inextraEnv: the chart picks the HTTPS probes fromconfig. -
Upgrade the release with all the values of your installation and the new file. See Install the new release.
-
Route the advertised host name to port 9090 of the Service
uplink. The Service type isClusterIPby default, and the chart has no Ingress, so create this route yourself. The Service also exposes port 4318, so keep any change ofservice.typeon a private network.
networkPolicy.enabled, add your proxy or load balancer to networkPolicy.localApiFrom, or the dashboard cannot reach the local API.
config.UPLINK_LOCAL_API_TLS_SELF_SIGNED also serves HTTPS. On the bind address of the chart, its certificate covers only localhost and the loopback addresses, so a browser does not accept it for your host name.
Test the connection
- Open your instance in the Uplink section of the dashboard sidebar.
- Under Instance Settings, confirm that Instance API URL shows your advertised URL.
- Select Test Connection. The dashboard shows “Uplink instance connection verified.”
How access is authorized
- The dashboard asks Agent Golf for a short-lived credential for one session on the uplink instance. Agent Golf checks that the user is in the workspace and can show the content of that session. See Sign-in and token lifetimes.
- The browser exchanges the credential for a local access token at the local API.
- The local API returns only the content of the session that the credential names.
Trust in the dashboard
Agent Golf cannot decrypt session content by itself. The keys and the encrypted content stay on the uplink instance, and Agent Golf stores only references. The browser of a user is the only path that reveals the content. The local API accepts each credential that Agent Golf signs, and Agent Golf serves the dashboard code that shows the content. Thus a user who opens session content in the dashboard trusts Agent Golf with that content, as with any web app that shows your data. If you do not accept this trust, remove the path. The dashboard then shows session totals and timelines, but no content.- Binary or container image: leave
UPLINK_LOCAL_API_ADDR(-local-api-addr) unset, the default. The local API then does not run. - Helm chart: the local API always runs, because the probes use it, but browsers reach it only when you expose it. Keep the Service
uplinkat typeClusterIP, add no route to port 9090, and leaveconfig.UPLINK_LOCAL_API_ADVERTISE_URLempty, the default. To also limit the peers that reach port 9090 in the cluster, setnetworkPolicy.enabledand keepnetworkPolicy.localApiFromempty. An empty list admits no peer, and the kubelet probes continue. The policy also needs a non-emptynetworkPolicy.otlpFrom.