Skip to content

WebSocket

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy

Connects to a WebSocket server and ingests received messages.

Configuration

yaml
source:
  kind: websocket
  url: "ws://localhost:8080/stream"
  headers:
    Authorization: ${WEBSOCKET_AUTH_HEADER}
FieldDefaultDescription
url(required)WebSocket URL (ws:// or wss://)
headersAdditional request headers
modestreamstream or batch

Namespace: websocket.{url_host}

CLI

bash
skippr connect source websocket \
  --url wss://stream.example.com/v1 \
  --headers Authorization='Bearer your-token' \
  --mode stream
FlagDescription
--urlWebSocket URL (ws:// or wss://)
--headers KEY=VALUEAdditional request header; repeat for multiple values
--modeConsumption mode

Authentication

Authentication is optional and depends on the upstream service. For security best practices, we strongly advise against storing authentication header values in skippr.yaml. Use environment variable interpolation instead: replace the relevant headers value with your own ${ENV_VAR} reference.

The relevant part of skippr.yaml looks like this:

yaml
source:
  kind: websocket
  headers:
    Authorization: ${WEBSOCKET_AUTH_HEADER}

Set the env var before running skippr:

macOS / Linux

bash
export WEBSOCKET_AUTH_HEADER="Bearer your-token"

Windows PowerShell

powershell
$env:WEBSOCKET_AUTH_HEADER = "Bearer your-token"

Windows Command Prompt

cmd
set WEBSOCKET_AUTH_HEADER=Bearer your-token

Permissions or Network Requirements

The runner must be able to reach the WebSocket URL and keep the connection open. If the service sits behind a proxy or firewall, allow outbound access to the target host and port.

Troubleshooting

SymptomFix
handshake failedVerify the URL, any required headers, and whether the endpoint expects ws:// or wss://.
connection drops repeatedlyCheck idle timeouts, keepalive settings, and proxy or firewall behavior between the runner and server.

Next steps

Install

See the Install guide for the full setup, including Windows PowerShell.

curl -fsSL https://install.skippr.io/install.sh | shClick to copy