Overwhelmed with the response we got on the previous article on how to test the bandwidth speed using command-line tool speedtest-cli, this tutorial aims at providing you with the knowledge of setting your own speedtest mini server in 10 minutes.
[ You might also like: How to Test Your Linux Internet Speed Using Speedtest CLI ]
Speedtest.net mini is a speed testing application that is used for hosting a speed test server (Mini) on your own site/server. Another application from NetGuage serves the same purpose which primarily is designed for Corporate sites.
Speedtest.net Mini is available for free and is compatible with all major web servers. It measures ping by sending an HTTP request to a selected server and measures the time till it gets a response. For checking upload and download speed, it uploads and downloads small binary files from a webserver to the client and vice-versa for upload.
Note: Speedtest Mini server may not be used for commercial use, nor on any commercial sites.
Install Speedtest Mini Server on Linux
Download speedtest Mini Server from the link below. You need to log in before you can download. If you don’t have an account, register first.
Once downloaded mini.zip
file, you need to unzip the archive file.
# Unzip mini.zip
Now you need to determine on which server you want to host the application. You can choose any of the following as your hosting server – PHP, ASP, ASP.NET, and JSP. Here we will be using PHP and Apache as servers to host.
Let’s install Apache, PHP, and all needed PHP modules using the following commands.
On Debian/Ubuntu/Mint
# apt-get install apache2 # apt-get install php5 php5-mysql php5-mcrypt php5-gd libapache2-mod-php5
On RedHat/CentOS/Fedora
# yum install httpd # yum install php php-mysql php-pdo php-gd php-mbstring
After installing Apache and PHP with all required modules, restart the Apache service as shown below.
# service apache2 restart [On Debian/Ubuntu/Mint] # service httpd restart [On RedHat/CentOS/Fedora] # systemct1 restart httpd [On RHEL/CentOS 7.x and Fedora 21]
Next, create a phpinfo.php
file under Apache default directory, which we will use to check if PHP is rendering correctly or not.
# echo "<?php phpinfo(); ?>" > /var/www/phpinfo.php [On Debian/Ubuntu/Mint]
# echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php [On RedHat/CentOS/Fedora]
Note: The default Apache root directory maybe /var/www/ or /var/www/html/, please check the path before moving forward…
Now we will be uploading the extracted folder mini
to the Apache default directory location.
# cp -R /[location to extracted folder]/mini /var/www/ [On Debian/Ubuntu/Mint]
# cp -R /[location to extracted folder]/mini /var/www/html [On RedHat/CentOS/Fedora]
We need to rename a file hence Long list the contents of a directory that was uploaded to the Apache directory /var/www/ or /var/www/html.
# ls -l /var/www/mini OR # ls -l /var/www/html/mini
Now rename index-php.html
to index.html
only and leave other files untouched.
# cd /var/www/ OR # cd /var/www/html/ # mv mini/index-php.html mini/index.html
Note: If you’re using any other platform as your host, you need to rename the respective file as shown below.
- Rename index-aspx.html to index.html, if you are using ASP.NET as your host.
- Rename index-jsp.html to index.html, if you are using JSP as your host.
- Rename index-asp.html to index.html, if you are using ASP as your host.
- Rename index-php.html to index.html, if you are using PHP as your host.
Now point your web browser to your local server IP address, which typically in my case is:
http://192.168.0.4/mini
Click Begin Test and it starts testing the speed Locally.
Now If you want to run the mini server over the internet you need to forward your port in the firewall as well as in the router. You may like to refer to the below article to get a brief of how-to on the above topic.
If everything goes fine you can check your bandwidth speed using a mini server. But if the mini server and machine to be tested are on the same network you might need a proxy server like (kproxy.com), to test.
Also, you can check the speed of Internet connection on a headless server or Linux command line using speedtest-cli
tool.
# speedtest_cli.py --mini http://127.0.0.1/mini
Note: If you are on a different network, you are supposed to use public ip address in the web browser as well as a command line.
Furthermore, SYSAdmins can schedule the speedtest to run periodically in production, after setting up a mini server.
Conclusion
The setup is too easy and took me less than 10 minutes of time. You may set up your own speedtest server to check the connection speed of your own production server, it is fun.
That’s all for now. I’ll be coming up with another interesting article very soon. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread.
Hi all,
Speedtest Mini is discontinued, so do we have another tool which can use the same as Mini?
Yea! I can’t believe how much the subscription is too… Anyone find any alternatives?
Found this one: https://github.com/adolfintel/speedtest and it seems pretty good for our needs. To just measure local network speed. And its no flash, just javascript so we can customize it and no needs for periodic upgrades like in case of speedtest mini.
That looks great! I’ll have to give it a shot!
My local speed test mini result is only 450mbps, is there any additional configuration to reach 1gbps speedtest?
my server has gigabit interface.
hi how can i run speedtest server in internet so we can use it even outside our network.
I want to measure my modem speed, speed test server on lan side (redhat) and wifi client(windows pc).
Both server and client on same network 192.168.1.x
Simply using url on windows can work, or do i need to do any change in windows pc
@Jose,
Once you setup Speedtest Mini server, you can use on any network or PC to measure the bandwidth speed of network with URL..
Thanks Ravi.
this is the latest flash 21.0.0.216
i get a message that says
“Speedtest.net Mini requires at least version 8 of Flash. Please update your client.”
this is my browser plugins info for flash:
Adobe Flash Player – Version: 21.0.0.216 (Enabled by enterprise policy)
Shockwave Flash 21.0 r0
anyone had the same problem?
Please help
@Mohamed,
This is something related to your browser, just install correct latest version of Flash to run Speedtest.Mini..
If server is setup, can it be accessed through browser on mobile device – iOS or Android?
@Alkesh,
One the server is setup, it can be accessed via any device over web browser..
FYI.. if you want to install this on Tomcat or Weblogic (not PHP nor ASP.net) you can simply use jar to create a mini.war file after following the above changes; then deploy the mini.war to your tomcat and WLS. Works great!! Don’t forget to update mod_jk or wls handler mounts for /mini to you tomcat or wls instances
Thx great tutorial,
Successfully deploy on my network, the disadvantage is cant test using mobile devices(chrome android).
I want to setup a broadband speed test tool for my clients, can i use this ??
@Prateek,
Yes, you can use this tool to setup network speed test for your clients..
What if I want to use my Mini speedtest server with mobile devices like iOS or Android devices? They don’t support flash and I can not use a terminal wihtout root them (in order to use the speedtest-cli). Any suggetions?
Hi there
For some reason, all that shows up on my screen, is a line that says, please update your client. I did that, but still get it. This is on Ubuntu. How can I troubleshoot ?
Dear Wimpie knoetz,
from the above one line or error message i can not figure what is the issue.
I am better assist you, if you provide me with detailed Error message. I may need your SSH access, for assistance which you may email me at avishek1210[at]gmail.com
Had the same error “please update your client” and I noticed that the speedtest folder was missing so I uploaded the folder an problem went away
is there away to do speedtest periodically and have the results in a nice graph.for instance i can host the script on a vps and it would do periodic speedtest after 30 min or so and the results would be in a nice graph.
you may cron the job and log it to a file.
It don’t provide you with graphs.
However from the stats that will be logged to your file, you may create a graph or write a nice script to do this.
What is advantages of become a ookhla speed test host , it is possible to earn money…?
I don’t know, but perhaps you can not use it for commercial use. The Advantage is when you have 100s of server and want to test your connection using from scheduled command. It provides you safest way. No third party Network required.
are they still using flash?
I am not using flash anymore …
you speedtest_cli. It is a command line application. No Flash required.
Here are the details:
https://www.tecmint.com/check-internet-speed-from-command-line-in-linux/
Nice tutorial, it appears as though when I run the mini version using the CLI it tries to do DNS lookups from speedtest.net (wpc..xicdn.net) which then returns my NAT’d IP address. Anyone have any luck doing this on a private RFC 1918 network?
I did it successfully though on a different network.