# Ookla Speedtest CLI

**URL:** <https://forum.openwrt.org/t/ookla-speedtest-cli/66345>\
**Category:** Installing and Using OpenWrt\
**Created:** [June 9, 2020, 7:54am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345 "2020-06-09T07:54:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dazzsser](https://forum.openwrt.org/letter_avatar/dazzsser/32/6_449c533f586939b6e5f246632a46421f.png) [@dazzsser](https://forum.openwrt.org/u/dazzsser)\
**Post date:** [June 9, 2020, 7:54am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/1 "2020-06-09T07:54:07Z")

</div>

Hi there,

Now that Ookla has released an official [SPEEDTEST® CLI client](https://www.speedtest.net/apps/cli), is it possible to get this installed and running on openwrt? What is involved in this?

Thanks,  
Darren

---

<div class="post-metadata">

**Author:** ![eduperez](https://forum.openwrt.org/user_avatar/forum.openwrt.org/eduperez/32/2066_2.png) [@eduperez](https://forum.openwrt.org/u/eduperez)\
**Post date:** [June 9, 2020, 8:26am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/2 "2020-06-09T08:26:09Z")

</div>

As far as I can see, they only provide a compiled binary, so it can only be used on the platforms they have decided to support.

---

<div class="post-metadata">

**Author:** ![dazzsser](https://forum.openwrt.org/letter_avatar/dazzsser/32/6_449c533f586939b6e5f246632a46421f.png) [@dazzsser](https://forum.openwrt.org/u/dazzsser)\
**Post date:** [June 9, 2020, 8:57am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/3 "2020-06-09T08:57:37Z")

</div>

Ah thanks for your response. So I should contact Ookla themselves and ask if they can support it on openwrt?

---

<div class="post-metadata">

**Author:** ![mbo2o](https://forum.openwrt.org/user_avatar/forum.openwrt.org/mbo2o/32/5465_2.png) [@mbo2o](https://forum.openwrt.org/u/mbo2o)\
**Post date:** [June 9, 2020, 9:16am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/4 "2020-06-09T09:16:01Z")

</div>

It is not ideal to run the speed test on the device you are trying to measure.

I would suggest running the speedtest from a PC or laptop connected to your router instead of directly on the router itself.

---

<div class="post-metadata">

**Author:** ![Hegabo](https://forum.openwrt.org/letter_avatar/hegabo/32/6_449c533f586939b6e5f246632a46421f.png) [@Hegabo](https://forum.openwrt.org/u/Hegabo)\
**Post date:** [June 9, 2020, 9:34am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/5 "2020-06-09T09:34:56Z")

</div>

A bit off topic, but speaking of Speed test, when you select a server, it can be a good idea to select a server that's no your ISP's.

In my case, for example, if I select a server that belongs to my ISP I often get a result that more or less represents my line attainable rate. If on the other hand I choose a different server, also in the same area, I get a result that's closer to my contracted speed.

---

<div class="post-metadata">

**Author:** ![eduperez](https://forum.openwrt.org/user_avatar/forum.openwrt.org/eduperez/32/2066_2.png) [@eduperez](https://forum.openwrt.org/u/eduperez)\
**Post date:** [June 9, 2020, 10:26am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/6 "2020-06-09T10:26:02Z")

</div>

You can contact them and ask, nothing to lose...  
I think there was some other alternative already supported, but I cannot remember the name.

---

<div class="post-metadata">

**Author:** ![dl12345](https://forum.openwrt.org/letter_avatar/dl12345/32/6_449c533f586939b6e5f246632a46421f.png) [@dl12345](https://forum.openwrt.org/u/dl12345)\
**Post date:** [June 9, 2020, 12:54pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/7 "2020-06-09T12:54:42Z")

</div>

> **[sivel/speedtest-cli](https://github.com/sivel/speedtest-cli)**
>
> Command line interface for testing internet bandwidth using speedtest.net - sivel/speedtest-cli

---

<div class="post-metadata">

**Author:** ![armars374](https://forum.openwrt.org/user_avatar/forum.openwrt.org/armars374/32/28363_2.png) [@armars374](https://forum.openwrt.org/u/armars374)\
**Post date:** [August 4, 2020, 6:38pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/8 "2020-08-04T18:38:11Z")

</div>

- [Speedtest.net](http://Speedtest.net) has migrated to using pure socket tests instead of HTTP based tests
- This application is written in Python
- Different versions of Python will execute certain parts of the code faster than others
- CPU and Memory capacity and speed will play a large part in inconsistency between [Speedtest.net](http://Speedtest.net) and even other machines on the same network

---

<div class="post-metadata">

**Author:** ![randyrodriguez](https://forum.openwrt.org/letter_avatar/randyrodriguez/32/6_449c533f586939b6e5f246632a46421f.png) [@randyrodriguez](https://forum.openwrt.org/u/randyrodriguez)\
**Post date:** [September 11, 2020, 6:21pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/9 "2020-09-11T18:21:04Z")

</div>

opkg install python-pip  
pip install speedtest-cli

Its a pretty big install though. Also, im getting higher pings and lower speeds on the router itself rather than my pc through ethernet.

---

<div class="post-metadata">

**Author:** ![randyrodriguez](https://forum.openwrt.org/letter_avatar/randyrodriguez/32/6_449c533f586939b6e5f246632a46421f.png) [@randyrodriguez](https://forum.openwrt.org/u/randyrodriguez)\
**Post date:** [September 11, 2020, 8:02pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/10 "2020-09-11T20:02:07Z")

</div>

I just reinstalled speedtest-cli on my router. It was about 10.5 MB. Make sure you have enough space before installing. You could probably delete most of the pip dependencies after installing speedtest. Ill try out which packages when I have some time. Now my speeds match my desktop but ping is definitely higher on the router, 4-5 ms on PC and 11-12 ms on OpenWRT.

---

<div class="post-metadata">

**Author:** ![technohippy29uk](https://forum.openwrt.org/letter_avatar/technohippy29uk/32/6_449c533f586939b6e5f246632a46421f.png) [@technohippy29uk](https://forum.openwrt.org/u/technohippy29uk)\
**Post date:** [January 28, 2021, 10:18am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/11 "2021-01-28T10:18:01Z")

</div>

The Python Speedtest is very different from the Ookla speedtest, and in my experience gives poor and erroneous results. I have a Raspberry Pi 4B I am using with OpenWRT. Before I installed OpenWRT on it, I ran up Raspian and installed the Python Speedtest. It only gave me around 80Mb/s even though my Virgin Media UK service was capable of 360Mb/s. I then downloaded the compiled Speedtest binary from Ookla and even when specifying the same server as the Python version, the results were much different - I got around 350-360Mb/s on every pass.

I tried downloading the Speedtest binary on OpenWRT on my Pi4B with OpenWRT, and it won't run. I installed the Python version and it gives better results (around 176Mb/s). My Pi has a USB3 ethernet interface connected to my modem, and the internal interface connected to my internal GB switch. A PC connected to the internal network which accesses the internet via the Pi, when running the binary from Ookla, still gets 360Mb/s, so the Python app is still wrong..

---

<div class="post-metadata">

**Author:** ![aidanharris](https://forum.openwrt.org/letter_avatar/aidanharris/32/6_449c533f586939b6e5f246632a46421f.png) [@aidanharris](https://forum.openwrt.org/u/aidanharris)\
**Post date:** [January 28, 2021, 11:39am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/12 "2021-01-28T11:39:22Z")

</div>

There's an unofficial C++ version you might want to try:

> **[taganaka/SpeedTest](https://github.com/taganaka/SpeedTest)**
>
> Yet another unofficial speedtest.net client cli interface

Another tool you might want to try is the [Measurement Lab's ndt7](https://www.measurementlab.net/tests/ndt/ndt7/). They have a [reference client written in go](https://github.com/m-lab/ndt7-client-go) so it should be easy to compile for different targets. I have a script that runs this hourly (it sleeps for a random interval between 0 and 3600 seconds to be kind to them) and outputs json to the syslog. Since I have a syslog server and send all logs to it I can easily parse this in the future. The only thing to be aware of is that they make results publicly available for study so if you're not okay with that then this is not for you.

---

<div class="post-metadata">

**Author:** ![cezary](https://forum.openwrt.org/user_avatar/forum.openwrt.org/cezary/32/1648_2.png) [@cezary](https://forum.openwrt.org/u/cezary)\
**Post date:** [January 28, 2021, 2:40pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/13 "2021-01-28T14:40:10Z")

</div>

In C: [https://github.com/mobrembski/SpeedTestC](https://github.com/mobrembski/SpeedTestC)

---

<div class="post-metadata">

**Author:** ![Hikari](https://forum.openwrt.org/letter_avatar/hikari/32/6_449c533f586939b6e5f246632a46421f.png) [@Hikari](https://forum.openwrt.org/u/Hikari)\
**Post date:** [May 18, 2021, 6:17pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/14 "2021-05-18T18:17:10Z")

</div>

The advantage of running it on the router is that we can use the `-I` parameter to choose the interface we wanna use on the test.

Sadly it seems not supported 😕

python speedtest-cli is a good job but when I run it on Ubuntu it always uses 1 ISP and never the other.

---

<div class="post-metadata">

**Author:** ![gimbleguy](https://forum.openwrt.org/letter_avatar/gimbleguy/32/6_449c533f586939b6e5f246632a46421f.png) [@gimbleguy](https://forum.openwrt.org/u/gimbleguy)\
**Post date:** [October 14, 2021, 8:01pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/16 "2021-10-14T20:01:52Z")

</div>

I'm surprised no one has made a package of this yet for OpenWRT. I've been using the Ookla version for quite awhile. But this new release of 19.07.8 Openwrt, it doesn't work now. ☹

---

<div class="post-metadata">

**Author:** ![Hikari](https://forum.openwrt.org/letter_avatar/hikari/32/6_449c533f586939b6e5f246632a46421f.png) [@Hikari](https://forum.openwrt.org/u/Hikari)\
**Post date:** [January 3, 2022, 12:41am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/17 "2022-01-03T00:41:25Z")

</div>

It's not open sources, so we can't just compile it. Ookla needs to provide the package for us, and on most architectures 😕

I've been using it on Ubuntu and it uses different ISP very often, so it's working fine.

---

<div class="post-metadata">

**Author:** ![mbo2o](https://forum.openwrt.org/user_avatar/forum.openwrt.org/mbo2o/32/5465_2.png) [@mbo2o](https://forum.openwrt.org/u/mbo2o)\
**Post date:** [January 3, 2022, 8:38pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/18 "2022-01-03T20:38:31Z")

</div>

Of course ping will be better. It is one less hop.

---

<div class="post-metadata">

**Author:** ![willowen100](https://forum.openwrt.org/user_avatar/forum.openwrt.org/willowen100/32/3362_2.png) [@willowen100](https://forum.openwrt.org/u/willowen100)\
**Post date:** [January 6, 2022, 12:01am UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/19 "2022-01-06T00:01:56Z")

</div>

Is anyone aware that there are ARM packages of Ookla Speedtest CLI? Not sure if there any dependencies but there is just a single executable in the archive.

 ![Screenshot_20220105_233419](https://forum.openwrt.org/uploads/default/original/3X/7/4/74be9243ad74adee32031c1a0a735af66fcf7787.jpeg)

---

<div class="post-metadata">

**Author:** ![billchurch](https://forum.openwrt.org/user_avatar/forum.openwrt.org/billchurch/32/42204_2.png) [@billchurch](https://forum.openwrt.org/u/billchurch)\
**Post date:** [January 25, 2022, 2:32pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/20 "2022-01-25T14:32:35Z")

</div>

> [@willowen100](#):
>
> Ookla Speedtest CLI?

I've used this binary (aarch64) on an rPi 3B+ without issue...

---

<div class="post-metadata">

**Author:** ![willowen100](https://forum.openwrt.org/user_avatar/forum.openwrt.org/willowen100/32/3362_2.png) [@willowen100](https://forum.openwrt.org/u/willowen100)\
**Post date:** [January 25, 2022, 7:09pm UTC](https://forum.openwrt.org/t/ookla-speedtest-cli/66345/21 "2022-01-25T19:09:49Z")

</div>

I would be interested getting this officially ported into OpenWrt for compiling firmware.

[Next page](https://forum.openwrt.org/t/ookla-speedtest-cli/66345.md?page=2)
