Recently I've been testing OpenSUSE Kalpa, one of the recent batch of immutable operating systems. One of the first things I wanted to setup was Tailscale so that the laptop could connect back into my home network. For anyone unfamiliar, Tailscale is a really cool product for doing mesh VPNs.
The following instructions should work on any system with distrobox
available, but it's especially useful for Kalpa and other immutable operating systems.
There's no official instructions for getting things going with distrobox, but thankfully it takes basically no effort.
Installing Tailscale
First, you need to create a new root distrobox with init system support:
distrobox create --root --name tailscale --image registry.opensuse.org/opensuse/tumbleweed:latest --init --additional-packages "systemd"
distrobox enter --root tailscale
Since this is a root distrobox, you'll be asked for a password for access to the distrobox. Once you're fully inside the distrobox, follow the normal installation instructions.
sudo rpm --import https://pkgs.tailscale.com/stable/opensuse/tumbleweed/repo.gpg
sudo zypper ar -g -r https://pkgs.tailscale.com/stable/opensuse/tumbleweed/tailscale.repo
sudo zypper ref
sudo zypper in tailscale
sudo systemctl enable --now tailscaled
# Expose the binaries to the host system
distrobox-export --bin /bin/tailscale --sudo
Now you can drop back out of the distrobox container and use tailscale
as normal, eg. tailscale up
to login and get setup.
Caveats
The only major issue I've found is that any time you use the tailscale
binary, you will be greeted with two different sudo
prompts. One to get into the distrobox, and then one to actually run tailscale
with sudo.
Anywhere you see sudo tailscale
in the documentation, you can just use tailscale
instead. Distrobox will install the binary stub into your local user account and deal with sudo for you. If you try to use sudo yourself, then it's likely that it won't be able to find the stub since it's installed into your home folder.
This setup will not start on boot, but will start when the distrobox starts. If you want it to start on boot you should be able to start the distrobox at login using a systemd service.
Top comments (0)