Installation
Install and configure the Foxglove Agent.
System requirements
You will need:
- HTTPS access to
api.foxglove.dev
(stable connection not required) - A filesystem supporting
fsnotify
for recordings storage - For self-hosted deployments: network access to your Primary Site's inbox bucket
Create a device and token
- Go to the Devices page to create or select a device
- Have an admin generate a secret token from the device's "Device Tokens" tab
Admins can also create device tokens via API. Generate an API key with deviceToken
capabilities from the API key settings page and use it to create device tokens.
Each Agent installation requires its own unique device and device token. Multi-compute robots sharing a single device aren't supported.
Install the Agent
Foxglove Agent is available for installation in these forms:
- A
.deb
package, for Debian-based Linux distributions - A statically-linked Linux executable
- A Docker image
Debian packages and executables can be downloaded from the releases page for AMD64 and ARM64 architectures. To upgrade the package, check the releases page for newer release versions to download.
Using Docker
A multi-platform Docker image is available at us-central1-docker.pkg.dev/foxglove-images/images/agent
.
The Agent needs a writable directory to store its own persistent state. This must be mounted inside the container at /index
. You can use a Docker Volume to manage this state:
docker volume create foxglove-agent-index-storage
docker run \
--mount type=volume,src=foxglove-agent-index-storage,dst=/index \
--mount type=bind,src=/path/to/recording/storage,dst=/storage \
--env-file your-agent-config.env \
us-central1-docker.pkg.dev/foxglove-images/images/agent:0.0.0 # replace with a valid release version number
From the Debian package
Download the latest foxglove-agent
package for your architecture from the releases page. Install with dpkg
:
# replace with downloaded filename
dpkg -i foxglove-agent_0.0.0_amd64.deb
Configure the Agent
The following instructions explain how to set environment variables for the Agent. Where you set these depends on your installation method:
- When using the the
.deb
package, the Agent's environment is configured in/etc/foxglove/agent/envfile
. - When using the standalone executable, you manage the process environment directly.
- When using the Docker image, you pass environment values into the container using
--env
or--env-file
.
First, configure the FOXGLOVE_DEVICE_TOKEN
environment variable with the secret device token generated above.
Configure storage directory
When using the .deb
package or standalone executable, configure the STORAGE_ROOT
environment variable with the directory you want to monitor for newly recorded data files. This will serve as the Agent's data directory.
When using the Agent Docker image, bind-mount your data directory to /storage
inside the container. You do not need to configure STORAGE_ROOT
.
Upload settings
Choose your upload configuration:
- Foxglove-hosted
- Self-hosted
By default, your Organization will be configured with a Foxglove-hosted Primary Site. No additional configuration is required in this case.
If your Foxglove organization uses a self-hosted (self-managed) Primary Site, your device will need credentials to upload recordings, depending on the cloud service hosting your Primary Site inbox bucket.
- Google Cloud Storage
- Azure
- AWS
- S3-compatible
First, install a credentials.json
file into the device filesystem that authorizes the agent to write into your inbox bucket.
When installing using the .deb
package, The foxglove
user must have permissions to read this file.
When using the Docker image, the credentials.json
file must be mounted into the container filesystem.
Configure the following environment variables:
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
# If using Docker, use the path inside the container, not the host filesystem path
GOOGLE_APPLICATION_CREDENTIALS=...
Configure the following environment variables:
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=...
Configure the following environment variables:
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=...
If your Primary Site inbox bucket uses a S3-compatible service like MinIO, configure the following environment variables:
PRIMARY_SITE_MODE=self-managed
INBOX_STORAGE_PROVIDER=s3_compatible
# Set these according to your S3-compatible service deployment
RECORDING_STORAGE_S3_COMPATIBLE_ACCESS_KEY_ID=...
RECORDING_STORAGE_S3_COMPATIBLE_SECRET_ACCESS_KEY=...
RECORDING_STORAGE_S3_COMPATIBLE_SERVICE_REGION=...
RECORDING_STORAGE_S3_COMPATIBLE_SERVICE_URL=...
Run the Agent
The .deb
package installs Agent as a systemd service.
- Restart the service and check its status:
sudo systemctl restart foxglove-agent
systemctl status foxglove-agent
- Enable automatic startup (optional):
sudo systemctl enable foxglove-agent
Monitor the logs with journalctl
for debugging:
journalctl -u foxglove-agent