OpenSpeedTest Server Self-hosted Network Speed Test in Docker
Checking speeds in your network is a great way to troubleshoot and also keep a check on performance metrics. If you are like me, you have probably relied on publicly available speed test servers to check the speed of your connection from an Internet perspective (ISP provider) and then used something like iperf to check the speed between devices. Let me introduce you to OpenSpeedTest server, a really cool self-hosted speed test server that allows you to check network speeds offline, between nodes, and even from remote hosts you want to test for diagnostics purposes.
Table of contents
What is OpenSpeedTest Server?
OpenSpeedTest Server is a free and open-source (so you can access source code) HTML5 network performance and Internet speed test estimation tool you can run from a web browser on your device. It has a user-friendly interface and the capacity to accurately gauge internet connection speed. It is powered by vanilla JavaScript and uses built-in Web APIs. OpenSpeedTest Server is a reliable tool for running network speed tests in various environments.
When you self-host, you navigate to the test server’s IP address and container port and then click Start. It will run the speed test automatically, running a continuous speed test performing a download and upload speed test. So, no client-side software is needed for the speed test, only a browser. The interface is simple and easy with an easy-to-read speedometer type speed display.
Key Features of OpenSpeedTest
Let’s look at the features of the OpenSpeedTest server self-hosted server.
Versatile Speed Testing Capabilities
OpenSpeedTest allows you to run a network speed test running upload speed, download speed, and ping latency tests.
Can run as a server on multiple platforms
One of the really cool things you can do is run the OpenSpeedTest server as an app on your android or iOS device. It can also be run on Windows, Linux, and Mac desktop devices. The application is easy to install and can be installed and configured in seconds to see the result of your connection speed and bandwidth from the URL of the device.
Good UI
The OpenSpeedTest user interface is simple and easy to use. As you will see it is not very busy and the UI is uncluttered. in my testing, running the test doesn’t adversely affect browser performance
Customization and Flexibility
Users can customize their testing experience on OpenSpeedTest Server. Options like allowing you to change the overhead compensation factor, reset overhead compensation factor, selecting different servers, and setting specific test parameters (such as ping samples and test types) enhance its adaptability to various testing requirements.
Local network speed test
If you want to run a local speed test on your LAN or Wifi network, you can run a stress test that allows you to test the upload and download speed and latency between devices on your local network. You can’t do this with publicly available popular speed test sites. Due to the available apps you can use a cell phone, tablet or other deployments for quick and easy testing with accuracy.
Embedded on a web server
You can also host the OpenSpeedTest server as a widget on your website. The test can be configured to run automatically as well in the browser based test. You can use the below widget code to embed the speedtest into your website. The speedtest script file size is minimal:
<!--OST Widget code start--><div style="text-align:right;"><div style="min-height:360px;"><div style="width:100%;height:0;padding-bottom:50%;position:relative;"><iframe style="border:none;position:absolute;top:0;left:0;width:100%;height:100%;min-height:360px;border:none;overflow:hidden !important;" src="//openspeedtest.com/speedtest"></iframe></div></div>Provided by <a href="https://openspeedtest.com">OpenSpeedtest.com</a></div><!-- OST Widget code end -->
Run with embedded database
You can run the server with an embedded database to store data.
Installation
The OpenSpeedTest server can be deployed using a simple and easy Docker installation. You can either use Docker run or Docker Compose to deploy the container.
Simple Docker Installation
The Docker container installation simplifies installation and configuration. This is most likely the type of installation you will want to use to deploy into your home lab environment.
Use the following Docker run command to deploy the container:
docker run --restart=unless-stopped --name openspeedtest -d -p 80:3000 -p 443:3001 openspeedtest/latest
You can also deploy using Docker Compose code:
version: '3.3'
services:
speedtest:
restart: unless-stopped
container_name: openspeedtest
ports:
- '3000:3000'
- '3001:3001'
image: openspeedtest/latest
Advanced Configuration Options
More tech-oriented users can delve into advanced configurations. OpenSpeedTest Server supports deploying the container using LetsEncrypt SSL certificates as well.
Docker run:
docker run -e ENABLE_LETSENCRYPT=True -e DOMAIN_NAME=speedtest.yourdomain.com -e [email protected] --restart=unless-stopped --name openspeedtest -d -p 80:3000 -p 443:3001 openspeedtest/latest
Docker Compose:
version: '3.3'
services:
speedtest:
environment:
- ENABLE_LETSENCRYPT=True
- DOMAIN_NAME=speedtest.yourdomain.com
- [email protected]
- VERIFY_OWNERSHIP="TXT-FILE-CONTENT"
restart: unless-stopped
container_name: openspeedtest
ports:
- '80:3000'
- '443:3001'
image: openspeedtest/latest
Note the screenshots below, showing the Docker installation. In the first screenshot, we have added the Docker Compose code to a docker-compose.yml file and run the command:
docker-compose up -d
You can see the status of the Docker Compose container provisioning using the command:
docker-compose ps
Installing using a mobile app
Below are a few screenshots using the Google Play OpenSpeedTest-Server mobile app. Search for “openspeedtest” and you should see the OpenSpeedTest-Server app.
After installing the app, you launch the application and you can click the Start Server button to begin testing.
After starting the server on an Android phone.
Running a speedtest using OpenSpeedTest server
The process to run the actual speed test is simple and easy to check your connectivity. Just browse to the address of your server, whether this is a container, or a mobile device with the server running, click the Start button to begin the speed test. Below is a speedtest I ran across a wireless network to hit OpenSpeedTest, running in a Docker container host on the same internal site.
As you can see below, I am testing a wired LAN connection and the results are much more dramatic, in terms of download, upload, ping, and jitter.
OpenSpeedTest Server – Definitely a cool tool
The OpenSpeedTest Server is one of the easiest self-hosted speed tests you will find, with many options for hosting the server component. It allows you to easily test between devices on the same network, different networks, or even embed the code into your website to provide a hosted speedtest solution.Spinning up a Docker container with OpenSpeedTest Server is super easy and lets you get up and running with testing and network speed diagnostics in just a few seconds. It is definitely one of the tools you should keep in your back pocket for online analysis of your network and Internet connection.