Switch from the local network to Tailscale
This page explains how to change the way the devices reach BiblioViva, from the school's local network to Tailscale, to get the camera, the installation on the phone and use from outside the school. At the end the reverse path is described. The data stay: patrons, books, loans, photos and settings are not touched.
- Time: about 30 minutes, plus the time to put Tailscale on the devices.
- Requirements: the terminal of the BiblioViva computer (see Connect to the computer), a school
Tailscale account and the
adminaccount of BiblioViva for the backup. - BiblioViva stays down for a few minutes during the switch: do it when nobody is working at the desk.
Procedure
Make a backup
- Make a backup with Back up now, as described in the section Make a backup now of the step Backups.
Prepare Tailscale
- Carry out the "With Tailscale" part of the step Prepare the network: the school's account, the
HTTPS certificates, the computer's tag and the access key. At the end the key, which starts with
tskey-auth-, and the name of the school's network, which ends in.ts.net, are needed.
Change the way of connecting
-
Open the terminal of the BiblioViva computer.
-
Copy the following command, paste it and press Enter. The
--network tailscaleoption tells the installation program to change the way of connecting of an installation that already exists;--lang enmakes it write in English.curl -fsSL https://raw.githubusercontent.com/itotm/biblioviva/main/setup.sh | bash -s -- --lang en --network tailscale -
The program recognises the installation and writes that the data stay.
BiblioViva is already installed in /home/<user>/biblioviva (lan): updating. Changing the way of connecting: from lan to tailscale. The data stay. -
When the program asks for the key, paste it and press Enter. It is the only question: the kind of computer and the rest stay as they were.
Paste the Tailscale auth key (it starts with tskey-auth-): -
Wait for "BiblioViva is ready." and note down the address
https://biblioviva.<tailnet>.ts.netthat the program writes. The first opening can take a few seconds.
Put Tailscale on the devices
- Install Tailscale and sign in with the school's account on every device that uses BiblioViva, as described in the section Install Tailscale of the step Connect the devices.
- Replace in the bookmarks and the shortcuts the address
http://…:8080with the one the program wrote: the old one no longer works. - Sign in to BiblioViva again with one's own account, because the address is another.
The reverse: from Tailscale to the local network
-
Prepare the local network: the address reserved for the computer, as in the step Prepare the network, local network variant.
-
In the terminal of the BiblioViva computer, run the following command. The program asks nothing.
curl -fsSL https://raw.githubusercontent.com/itotm/biblioviva/main/setup.sh | bash -s -- --lang en --network lan -
Note down the addresses
http://biblioviva.local:8080andhttp://<address>:8080that the program writes. -
Delete from the Tailscale console the
bibliovivamachine, which stays in the list but offline, as described in the section With Tailscale: free the name of Move BiblioViva to another computer.
On the local network the camera, the installation as an application and access from outside the school no longer work; the USB barcode scanner and the rest of BiblioViva keep working. The comparison is in Choose the network.
Result
BiblioViva answers at the Tailscale address, with the same data as before. With Tailscale the camera starts where it is needed (patron photos, covers).
Possible problems
- The program does not write "Changing the way of connecting…" but asks the questions of the initial installation: the
bibliovivafolder is not that of the user connected with. Use the same user as the installation. - "The node is on the tailnet, but HTTPS certificates are off…": turn on "HTTPS Certificates" on the "DNS" page of the Tailscale console and run the command again (see Install BiblioViva).
- The command does not accept the options: the text
bash -s --before the options serves to pass them to the program; copy the command in full.