Skip to content

Commit

Permalink
Merge pull request tailscale-dev#5 from BehnH/main
Browse files Browse the repository at this point in the history
Add Custom control server & fix serve command
  • Loading branch information
Tyler Smalley authored Sep 25, 2024
2 parents 7df01f6 + 9fef33d commit 49dcf43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use to configure it.
| `TAILSCALE_SERVE_PORT` | The port number that you want to expose on your tailnet. This will be the port of your DokuWiki, Transmission, or other container. | `80` |
| `TAILSCALE_SERVE_MODE` | The mode you want to run Tailscale serving in. This should be `https` in most cases, but there may be times when you need to enable `tls-terminated-tcp` to deal with some weird edge cases like HTTP long-poll connections. See [here](https://tailscale.com/kb/1242/tailscale-serve/) for more information. | `https` |
| `TAILSCALE_FUNNEL` | Set this to `true`, `1`, or `t` to enable [funnel](https://tailscale.com/kb/1243/funnel/). For more information about the accepted syntax, please read the [strconv.ParseBool documentation](https://pkg.go.dev/strconv#ParseBool) in the Go standard library. | `on` |
| `TAILSCALE_LOGIN_SERVER` | Set this value if you are using a custom login/control server (Such as headscale) | `https://headscale.example.com`

Something important to keep in mind is that you really should set up a
separate volume for Tailscale state. Here is how to do that with the
Expand Down
5 changes: 5 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-tailscale-up/run
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ if [ -v TAILSCALE_BE_EXIT_NODE ]; then
FLAGS="${FLAGS} --advertise-exit-node=${TS_BE_EXIT_NODE}"
fi

if [ -v TAILSCALE_LOGIN_SERVER ]; then
echo '[!] Using a custom login server'
FLAGS="${FLAGS} --login-server=${TAILSCALE_LOGIN_SERVER}"
fi

tailscale up $FLAGS

# configure serve or funnel
Expand Down

0 comments on commit 49dcf43

Please sign in to comment.