Installing Headscale on POP! OS Latest

Headscale is an open-source implementation of the Tailscale architecture, which provides secure communication between devices over the internet. In this tutorial, we will walk through the steps to install Headscale on POP! OS Latest.

Prerequisites

Before we begin, make sure that you have:

Step 1: Install Dependencies

To install Headscale, we will need to install some dependencies first. Open the terminal and run the following command to update the system's package list:

sudo apt update

Once the update is complete, install the required dependencies by running the following command:

sudo apt install -y curl git clang build-essential iptables \
libseccomp-dev libncurses5-dev bison openssl

These packages are needed for building the Headscale binary.

Step 2: Download and Compile Headscale

We will now download the Headscale source code and compile it. Run the following command in the terminal to clone the Headscale repository.

git clone git://github.com/juanfont/headscale.git

Change the working directory to the cloned repository by running:

cd headscale

Next, compile and install Headscale by running:

make
sudo make install

This will compile the Headscale binary and install it to the system.

Step 3: Configure Headscale

We will now configure Headscale by creating a configuration file. Run the following command in the terminal to create a new configuration file.

sudo nano /etc/headscale/headscale.conf

Add the following contents to the configuration file:

authkey = "your_tailscale_authkey_here"

Replace "your_tailscale_authkey_here" with the Tailscale authentication key for your account.

Save and close the file by pressing Ctrl+X, Y, and then Enter.

Step 4: Start the Headscale Service

We will now start the Headscale service by running:

sudo systemctl start headscale

Check the status of the service by running:

sudo systemctl status headscale

If the service is running, you should see an output similar to this:

● headscale.service - Headscale
     Loaded: loaded (/lib/systemd/system/headscale.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-09-22 16:47:16 IST; 1s ago
    Process: 8969 ExecStart=/usr/local/bin/headscale serve (code=exited, status=0/SUCCESS)
   Main PID: 8970 (headscale)
      Tasks: 4 (limit: 18718)
     Memory: 13.1M
     CGroup: /system.slice/headscale.service
             └─8970 /usr/local/bin/headscale serve

Step 5: Enable the Headscale Service

To enable the Headscale service to start automatically on boot, run the following command:

sudo systemctl enable headscale

Conclusion

Headscale is now installed and running on your POP! OS Latest system. You can now configure your devices to connect to the Headscale network and start communicating securely over the internet.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!