Due to the slow internet connection, I experienced repeatedly the Covid19 lockdown. I found myself performing multiple speed tests and I thought to myself and needed to set one up for myself 🙂 Here is a list of the top 20 Speedtest Open Source Projects.
Set up a self-hosted speed test server on Ubuntu
You can set up a speed test server to check how fast your Internet connection is (measure download speed, upload speed, and ping value) and to determine the latency of your users working from the home. To have the Speed Test installed on your server, please head over to this URL and click on download ZIP. If you have GIT installed on your device, you could just clone the repository.
Kindly extract the downloaded speed test to your desired location. I extracted mine into the downloads folder as this is a test VM.
Install the NPM Package:
apt install npm
Having cloned or downloaded this repository, please change into the directory and issue the following command below. For more information on the NPM CLI commands, please see the following link.
npm run setup
NPM run build
This will run the build field from the package.json scripts. This is the plumbing command called by npm link and npm install.
npm run build
NPM run start: This will run a predefined command specified in the “start” property of a package’s “scripts” object.
npm run start
Access the Speed Test Server URL
As you can see, (despite not providing you with the entire logging output), the speed test has started. Now, we can now access this user interface from the browser with the following URL below.
All you need do now is to do from here is to click on “Start” as shown above. This will begin the Speed test as shown below.
Now, you can share this link with your customers and employees in order to determine the speed of their internet connection to your server.
You may additionally have to create firewall rules to permit connection (access) to this server (LAN) etc. Kindly see this article on how to disable automatic screen lock on Ubuntu Desktop with the GUI and dconf Editor.
Explanation of SpeedTest Values
The following values are automatically checked by some speed test servers.
- Latency: In simple terms, latency is the reaction speed of your internet connection. It is used to outline the amount of time it takes for a packet to transfer to its destination (Delays can be predicted).
- Jitter: This is the delay that varies over time when the signal wanes or jitters (Can not be predicted because of its inconsistency).
- Download Speed: The download speed or bandwidth of an Internet connection is most important. It shows how quickly data is being downloaded from the Internet. The higher the speed or bandwidth of a connection (in megabits or gigabits per second), the better. Activities such as listening to music on Spotify, downloading large files, or streaming videos on Netflix all require you to download data.
- Upload Speed: The upload speed has also become an important parameter for internet connections. In contrast to the download speed, it says how quickly data can be uploaded from a computer to the Internet. While downloading information is more common, some online activities need data to travel in the opposite direction. Sending emails, playing live tournament-style video games, and video calling a friend to require fast upload speeds for you to send data to someone else’s server.
- Ping Value: The ping value indicates the time that a data packet needs to travel between the sender and receiver (for example from an employee device to your company server (self-hosted speed test)). The lower this value, the better. Most speed test displays this value in milliseconds. The ping value is particularly important for video chats or online games.
Latency and ping are often used interchangeably, they are a little bit different. Ping refers to the signal sent from the device to the server, latency is the time it takes for the ping to return to the device.
How to achieve the optimal speed test
The Internet speed on the computer with which you are performing the speed test can be influenced by numerous factors. Applications that are open during the Internet speed test, such as e-mail or security programs (firewall, anti-virus program), play an important role. Such programs can negatively influence the measurement result, especially if they run unnoticed in the background.
The configuration of the computer used and other hardware used such as a modem or WLAN router can also influence the measurement result. In order to obtain the most accurate result possible, your own computer should be connected directly to the modem or WLAN router for the speed test using a LAN cable.
With a wireless connection via WLAN, in addition to the performance of the devices used, the distance or apartment walls between the computer and the WLAN router can lead to a loss of speed. You should take these factors into account when installing WLAN at home.
I hope you found this blog post helpful on how to set up a self-hosted speed test server on Ubuntu Linux. If you have any questions, please let me know in the comment session.