Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Speedtest Tracker

2,279
957
NAS
DS220+ : DS1019+ : DS920+ : DS118 : APC Back UPS ES 700 — Mac/iOS user
Came across this while searching for something. It uses Ookla’s Speedtest cli package and provides charts and scheduling. Very easy to install too.
 
I installed Speedtest Tracker using docker compose method.
Everything works as expected, though I have troubles when DSM's firewall is enabled. I get a 500 server error when trying to access General Settings page of Speedtest Tracker. All other pages work fine and General Settings page appears OK when firewall is disabled.
So, it seems that it is just a matter of correct port rules. I have already an allow rule for ports 8080 and 8443. What else should I allow?

@alex.justesen I searched issues on github and found nothing about this. Any idea please?
 
I installed Speedtest Tracker using docker compose method.
Everything works as expected, though I have troubles when DSM's firewall is enabled. I get a 500 server error when trying to access General Settings page of Speedtest Tracker. All other pages work fine and General Settings page appears OK when firewall is disabled.
So, it seems that it is just a matter of correct port rules. I have already an allow rule for ports 8080 and 8443. What else should I allow?

@alex.justesen I searched issues on github and found nothing about this. Any idea please?

That's the first I've heard of a firewall issue. Feel free to open a GH issue and reference this post with as much detail as possible so I can try and replicate it on my DS920+
 
Hoping y'all can give me some guidance on this one. I want to get this speedtest tracker running on my Synology but I'm not all that familiar with Docker / Container Manager and geting this setup. I've tried following numerous instructions around but I must be missing something.

I can get container manager to download the image
I can run that and create the container
I set all of the environment variables
I add the APP_KEY variable

but as of now I'm getting SQLSTATE[HY000] [2002] Connection refused

am I supposed to setup a database somewhere first?
I must have missed that step

any guidance would be appreciated!
 
I've been playing more with it but here's what I'm doing


From this site I am getting the docker compose and using Container Manager to create a new project and use this .yml file

I did create the APP_KEY using instructions here:

I could not get the part to find local speedtest servers to work. The site says to do this:
docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/speedtest-tracker:latest list-servers

But I get this:
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

So far my docker-compose.yml looks like this - but I get bind mount failed: '/path/to/speedtest-tracker/data' does not exist

services:
speedtest-tracker:
image: lscr.io/linuxserver/speedtest-tracker:latest
container_name: speedtest-tracker
environment:
- PUID=1026
- PGID=100
- TZ=Americas/Chicago
- APP_KEY=my_app_key
- APP_URL=http://192.168.1.113:8080
- DB_CONNECTION=sqlite
- SPEEDTEST_SCHEDULE=0 * * * *
- SPEEDTEST_SERVERS=
volumes:
- /path/to/speedtest-tracker/data:/config
ports:
- 8080:80
restart: unless-stopped
 
But I get this:
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Docker commands via CLI should be run as root so you need to sudo -i to elevate your credentials and than you can run docker run commands fine.

As for the compose issues. This is how the compose should look if you are running it against an already existing SQL container:

YAML:
version: '3.4'
services:
    speedtest-tracker:
        container_name: speedtest
        ports:
            - 8080:80 #change the left value to any port you want that is not in use
        environment:
            - PUID=1000 # needs to be changed to your user "ID" value of your account
            - PGID=1000 # needs to be changed to your group "ID" value of your account
            - DB_CONNECTION=mysql
            - DB_HOST=xxxxxx # IP address or container name that runs SQL
            - DB_PORT=3306 # or any other port that your SQL is running on (left value of the SQL container port) 
            - DB_DATABASE=speedtest # name of the DB
            - DB_USERNAME=username # user account with permissions for the said DB
            - DB_PASSWORD=password # user password with permissions for the said DB
            - APP_TIMEZONE=Europe/Zagreb # time zone format
            - DISPLAY_TIMEZONE=Europe/Zagreb
            - APP_KEY=base64:uru9Dxxxxxxxxxxxxxx # API_KEY as per instructions
            - SPEEDTEST_SCHEDULE=0 0 * * * # can be represented as a cron schedule, same as before.
            - SPEEDTEST_SERVERS="54112" # you can add one or many servers separated by a comma (i.e. "123456,654321,987654").
            - PRUNE_RESULTS_OLDER_THAN=60 # the default is 0 which disables result pruning, this value is in days.
        volumes:
            - /volume1/docker/speedtest:/config # change the left side value (left from ":") to a location on your NAS (it needs to be created up front!)
        image: lscr.io/linuxserver/speedtest-tracker:latest
        restart: unless-stopped

So, this setup depends on a running MYSQL container.

YAML:
version: '3.1'
services:
  db:
    image: mysql:latest
    network_mode: bridge
    command: --authentication_policy=mysql_native_password
    container_name: mysql
    restart: always
    ports:
      - 3306:3306 #change the left value if you want to any other port number that is not in use
    volumes:
      - /volume1/docker/mysql:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: xxxxxxxxxxxxx

Change the root password to any value you want and make sure to configure the volume location (left side again only) to a local location on the NAS of your choice.

Finally, you will need another container to help you maintain the SQL via a web UI. For this run the following:

YAML:
version: '3.1'
services:
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    network_mode: bridge
    container_name: phpmyadmin
    restart: always
    ports:
      - 80:80 #change the left value to any port you want that is not in use
    environment:
      PMA_HOST: 10.20.30.30 # enter the IP address of your NAS
      PMA_PORT: 3306 # enter the port number that you used to configure with your SQL instance (left value if you changed the default)

So run the SQL first, than phpMyAdmin (connect to it using root as username and mysql_root_password value that you have set as its password. Once logged in, create the DB, DB user and DB pass.

After that run the speedtest container with all the values, and connect to the web UI, using the NAS IP address and port 8080 (unless you have changed to something else).
 
Amazing. That worked. The mysql took me a few tries - I needed to create 2 folders - one for the container and then one for the volume referenced in the docker compose. but I'm operational and appreciate this help!!
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Thread Tags

Tags Tags
None

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top