4 KiB
title | date | description | featured | draft | toc | usePageBundles | codeLineNumbers | series | tags | comment | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tailscale golink: Private Shortlinks for your Tailnet | 2023-01-08T13:51:42-06:00 | How to deploy Tailscale's golink service in a Docker container. | false | true | true | true | false | Tips |
|
true |
I've shared in the past about how I use custom search engines in Chrome as quick web shortcuts. And I may have mentioned my love for Tailscale a time or two as well. Well I recently learned of a way to combine these two passions: Tailscale golink. The golink announcement poston the Tailscale blog offers a great overview of the service:
Using golink, you can create and share simple go/name links for commonly accessed websites, so that anyone in your network can access them no matter the device they’re on — without requiring browser extensions or fiddling with DNS settings. And because golink integrates with Tailscale, links are private to users in your tailnet without any separate user management, logins, or security policies.
And these go links don't have to be simply static shortcuts; the system is able to leverage go templates to conditionally insert text into the target URL - similar to my custom search engine setup. The Tailscale blog also has some clever suggestions on how to use this capability.
Sounds great - but how do you actually make golink available on your Tailnet? Well, here's what I did to deploy the golink Docker image on a Photon OS VM I set up running on my Quartz64 running ESXi-ARM.
Tailnet prep
There are two things I'll need to do in the Tailscale admin portal before moving on.
Create an ACL tag
I'm going to be deploying the golink Docker image on a Photon OS VM I set up running on my Quartz64 running ESXi-ARM. The golink repo offers this command for running the container:
docker run -it --rm ghcr.io/tailscale/golink:main
The doc also indicates that I can pass a Tailscale auth key to the golink service via the TS_AUTHKEY
environment variable, and that all the configuration will be stored in /home/nonroot
(which will be owned by uid/gid 65532
). I'll take this knowledge and use it to craft a docker-compose.yml
to simplify container management.
mkdir -p golink/data
cd golink
chmod 65536:65563 data
vi docker-compose.yaml
# golink docker-compose.yaml
version: '3'
services:
golink:
container_name: golink
restart: unless-stopped
image: ghcr.io/tailscale/golink:main
environment:
- TS_AUTHKEY: MY_TS_AUTHKEY
volumes:
- './data:/home/nonroot'
I'll need to create a new authentication key from the Tailscale admin portal.