🌐 Network Setup

Before your server can receive shreds — whether through our SDK or a raw UDP listener — you need to open the correct port and tune your OS network buffers.

Using our SDK? The SDK configures the socket receive buffer automatically. You still need to complete the firewall and OS tuning steps below.


🔒 Firewall Configuration

Open the UDP port you configured on ShredStream.com. The exact command depends on your Linux distribution.

🔹 UFW (Ubuntu / Debian)

bash
sudo ufw allow 8001/udp

🔹 iptables

bash
sudo iptables -A INPUT -p udp --dport 8001 -j ACCEPT

To persist the rule across reboots, save it with iptables-save or your distribution's persistence mechanism (e.g., netfilter-persistent).

🔹 firewalld (CentOS / RHEL / Fedora)

bash
sudo firewall-cmd --permanent --add-port=8001/udp
sudo firewall-cmd --reload

If your server is behind a cloud provider's security group (AWS, GCP, Azure, etc.), you must also allow inbound UDP traffic on the same port in the cloud console.


📐 UDP Buffer Tuning

Solana validators produce shreds at a very high rate. The default Linux UDP receive buffer is typically 256 KB, which is far too small and will cause packet drops under load. Set the receive buffer to at least 25 MB.

⚡ Apply Immediately

bash
# Linux
sudo sysctl -w net.core.rmem_max=26214400
sudo sysctl -w net.core.rmem_default=26214400
# macOS
sudo sysctl -w kern.ipc.maxsockbuf=33554432

💾 Make Persistent Across Reboots

bash
echo 'net.core.rmem_max=26214400' | sudo tee -a /etc/sysctl.conf
echo 'net.core.rmem_default=26214400' | sudo tee -a /etc/sysctl.conf

Then verify:

bash
sysctl net.core.rmem_max net.core.rmem_default

You should see both values set to 26214400.

Skipping buffer tuning is the single most common cause of missed shreds. If your listener reports gaps in the data, check your buffer settings first.


✅ Verifying Your Setup

Once your SDK listener is running and your stream is active on the ShredStream.com dashboard, you should see output within seconds.

Checklist if shreds are not arriving:

  1. Dashboard status — confirm your stream shows Active and the connection IP and port match your server.
  2. Firewall — verify the UDP port is open. Test from another machine with nc -u <your-ip> 8001.
  3. Public IP — make sure you entered your server's public IPv4 address, not a private or internal IP.
  4. Buffer size — run sysctl net.core.rmem_max to confirm the buffer is set to at least 26214400.
  5. Listener binding — ensure your listener binds to 0.0.0.0 (all interfaces), not 127.0.0.1 (localhost only).

If everything checks out and you are still not receiving data, see Troubleshooting or reach out on Discord.