Skip to main content

Installation

Install and configure the Foxglove Agent.

Prerequisites

  • Debian-based Linux distribution (ARM64 and AMD64 architectures supported)
  • HTTPS connectivity to api.foxglove.dev (stable connection not required)
  • The filesystem hosting your recordings storage directory must support fsnotify
  • Directory for storing local state files
  • For self-managed customers, connectivity to your primary site's inbox bucket

Create a device and device token

Create a device from the Devices page, or select one that you've already created.

An admin for your Foxglove organization can then go to that device's details page, navigate to the "Device Tokens" tab, and generate a secret token. This token will be displayed only once, and is required for agent configuration.

An admin can also create a device token via the Foxglove API. On the API key settings page, create an API key with the appropriate deviceToken capabilities (list, create, etc), and use it to create device tokens via the device tokens API endpoint.

Download and upgrade the Foxglove Agent package

Download the latest foxglove-agent package for your architecture from the releases page. Install with dpkg:

$ dpkg -i foxglove-agent_1.0.0_amd64.deb

To upgrade the package, check the releases page for newer release versions to download.

Configure and run the Foxglove Agent

Configure the FOXGLOVE_DEVICE_TOKEN setting in /etc/foxglove/agent/envfile with the secret device token generated above. Set additional configuration options, such as your recording directory, according to instructions in that file.

Upload to Foxglove-hosted site

By default, your Organization will be configured with a Foxglove-hosted primary site. No additional configuration is required in this case.

Upload to self-managed primary site

If your Foxglove organization uses a self-managed primary site, your device will need credentials to upload recordings, depending on the cloud service hosting your primary site inbox bucket.

GCS

First, install a credentials.json file into the device filesystem that authorizes the agent to write into your inbox bucket. The foxglove user must have permissions to read this file.

Then, configure the following keys in /etc/foxglove/agent/envfile:

PRIMARY_SITE_MODE=self-managed
INBOX_STORAGE_PROVIDER=google_cloud
# Must be set to a valid bucket name, excluding any `gs://` scheme
INBOX_BUCKET_NAME=...
# Set this to the absolute path of the credentials.json file
GOOGLE_APPLICATION_CREDENTIALS=...
Azure

Configure the following keys in /etc/foxglove/agent/envfile:

PRIMARY_SITE_MODE=self-managed
INBOX_STORAGE_PROVIDER=azure
# Must be set to a valid bucket name
INBOX_BUCKET_NAME=...
# Set these according to your Azure deployment
AZURE_TENANT_ID=...
AZURE_CLIENT_ID=...
AZURE_CLIENT_SECRET=...
AZURE_INBOX_STORAGE_SERVICE_URL=...
AZURE_INBOX_STORAGE_ACCOUNT_NAME=...
AWS

Configure the following keys in /etc/foxglove/agent/envfile:

PRIMARY_SITE_MODE=self-managed
INBOX_STORAGE_PROVIDER=aws
# Must be set to a valid bucket name
INBOX_BUCKET_NAME=...
# Set these according to your AWS deployment
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_DEFAULT_REGION=...
S3-compatible

If your primary site inbox bucket uses a S3-compatible service like MinIO, configure the following keys in /etc/foxglove/agent/envfile:

PRIMARY_SITE_MODE=self-managed
INBOX_STORAGE_PROVIDER=s3_compatible
# Set these according to your S3-compatible service deployment
S3_COMPATIBLE_ACCESS_KEY_ID=...
S3_COMPATIBLE_SECRET_ACCESS_KEY=...
S3_COMPATIBLE_SERVICE_REGION=...
S3_COMPATIBLE_SERVICE_URL=...

Run the agent

Then, restart the service and check its status with systemctl:

$ sudo systemctl restart foxglove-agent
$ systemctl status foxglove-agent

You may want to enable the service to ensure it is started on boot:

$ sudo systemctl enable foxglove-agent

Consult the logs with journalctl for debugging:

$ journalctl -u foxglove-agent