Skip to content

Set Up Speedtest CLI on a Linux Server – Monitor Your Server's Network Performance

Discover how to set up Speedtest CLI for reliable network testing and automation → Learn more now

12 November 20262 min read14 Views0 helpful

Introduction

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.

Preparation

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.

Update System

To ensure your system runs with the latest software and security updates, first perform a system update by entering the following command:

Code
sudo apt update && sudo apt upgrade -y

This ensures your system has the newest security patches and software versions before installation.

Installation

After preparation is complete, you can install Speedtest CLI by running this command:

console
sudo apt install speedtest-cli

Configuration

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.
  • --json or --csv: Useful for automation and logging, as results are saved in machine-readable formats.
  • Proxy support: Set environment variables like http_proxy or https_proxy to 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.

Conclusion and Further Resources

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:

Still have questions that weren’t answered here? Our team is available daily for further questions or support – just reach out to us! 🙂

FAQ

Frequently asked questions

First, update your system with sudo apt update && sudo apt upgrade -y, then install Speedtest CLI using sudo apt install speedtest-cli.
It’s a free command-line tool to test your internet speed (download, upload, and ping) directly from the console, ideal for monitoring and automation with output in JSON or CSV.
Use the --server <ID> option to choose a specific server by ID for more consistent and comparable test results.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.