Connect through a proxy
The edge controller and Foxlet reach Foxglove and your storage with outbound HTTPS connections only: to api.foxglove.dev, and to your Primary Site's storage for uploads. Nothing at Foxglove connects to them. For the hosts each one needs, see the system requirements for Edge Sites and Foxlet.
If your network sends these connections through a forward proxy, set it up as described below. A forward proxy is either explicit, where clients are configured with its address, or transparent, where the network intercepts traffic without any client setting. Either way, the edge controller and Foxlet still connect to Foxglove's and your storage's own host names. Either kind of proxy can also inspect TLS.
Explicit proxy
To send the outbound connections through an HTTP forward proxy, set the standard HTTPS_PROXY environment variable to the proxy's address, such as http://proxy.example.com:3128.
Configure the proxy to allow HTTPS tunnels (CONNECT) on port 443 to the hosts in the system requirements. The proxy receives each host name, so it can allow traffic by host name.
For the edge controller, if the proxy requires a user name and password, include them in the address, such as http://user:password@proxy.example.com:3128. To reach the proxy itself over HTTPS, use an https:// address. The edge controller must then trust the proxy's certificate, as described in Proxies that inspect TLS.
To connect to a host directly, without the proxy, add it to NO_PROXY. Separate hosts with commas, such as NO_PROXY=minio.internal,10.0.0.5. Use this for a self-hosted S3-compatible storage endpoint on your network. If your Docker client is configured with a proxy (proxies in ~/.docker/config.json), Docker sets HTTPS_PROXY and NO_PROXY in the containers it starts.
- Debian package
- Statically linked Linux executable
- Docker image
- Kubernetes
Add the proxy to the service's environment file, then restart the service. For the edge controller, the file is /etc/foxglove/edge-controller/envfile:
HTTPS_PROXY=http://proxy.example.com:3128
sudo systemctl restart foxglove-edge-controller
For Foxlet, add the same line to /etc/foxglove/agent/envfile, then run sudo systemctl restart foxglove-agent.
Set HTTPS_PROXY in the environment that starts the edge controller or Foxlet:
export HTTPS_PROXY=http://proxy.example.com:3128
Add the proxy to the file you pass with --env-file. With Docker Compose, add it to the service's env_file or environment:
HTTPS_PROXY=http://proxy.example.com:3128
The Helm chart installs the edge controller. Add the proxy to edgeController.env in values.yaml:
edgeController:
env:
- name: HTTPS_PROXY
value: http://proxy.example.com:3128
If the proxy needs a login, don't put it in edgeController.env: values there are stored in values.yaml and in the pod spec, where anyone who can read the pod can see them. Put HTTPS_PROXY in a Secret instead, add the Secret's name to globals.secrets, and leave HTTPS_PROXY out of edgeController.env, which would take precedence:
kubectl create secret generic edge-proxy --namespace foxglove \
--from-literal=HTTPS_PROXY=http://user:password@proxy.example.com:3128
Transparent proxy
A transparent proxy intercepts outbound connections without any client setting, so leave HTTPS_PROXY unset. Allow the hosts in the system requirements on the proxy. If the proxy decrypts HTTPS traffic, also follow Proxies that inspect TLS.
Proxies that inspect TLS
A proxy that decrypts and re-encrypts HTTPS traffic, whether explicit or transparent, presents certificates signed by its own certificate authority (CA). Until they trust that CA, the edge controller and Foxlet reject those certificates and log invalid peer certificate: UnknownIssuer.
Certificates are verified with the system CA bundle, or with the file named by SSL_CERT_FILE. SSL_CERT_FILE replaces the system bundle, so that file must include the public CAs as well as your proxy's CA.
- Debian package
- Statically linked Linux executable
- Docker image
- Kubernetes
Add the proxy's CA certificate to the system trust store, then restart the service:
sudo cp proxy-ca.crt /usr/local/share/ca-certificates/proxy-ca.crt
sudo update-ca-certificates
sudo systemctl restart foxglove-edge-controller
For Foxlet, restart foxglove-agent instead.
Add the proxy's CA certificate to the host's system trust store, such as with update-ca-certificates on Debian-based distributions, then restart the edge controller or Foxlet.
Create a CA bundle from your host's CA bundle, such as /etc/ssl/certs/ca-certificates.crt on Debian-based hosts, and your proxy's CA. Mount it into the container, and point SSL_CERT_FILE at it:
cat /etc/ssl/certs/ca-certificates.crt proxy-ca.crt > ca-bundle.pem
docker run ... \
--volume "$PWD/ca-bundle.pem:/etc/foxglove/ca-bundle.pem:ro" \
--env SSL_CERT_FILE=/etc/foxglove/ca-bundle.pem \
...
With Docker Compose, add the bundle and SSL_CERT_FILE to the service in compose.yaml. The service is edge-controller for the edge controller and foxlet for Foxlet:
services:
edge-controller:
volumes:
- ./ca-bundle.pem:/etc/foxglove/ca-bundle.pem:ro
environment:
SSL_CERT_FILE: /etc/foxglove/ca-bundle.pem
Create a CA bundle from your host's CA bundle, such as /etc/ssl/certs/ca-certificates.crt on Debian-based hosts, and your proxy's CA, and create a ConfigMap from it. Add SSL_CERT_FILE to your existing edgeController.env list, and mount the bundle with edgeController.extraVolumes and edgeController.extraVolumeMounts:
cat /etc/ssl/certs/ca-certificates.crt proxy-ca.crt > ca-bundle.pem
kubectl create configmap edge-ca-bundle --from-file=ca-bundle.pem --namespace foxglove
edgeController:
env:
- name: SSL_CERT_FILE
value: /etc/foxglove/ca/ca-bundle.pem
extraVolumes:
- name: ca-bundle
configMap:
name: edge-ca-bundle
extraVolumeMounts:
- name: ca-bundle
mountPath: /etc/foxglove/ca
readOnly: true
Other setups
To send traffic through a reverse proxy instead of a forward proxy, such as a single relay that your organization runs in its own cloud, contact support@foxglove.dev. It works only with some storage setups.