Speedtest CLI is a free command-line tool to test your internet speed (download, upload, and ping) directly from the console. It is ideal for monitoring your server's network performance and outputting results for automation and monitoring in machine-readable formats like JSON or CSV.
Want to host this service yourself? We guide you step-by-step through the setup and configuration and show you everything you need to know.
Before setting up Speedtest CLI, you should prepare your system. This includes updating your operating system to the latest version. This preparation ensures a stable environment and helps avoid issues during or after installation.
To ensure your system runs with the latest software and security updates, first perform a system update by entering the following command:
sudo apt update && sudo apt upgrade -y
This ensures your system has the newest security patches and software versions before installation.
After preparation is complete, you can install Speedtest CLI by running this command:
sudo apt install speedtest-cli
Speedtest CLI does not use a traditional configuration file but can be customized via command-line options and environment variables. This allows you to configure it for consistent and automated tests:
--server <ID>: Select a specific server by ID to get more consistent and comparable test results.--bytes: Displays speeds in bytes per second instead of bits.--simple: Outputs only ping, download, and upload in a compact format.--jsonor--csv: Useful for automation and logging, as results are saved in machine-readable formats.- Proxy support: Set environment variables like
http_proxyorhttps_proxyto use Speedtest CLI behind a proxy.
If you frequently use the same options, it’s recommended to create a shell alias or a small wrapper script. This way, you can quickly start Speedtest CLI and always have a consistent output format.
Congratulations! You have successfully installed and configured Speedtest CLI on your VPS/Dedicated Server. We also recommend checking out these resources that can help you with server configuration:
- Speedtest.net/apps/cli – Official website
Still have questions that weren’t answered here? Our team is available daily for further questions or support – just reach out to us! 🙂