Skip to content
Quick Start

Quick Start

speedtest-go measures your internet connection against speedtest.net servers. It comes as a command-line tool and as a Go library.

It measures:

  • Latency and jitter, over HTTP, TCP, or ICMP
  • Download and upload rates, over HTTP or TCP
  • Packet loss

It is a fork of showwin/speedtest-go, updated to the latest Go version and dependencies, with a redesigned v2 library API.

Install

On Linux and macOS, the install script downloads the latest release, verifies its checksum, and installs it:

tmp=$(mktemp)
curl -sSfL https://raw.githubusercontent.com/nicholas-fedor/speedtest-go/master/scripts/install.sh -o "$tmp" && sh "$tmp"

Installation covers the script’s options, updating, and uninstalling, and the other methods: binaries for Linux, macOS, and Windows, Go, Docker, and Kubernetes.

Run a test

speedtest-go

speedtest-go tests the server near you with the lowest latency. How a Test Works explains each step.

Choose the output

OutputFlagUse it for
Live progressnoneWatching a test in a terminal
Plain lines--unixLogs, and terminals that cannot redraw
One JSON document--jsonScripts that read the whole result
One JSON line per server--jsonlScripts that process servers one at a time
speedtest-go --json > result.json

Reading the Results explains each output.

Choose the servers

list shows the servers near you, with their IDs, distances, and latencies:

speedtest-go list

Pass one or more IDs to test them:

speedtest-go --server 6691 --server 6087

Choosing servers covers testing near another location, filtering by country, and spreading a test across several servers.

Next steps

ToSee
Set defaults, so a plain speedtest-go runs the way you wantConfiguration
Look up every flagCLI Reference
Understand an error or an exit codeTroubleshooting