Installing and Manually Controlling Tailscale on Ubuntu 22.04
Refer: https://www.howtogeek.com/how-to-remote-access-your-network-using-tailscale-vpn/
NOTE: Headscale is the open source implementation of Tailscale to avoid using the Tailscale's server.
This guide will walk you through installing Tailscale on Ubuntu 22.04, preventing it from running automatically, and starting/stopping it manually as needed.
- Install Tailscale
It would be better to refer to their website:
https://tailscale.com/kb/1031/install-linux
First, update your system and install Tailscale using the following commands:
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt-get update
sudo apt-get install tailscale
- Authenticate Tailscale
Once installed, you'll need to authenticate your device with Tailscale. Run:
sudo tailscale up
A URL will be provided; open it in your browser to log in and authenticate your device with your Tailscale account.
You're connected! You can find your Tailscale IPv4 address by running:
tailscale ip -4
- Disable Automatic Startup
By default, Tailscale runs automatically on boot. If you prefer to control when it runs, disable the automatic startup by executing:
sudo systemctl disable tailscaled
This will stop Tailscale from starting every time your system boots.
- Manually Start and Stop Tailscale
You can now manually control when Tailscale starts and stops. Use the following commands:
Start Tailscale:
sudo systemctl start tailscaled
sudo tailscale up
Stop Tailscale:
sudo tailscale down
sudo systemctl stop tailscaled
- Check Tailscale Status (Optional)
If you want to check whether Tailscale is running, use the command below:
sudo systemctl status tailscaled
This will show you the current status of the Tailscale service, including whether it is active, inactive, or stopped.
Now you can manually control Tailscale on your Ubuntu 22.04 system.
Uninstall Tailscale
Stop the Tailscale Service
sudo systemctl stop tailscaled
Remove application
sudo apt remove tailscale
Remove any configuration files
sudo apt purge tailscale
Optional Removal of Dependencies
sudo apt autoremove
Verify removal
which tailscale