|
20 | 20 |
|
21 | 21 | Docker images are automatically published on when releases are tagged. |
22 | 22 |
|
23 | | -```bash |
24 | | -# to use the latest image |
25 | | -$ docker pull ghcr.io/tailscale/tsidp:latest |
26 | | - |
27 | | -# to use a specific release version |
28 | | -$ docker pull ghcr.io/tailscale/tsidp:v0.0.2 |
29 | | -``` |
30 | | - |
31 | | -Running a tsidp container: |
32 | | - |
33 | 23 | > [!TIP] |
34 | 24 | > Replace `YOUR_TAILSCALE_AUTHKEY` with your Tailscale authentication key in the following commands: |
35 | 25 | > |
36 | 26 | > Use an existing auth key or create a new auth key in the [Tailscale dashboard](https://login.tailscale.com/admin/settings/keys). Ensure you select an existing [tag](https://tailscale.com/kb/1068/tags) or create a new one. |
37 | 27 |
|
38 | | -```bash |
39 | | -# Run tsidp with a persistent volume to store state |
40 | | -docker run -d \ |
41 | | - --name tsidp \ |
42 | | - -p 443:443 \ |
43 | | - -v tsidp-data:/data \ |
44 | | - -e TAILSCALE_USE_WIP_CODE=1 \ |
45 | | - -e TS_STATE_DIR=/data \ |
46 | | - -e TS_HOSTNAME=idp \ |
47 | | - -e TSIDP_ENABLE_STS=1 \ |
48 | | - ghcr.io/tailscale/tsidp:latest |
| 28 | +Here is an example [docker compose](https://docs.docker.com/compose/) YAML file for tsidp: |
| 29 | + |
| 30 | +```yaml |
| 31 | +services: |
| 32 | + tsidp: |
| 33 | + container_name: tsidp |
| 34 | + image: ghcr.io/tailscale/tsidp:latest |
| 35 | + volumes: |
| 36 | + - tsidp-data:/data |
| 37 | + environment: |
| 38 | + - TAILSCALE_USE_WIP_CODE=1 # tsidp is experimental - needed while version <1.0.0 |
| 39 | + - TS_STATE_DIR=/data # store persistent tsnet and tsidp state |
| 40 | + - TS_HOSTNAME=idp # Hostname on tailnet (becomes idp.your-tailnet.ts.net) |
| 41 | + - TSIDP_ENABLE_STS=1 # Enable OAuth token exchange |
| 42 | + # Optional: Tailscale auth key for automatic node registration |
| 43 | + # - TS_AUTHKEY=tskey-auth-xxxxx |
| 44 | +volumes: |
| 45 | + tsidp-data: |
49 | 46 | ``` |
50 | 47 |
|
51 | | -Visit `https://idp.yourtailnet.ts.net` to confirm the service is running. |
| 48 | +Paste the YAML snippet above into a file named `compose.yaml`. Once the compose file has been edited to your satisfaction, start tsidp by issuing `docker compose up -d`. Monitor the result with `docker compose logs -f`. |
| 49 | + |
| 50 | +Once tsidp has started, visit `https://idp.yourtailnet.ts.net` in a browser to confirm the service is running. |
52 | 51 |
|
53 | 52 | > [!NOTE] |
54 | 53 | > If you're running tsidp for the first time it may take a few minutes for the TLS certificate to generate. You may not be able to access the service until the certificate is ready. |
|
0 commit comments