|
| 1 | +# Tailscale |
| 2 | + |
| 3 | +Tailscale can be used as an sidecar container to access the Speedtest Tracker within your Tailnet on its own MagicDNS name.  |
| 4 | + |
| 5 | +## Tailscale Auth key  |
| 6 | + |
| 7 | +Generate an auth key for tailscale so the docker container can access your tailnet. |
| 8 | + |
| 9 | +1. Open the [**Keys**](https://login.tailscale.com/admin/settings/keys) page of the admin console. |
| 10 | +2. Select **Generate auth key**. |
| 11 | +3. Fill out the form fields to specify characteristics about the auth key, such as the description, whether its reusable, when it expires, and device settings. |
| 12 | +4. Select **Generate key**. |
| 13 | + |
| 14 | +Save this Auth Key. We will need this later on. |
| 15 | + |
| 16 | +## Docker Configuration |
| 17 | + |
| 18 | +Docker-Compose: |
| 19 | + |
| 20 | +```yaml |
| 21 | +services: |
| 22 | + tailscale-speedtest: |
| 23 | + image: tailscale/tailscale |
| 24 | + container_name: tailscale_speedtest-tracker |
| 25 | + hostname: speedtest |
| 26 | + environment: |
| 27 | + - TS_AUTHKEY= |
| 28 | + - TS_STATE_DIR=/var/lib/tailscale |
| 29 | + - TS_USERSPACE=false |
| 30 | + volumes: |
| 31 | + - ./tailscale-traefik/state:/var/lib/tailscale |
| 32 | + - /dev/net/tun:/dev/net/tun |
| 33 | + cap_add: |
| 34 | + - net_admin |
| 35 | + - sys_module |
| 36 | + restart: unless-stopped |
| 37 | + |
| 38 | + speedtest-tracker: |
| 39 | + container_name: speedtest-tracker-tailscale |
| 40 | + depends_on: |
| 41 | + - tailscale-speedtest |
| 42 | + network_mode: service:tailscale-speedtest |
| 43 | + environment: |
| 44 | + - PUID=1000 |
| 45 | + - PGID=1000 |
| 46 | + - APP_KEY= |
| 47 | + - DB_CONNECTION=sqlite |
| 48 | + - SPEEDTEST_SCHEDULE= |
| 49 | + - SPEEDTEST_SERVERS= |
| 50 | + - PRUNE_RESULTS_OLDER_THAN= |
| 51 | + - CHART_DATETIME_FORMAT= |
| 52 | + - DATETIME_FORMAT= |
| 53 | + - APP_TIMEZONE= |
| 54 | + - APP_URL=speedtest.yourtailnet.ts.net # Change this to your MagicDNS name |
| 55 | + - ASSET_URL=speedtest.yourtailnet.ts.net # Change this to your MagicDNS name |
| 56 | + volumes: |
| 57 | + - /path/to/data:/config |
| 58 | + - /path/to-custom-ssl-keys:/config/keys |
| 59 | + image: lscr.io/linuxserver/speedtest-tracker:latest |
| 60 | + restart: unless-stopped |
| 61 | +``` |
| 62 | +
|
| 63 | +| Added compose part | Description | |
| 64 | +| ------------------ | --------------------------------------------------------------------------------------- | |
| 65 | +| `APP_URL` | URL you want to access the WebGui on. This will need to be the Tailscale Magic DNS name | |
| 66 | +| `ASSET_URL` | URL used for loading all the needed assets. Need to be the same as the `APP_URL`. | |
| 67 | +| `TS_AUTHKEY` | Auth key for Tailscale | |
0 commit comments