I am using golink
from Tailscale to manage bookmarks
for commonly used services. At its simplest, it remaps
a URL of something like go/gmail/ to https://mail.google.com .
At the most complicated, it will do a limited amount of
address rewriting based on the path you give. The application
is small and has modest needs, enough so that it fits
easily on a Raspberry Pi 4 that has other things going on.
https://github.com/tailscale/golink
I had previously heard of fly.io
as a place to host
containerized applications. You get a teeny tiny Firecracker
based microVM connected to a Wireguard network, hosted
by a network that's in multiple data centers around the
world. If you need performance in multiple regions,
you can leverage their Anycast infrastructure. It's pretty
nifty all in all.
https://fly.io/docs/reference/architecture/
golink
helpfully comes with instructions on how to run
on fly.io
. They assume a little bit of familiarity
with the system, which is easy to gain by poking at it a
little. Very helpfully, the combination of the application
and Tailscale means that you can deploy this microVM without
a globally routed IPv4 address, and then access the golink
service on it over your Tailscale network. It's a nice
way to extend your private Tailnet one function at a time,
and the golink
service very easily fits into the free tier
offering with lots of room to spare.
https://github.com/tailscale/golink/issues/63
The one catch: how do you migrate your data into this system?
Helpfully, golink
has a REST based API both for downloading
an existing database and for creating new links. What was missing
was an export-import or clone function that was based on the API.
jq -c '[.Short,.Long]' go.export.json | sed -e 's/^\[/curl -d short=/' -e 's/,/ -d long=/' -e 's/\]$/ go-1/' > import.sh
The above code takes an export file from golink
and
munges it into a script that can be run to import
the data into your new instance. Caveat: you will lose
reference counts, you'll lose link attribution if you
have more than one user, and basically you'll be starting
over. But if that's OK this is a quick restart to get going again.
fly.io
has nice charts and graphs to keep you as aware
as you want to be able application system usage. It has
a comprehensive CLI, flyctl
, which looks like it should
let you script pretty much anything you'd want to handle
from the command line. An hour into my effort I had something
running and working within the free trial tier. I'll be
looking for more sorts of services to host this way.