Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Install via Cargo

Installing socktop via Cargo gives you access to the latest version and works on any Linux distribution with Rust installed.

Prerequisites

Before installing via Cargo, ensure you have:

  • Current stable Rust (1.85+, 2024 edition) - Install via rustup
  • Build dependencies - See Prerequisites for details
  • GPU support libraries (x86_64/aarch64):
    # Debian/Ubuntu
    sudo apt install libdrm-dev libdrm-amdgpu1
    # Fedora
    sudo dnf install libdrm-devel libdrm-amdgpu
    

Installation

Installing the TUI Client

cargo install socktop

This will download, compile, and install the socktop binary to ~/.cargo/bin/. Make sure this directory is in your PATH.

Installing the Agent

cargo install socktop_agent

This installs the socktop_agent binary to ~/.cargo/bin/.

cargo install socktop socktop_agent

Verify Installation

Check that the binaries are installed correctly:

# Check socktop client
socktop --version

# Check socktop agent
socktop_agent --version

You should see output like:

socktop 1.60.1

First Run

Start the Agent

Start the agent in a separate terminal or background process:

# Run in foreground (for testing)
socktop_agent

# Run in background
socktop_agent &

# Or on a custom port
socktop_agent --port 3000

Connect with the Client

In another terminal, connect to the agent:

socktop ws://localhost:3000/ws

Or just try demo mode (starts and stops its own local agent):

socktop --demo

Configuration

The agent is configured with a small set of flags (--port/-p, --enableSSL) and environment variables (SOCKTOP_TOKEN, SOCKTOP_AGENT_GPU=0, …). The client connects by URL or saved profile:

# Remote connection
socktop ws://192.168.1.100:3000/ws

# Secure connection with a pinned certificate
socktop --tls-ca /path/to/cert.pem wss://secure-host:8443/ws

# Using a connection profile
socktop -P my-server

See Configuration for the complete reference and Connection Profiles for profiles.

System-wide agent (Linux)

# If you installed with cargo, binaries are in ~/.cargo/bin
sudo install -o root -g root -m 0755 "$HOME/.cargo/bin/socktop_agent" /usr/local/bin/socktop_agent

# Install and enable the systemd service (example unit in docs/)
sudo install -o root -g root -m 0644 docs/socktop-agent.service /etc/systemd/system/socktop-agent.service
sudo systemctl daemon-reload
sudo systemctl enable --now socktop-agent