[GUIDE] Openspeedtest docker - setup using portainer

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Post Reply
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

[GUIDE] Openspeedtest docker - setup using portainer

Post by Moogle Stiltzkin »

Just an update for my previous guide on this. I setup a simple and better way to do this. This guide uses portainer to install the openspeedtest docker app.


What is this app and what is it for?
OpenSpeedTest™️ - Pure HTML5 Network Performance Estimation Tool

Why OpenSpeedTest?
Secure by Design.
OpenSpeedTest contains Only "STATIC" Files like HTML,CSS & JS.

So you don't need to worry about Security Updates or Hidden Exploits that may compromise your secure environments.

Lightweight, High Performance.
OpenSpeedTest is written in Pure JavaScript. No Third-Party frameworks or libraries were used. SpeedTest script file size is under 8kB gzip. The unexpected side effect of using Pure JavaScript is High Performance.

Run a speed test from Any Device.
OpenSpeedTest will run on Any Web Browser that is IE10 or new.

Ready for Any Display Size and Resolution.
OpenSpeedTest User interface is written in SVG.

You may be asking, why not just use speedtest?
https://www.speedtest.net/

Image

Image if the meme isn't clear enough, read below.

Because that is basically testing your internet connection :lol: It's hosted on a server elsewhere (testing over the internet). Testing internet is fine (i also do this. if only to complain to my isp to demand a rebate because i'm not getting the broadband package speed i signed up for). But the purpose for openspeedtest (at least one possible use) is to self host and run local lan speed test (from your nas to your client device). This way you remove your internet performance out of the equation, when all you wanted to do was test your local networking speed, whether it be wireless or wired performance.

thats not to say you can't use this app to test internetspeed. If you're hosting this on your own server offsite, you can try login to there via vpn then run the apps test. Now you can test the internet performance speed from your client to your offsite server hosting the app. I never did this myself but seems like another useful use case for it. But if you are testing your internet, you're better off just using speedtest since they have many servers at different locations available and it's free. but if you are testing to your own server to test your own performance to that server then this should be fine for that case.


*alternatively you can use the qpkg app found at myqnap if you prefer
https://www.myqnap.org/product/speedtest81/


Installation (using portainer)

Step1:

Have Portainer installed up and running (or container station if you prefer). Refer to my other guide if u don't have this yet.



step2:

In portainer to go app templates > custom templates

now you need to add a docker compose. But where do you get that from


the app page is here
https://hub.docker.com/r/openspeedtest/latest

But all they give you is a docker run command

Code: Select all

sudo docker run --restart=unless-stopped --name openspeedtest -d -p 3000:3000 -p 3001:3001
But we need docker compose so how? So what we need to do is, insert that code into here
https://www.composerize.com

Then this pops out as a result

Code: Select all

version: '3.3'
services:
    latest:
        restart: unless-stopped
        container_name: openspeedtest
        ports:
            - '3000:3000'
            - '3001:3001'
        image: openspeedtest/latest
Copy that into the custom template and save. Once done, select that template and click deploy.


step3:

A this point now you should have a working openspeedtest docker app running. To access the web url, it will be http://your nas ip:3000 or https://your nas ip:3001


If you are done testing, feel free to stop the app in portainer. Otherwise, upon qnap nas restart, the app will start up again, unless you manually stop the app at least once.

step4: extra tip - optional

And if you had used my dashy docker app, you can add an item there for your openspeedtest. Basically now you got a fancy gui bookmark to remember the url for this speedtest



step5: usage

If i am testing wifi speed from my mobile device to the QNAP NAS (hosting this app), i will open browser from the android mobile device, go to dashy, click the openspeedtest item link then run it. The result is my wifi speed to the nas.

If i am testing wired speed from desktop to the QNAP NAS, i open a browser, same thing with dashy etc.... Run the test. Then you get your result.




Openspeedtest is a nice way to get an accurate wired and wireless speed test on your lan between your client devices and your QNAP NAS.


I also recommend checking out iperf which is another benchmark tool for testing thoroughput performance for your network performance. If you want a thorough test, use that as well :D
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
r111hb
New here
Posts: 7
Joined: Wed Apr 01, 2020 1:20 am

Re: [GUIDE] Openspeedtest docker - setup using portainer

Post by r111hb »

Thanks for the guide. I get the following portainer error when I try to deploy the container. I think it is because I have another container app (Kuma) that uses port 3000/1 externally. I've tried changing the ports in your template but that generates errors or doesn't work. Any suggestions?

failed to deploy a stack: Network openspeedtest-p_default Creating Network openspeedtest-p_default Created Container openspeedtest Creating Container openspeedtest Created Container openspeedtest Starting Error response from daemon: driver failed programming external connectivity on endpoint openspeedtest (bb81a3dec3ec3f6581a792c37d7ba96e7a66ec965954b3af392784db61fde832): Bind for 0.0.0.0:3001 failed: port is already allocated
User avatar
Moogle Stiltzkin
Guru
Posts: 11448
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: [GUIDE] Openspeedtest docker - setup using portainer

Post by Moogle Stiltzkin »

you can try changing the port on the left side i think and see if that works. It would redirect the port from the left to the right side of the separator :

for myself to deal with conflicting ports, i do that, or i set a static ip using mac vlan in portainer. so then because it has a different lan ip than the QNAP, i won't run into port conflicts.

This is the video guide for setting up macvlans in portainer
https://www.youtube.com/watch?v=o7nn6Tv-PAw

There is another method using proxy. I use Traefik (this is another way to get around port conflict issues)
NAS
[Main Server] QNAP TS-877 (QTS) w. 4tb [ 3x HGST Deskstar NAS & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A (Truenas Core) w. 4x 2TB Samsung F3 (HD203WI) RaidZ1 ZFS + 8gb ddr3 Crucial
[^] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) 2x 4TB Seagate Ironwolf, Raid5
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-253D (Truenas Scale)
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Qotom Pfsense|100mbps FTTH | Win11, Ryzen 5600X Desktop (1x2tb Crucial P50 Plus M.2 SSD, 1x 8tb seagate Ironwolf,1x 4tb HGST Ultrastar 7K4000)


Resources
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin
Post Reply

Return to “Users' Corner”