Tailscale only Yunohost - possible? how to configure?

Hello everyone!

I’ve just managed to install yunohost with the tailscale certificates :slight_smile:

I’ve tested from a fresh install (meaning that my tailscale domain is the first domain I set up at the postinstall), but I don’t see what wouldn’t work if you were to add a domain to an existing installation.

Prerequisites:

  • enable DNS and HTTPS in the Tailscale admin console: Tailscale
  • have tailscale installed, set up and up on the yunohost server

The first step is to get the tailscale domain of your machine. In the admin console, you can retrieve it simply by clicking on its name in the list of machines: Tailscale. It should be in the format [NAME OF THE MACHINE].[YOUR OWN TAILNET NAME].ts.net

Then, create a domain in yunohost using the above-mentioned domain - saying that you already have a domain name.
Alternatively, run as root

yunohost domain add [YOUR TAILSCALE DOMAIN NAME]

Then run the following commands as root on your yunohost server:

cd /etc/yunohost/certs/[YOUR TAILSCALE DOMAIN NAME]
mkdir self-signed
mv *.pem *.cnf self-signed/
tailscale cert --cert-file crt.pem --key-file key.pem [YOUR TAILSCALE DOMAIN NAME]
chown root:metronome crt.pem key.pem
chmod 640 crt.pem key.pem
yunohost service reload nginx

I based this on the manual of tailscale cert and the doc page: Custom certificates | Yunohost Documentation
Basically, we move in the folder where the certificates are stored, we move the self-signed certificates of the domain in a dedicated folder, we call tailscale cert with the proper names for the certificate and the key, we set the proper permissions and reload nginx!

It works perfectly for me :slight_smile:

5 Likes