OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

Setup & config

Install the ShredStream listener process and connect your application over a local Unix socket.

  1. Install the listener

    The listener is pre-installed on all OpenInfra servers. If you need to install manually:

    curl -fsSL https://install.openinfra.sh/shredstream | bash
  2. Configure environment

    OPENINFRA_API_KEY=oi_live_xxxxxxxxxxxx

    Place this in /etc/openinfra/env.

  3. Enable as a systemd service

    [Unit]Description=OpenInfra ShredStream listenerAfter=network-online.targetWants=network-online.target [Service]User=openinfraExecStart=/usr/local/bin/openinfra-shredstream \  --relay shred.openinfra.sh:1234 \  --api-key ${OPENINFRA_API_KEY} \  --bind 0.0.0.0:1235 \  --grpc-socket /run/shredstream/shred.sockEnvironmentFile=/etc/openinfra/envRestart=on-failureRestartSec=5 [Install]WantedBy=multi-user.target
    systemctl enable --now openinfra-shredstream
  4. Connect your application

    The listener exposes a local gRPC server over a Unix socket. Connect from your application without any network overhead:

    import { createChannel, createClient } from "nice-grpc"; const channel = createChannel(  "unix:///run/shredstream/shred.sock"  // local IPC — no TLS); // The proto is bundled with openinfra-shredstreamconst client = createClient(ShredStreamDefinition, channel); for await (const shred of client.subscribe({})) {  console.log("slot:", shred.slot, "index:", shred.index, "bytes:", shred.data.length);}

Verifying the connection

journalctl -u openinfra-shredstream -f

You should see lines like received shred slot=312449201 index=3 within a few seconds of the service starting.

Configuration options

  • --relay — ShredStream relay address (set automatically on OpenInfra servers).
  • --bind — UDP port to receive shreds on. Firewall-open this from the relay IP.
  • --grpc-socket — Unix socket path for local gRPC server.
  • --grpc-port — Optional TCP gRPC port (useful for Docker networking).
  • --max-lag-slots — Drop shreds for slots more than N behind current slot.