# alexjustesen - speedtest-tracker This is a [Docker](/wiki/docker.md) container for a selfhosted internet speed tracker. The official container and documentation was made by [alexjustesen](https://github.com/alexjustesen/speedtest-tracker). ## Set-up Create the file `rebuild.sh`. Change the settings according to your needs and run `./rebuild.sh` afterwards. It is important to set a correct app key as described in [the following section](#environment-variables). ### Environment-variables Set the following variables with the -e tag. | Name | Usage | Default | | -------------------- | -------------------------------------------------------------------------------------------------- | --------------- | | `APP_KEY` | This is used for encryption and can be generated by `echo -n 'base64:'; openssl rand -base64 32;` | | | `DB_CONNECTION` | Database connection type | | | `PGID` | Group ID | | | `PUID` | User ID | | | `APP_TIMEZONE` | Timezone of the app | `Europe/London` | | `DISPLAY_TIMEZONE` | Timezone of the display | `Europe/London` | | `SPEEDTEST_SCHEDULE` | Cron-formatted schedule for speedtest (`6 */6 * * *`: 6 minutes after every 6th hour) | | ### Volumes Set the following volumes with the -v tag. | Outside mount/volume name | Container mount | Description | | ------------------------- | --------------- | -------------------- | | `speedtest_config` | `/config` | storage for config | | `speedtest_keys` | `/config/keys` | storage for ssl keys | ### Ports Set the following ports with the -p tag. | Container Port | Recommended outside port | Protocol | Description | | -------------- | ------------------------ | -------- | ------------------------- | | `80` | `8765` | TCP | WebUI | | `443` | `` | TCP | SSL-encrypted WebUI | ### rebuild.sh ```sh #!/bin/sh docker stop speedtest docker rm speedtest docker pull lscr.io/linuxserver/speedtest-tracker:latest docker run --name speedtest \ --restart unless-stopped \ -p 8765:80 \ -e PUID=1000 \ -e PGID=1000 \ -e APP_KEY="" \ -e DB_CONNECTION=sqlite \ -e SPEEDTEST_SCHEDULE="6 */6 * * *" \ -e APP_TIMEZONE="Europe/Berlin" \ -e DISPLAY_TIMEZONE="Europe/Berlin" \ -v speedtest_config:/config \ -v speedtest_keys:/config/keys \ -d lscr.io/linuxserver/speedtest-tracker:latest ```