|
| 1 | +--- |
| 2 | +description: >- |
| 3 | + Speedtest Tracker can be run on a variety of platforms, the preferred platform |
| 4 | + is Docker. |
| 5 | +--- |
| 6 | + |
| 7 | +# Copy of Installation |
| 8 | + |
| 9 | +These steps will run you through setting up the application using Docker and Docker Compose. |
| 10 | + |
| 11 | +### Install with Docker |
| 12 | + |
| 13 | +{% stepper %} |
| 14 | +{% step %} |
| 15 | +### Setup Docker Compose |
| 16 | + |
| 17 | +Setting up your environment with Docker Compose is the recommended way as it'll setup the application and a database for you. SQLite is fine for most installs but we also provide instructions for setting up MariaDB, MySQL and Postgres should you prefer those database drivers. |
| 18 | + |
| 19 | +If you would like to provide your own SSL keys, they must be named `cert.crt` (full chain) and `cert.key` (private key), and mounted in the container folder `/config/keys`. |
| 20 | + |
| 21 | +{% tabs %} |
| 22 | +{% tab title="SQLite" %} |
| 23 | +```yaml |
| 24 | +services: |
| 25 | + speedtest-tracker: |
| 26 | + image: lscr.io/linuxserver/speedtest-tracker:latest |
| 27 | + restart: unless-stopped |
| 28 | + container_name: speedtest-tracker |
| 29 | + ports: |
| 30 | + - 8080:80 |
| 31 | + - 8443:443 |
| 32 | + environment: |
| 33 | + - PUID=1000 |
| 34 | + - PGID=1000 |
| 35 | + - APP_KEY= |
| 36 | + - DB_CONNECTION=sqlite |
| 37 | + - SPEEDTEST_SCHEDULE= # Optional |
| 38 | + - SPEEDTEST_SERVERS= # Optional |
| 39 | + - DATETIME_FORMAT= |
| 40 | + - APP_TIMEZONE= |
| 41 | + volumes: |
| 42 | + - /path/to/data:/config |
| 43 | + - /path/to-custom-ssl-keys:/config/keys |
| 44 | + |
| 45 | +``` |
| 46 | +{% endtab %} |
| 47 | + |
| 48 | +{% tab title="MariaDB/MySQL" %} |
| 49 | +```yaml |
| 50 | +services: |
| 51 | + speedtest-tracker: |
| 52 | + image: lscr.io/linuxserver/speedtest-tracker:latest |
| 53 | + restart: unless-stopped |
| 54 | + container_name: speedtest-tracker |
| 55 | + ports: |
| 56 | + - 8080:80 |
| 57 | + - 8443:443 |
| 58 | + environment: |
| 59 | + - PUID=1000 |
| 60 | + - PGID=1000 |
| 61 | + - APP_KEY= |
| 62 | + - DB_CONNECTION=mysql |
| 63 | + - DB_HOST=db |
| 64 | + - DB_PORT=3306 |
| 65 | + - DB_DATABASE=speedtest_tracker |
| 66 | + - DB_USERNAME=speedy |
| 67 | + - DB_PASSWORD=password |
| 68 | + - SPEEDTEST_SCHEDULE= |
| 69 | + - SPEEDTEST_SERVERS= |
| 70 | + - PRUNE_RESULTS_OLDER_THAN= |
| 71 | + - CHART_DATETIME_FORMAT= |
| 72 | + - DATETIME_FORMAT= |
| 73 | + - APP_TIMEZONE= |
| 74 | + volumes: |
| 75 | + - /path/to/data:/config |
| 76 | + - /path/to-custom-ssl-keys:/config/keys |
| 77 | + depends_on: |
| 78 | + - db |
| 79 | + db: |
| 80 | + image: mariadb:10 |
| 81 | + restart: always |
| 82 | + environment: |
| 83 | + - MARIADB_DATABASE=speedtest_tracker |
| 84 | + - MARIADB_USER=speedy |
| 85 | + - MARIADB_PASSWORD=password |
| 86 | + - MARIADB_RANDOM_ROOT_PASSWORD=true |
| 87 | + volumes: |
| 88 | + - speedtest-db:/var/lib/mysql |
| 89 | +volumes: |
| 90 | + speedtest-db: |
| 91 | +``` |
| 92 | +{% endtab %} |
| 93 | +
|
| 94 | +{% tab title="Postgres" %} |
| 95 | +```yaml |
| 96 | +services: |
| 97 | + speedtest-tracker: |
| 98 | + image: lscr.io/linuxserver/speedtest-tracker:latest |
| 99 | + restart: unless-stopped |
| 100 | + container_name: speedtest-tracker |
| 101 | + ports: |
| 102 | + - 8080:80 |
| 103 | + - 8443:443 |
| 104 | + environment: |
| 105 | + - PUID=1000 |
| 106 | + - PGID=1000 |
| 107 | + - APP_KEY= |
| 108 | + - DB_CONNECTION=pgsql |
| 109 | + - DB_HOST=db |
| 110 | + - DB_PORT=5432 |
| 111 | + - DB_DATABASE=speedtest_tracker |
| 112 | + - DB_USERNAME=speedy |
| 113 | + - DB_PASSWORD=password |
| 114 | + - SPEEDTEST_SCHEDULE= |
| 115 | + - SPEEDTEST_SERVERS= |
| 116 | + - PRUNE_RESULTS_OLDER_THAN= |
| 117 | + - CHART_DATETIME_FORMAT= |
| 118 | + - DATETIME_FORMAT= |
| 119 | + - APP_TIMEZONE= |
| 120 | + volumes: |
| 121 | + - /path/to/data:/config |
| 122 | + - /path/to-custom-ssl-keys:/config/keys |
| 123 | + depends_on: |
| 124 | + - db |
| 125 | + db: |
| 126 | + image: postgres:17 |
| 127 | + restart: always |
| 128 | + environment: |
| 129 | + - POSTGRES_DB=speedtest_tracker |
| 130 | + - POSTGRES_USER=speedy |
| 131 | + - POSTGRES_PASSWORD=password |
| 132 | + volumes: |
| 133 | + - speedtest-db:/var/lib/postgresql/data |
| 134 | +volumes: |
| 135 | + speedtest-db: |
| 136 | +``` |
| 137 | +{% endtab %} |
| 138 | +{% endtabs %} |
| 139 | +{% endstep %} |
| 140 | +
|
| 141 | +{% step %} |
| 142 | +#### Setting Environment Variables |
| 143 | +
|
| 144 | +In order for the application to run smoothly, some environment variables need to be test.   |
| 145 | +
|
| 146 | +<table><thead><tr><th width="218">Name</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>APP_KEY</code></td><td><p>Key used to encrypt and decrypt data.</p><p>You can generate a key at <a href="https://speedtest-tracker.dev">https://speedtest-tracker.dev</a>.</p></td><td><code>base64:ZoOYTjS+LBwFtud8SArwhiw8V4Qi9J+MPiT7z8XjfMo=</code><br>(DONT USE THIS EXAMPLE)</td></tr><tr><td><code>APP_TIMEZONE</code></td><td>Application timezone should be set if your database does not use UTC as its default timezone.</td><td><code>Europe/London</code></td></tr><tr><td><code>DISPLAY_TIMEZONE</code></td><td>Display timestamps in your local time.</td><td><code>Europe/London</code></td></tr></tbody></table> |
| 147 | +
|
| 148 | +
|
| 149 | +{% endstep %} |
| 150 | +{% endstepper %} |
| 151 | +
|
| 152 | +
|
| 153 | +
|
| 154 | +
|
| 155 | +
|
| 156 | +Optionally you can set a schedule for automatic speedtest. Check out the tips for the best schedule [here](../help/faqs.md#cron-schedule-from-a-minute-or-hour).  |
| 157 | +
|
| 158 | +{% hint style="info" %} |
| 159 | +Complete overview of the Environment Variables for custom configuration can be found [here](environment-variables.md) |
| 160 | +{% endhint %} |
| 161 | +
|
| 162 | +### Install with Kubernetes |
| 163 | +
|
| 164 | +Check out this amazing community kubernetes manifest to get you started. |
| 165 | +
|
| 166 | +{% embed url="https://github.com/maximemoreillon/kubernetes-manifests/tree/master/speedtest-tracker" %} |
0 commit comments