Foxglove WebSocket

Connect directly to your live custom data (i.e. Protobuf, JSON) with an encoding-agnostic WebSocket connection.

Getting started

The foxglove/ws-protocol repo provides both Python and JavaScript/TypeScript packages for building your own Foxglove WebSocket servers and clients. It also includes templates for building your own custom server (Python, JavaScript/TypeScript) and client (JavaScript/TypeScript).

It also includes a @foxglove/ws-protocol-examples npm package with example servers and clients. Run these examples to see how Studio can receive system stats and image data from a custom WebSocket server:

$ npx @foxglove/ws-protocol-examples sysmon
$ npx @foxglove/ws-protocol-examples image-server

To learn more, reference the protocol specification.

Loading data

In the Data source dialog, click Open connection, select Foxglove WebSocket , and then enter the URL to your WebSocket server:

foxglove websocket dialog

You can also choose to stream your Foxglove Data Platform data directly into Studio, for further analysis. Check out the Data Platform docs for more information.

Foxglove WebSocket connections currently support Protobuf and JSON data.

Please get in touch if there are other data formats that your team would like to see supported.


For channels with encoding: "json", Studio expects the schema to be a JSON Schema definition.

Each message should be UTF8-encoded JSON representing an object. Binary data should be represented as a base64-encoded string in the JSON object, and as a contentEncoding (e.g. { "type": "string", "contentEncoding": "base64" }) in the schema.


For channels with encoding: "protobuf", Studio expects the schema to be a base64-encoded binary FileDescriptorSet (as produced by protoc --include_imports --descriptor_set_out) , and schemaName to be one of the message types defined in the FileDescriptorSet.

Each message should be encoded in the protobuf binary wire format – we provide .proto files compatible with Foxglove Studio in our foxglove/schemas repo.