How to Install Inlets on NixOS Latest

Inlets is an open-source tool that allows you to create a secure, encrypted tunnel between two networks. In this tutorial, we'll show you how to install Inlets on NixOS.

Prerequisites

Step 1: Install Inlets

  1. Open a terminal and login to your NixOS server.

  2. Update the package manager using the command below:

    sudo nix-channel --update
    sudo nix-env --upgrade
    
  3. Install inlets using the nix package manager:

    sudo nix-env -iA nixos.inlets
    

Step 2: Generate Token

  1. Create a new project on the inlets website and generate a token.

  2. Copy the token to your clipboard.

Step 3: Start Inlets Server

  1. Start the inlets server using the following command:

    inlets server --token [YOUR_TOKEN]
    

    Replace [YOUR_TOKEN] with the token you generated in the previous step.

Step 4: Connect Client to Server

  1. Install inlets on your client machine using the same process used for the server.

  2. To connect to the server, use the following command:

    inlets client --remote "ws://[SERVER_IP]:8000" --upstream "http://localhost:80"
    

    Replace [SERVER_IP] with the IP address of your server.

Conclusion

In summary, Inlets provides an easy way to create a secure, encrypted tunnel between two networks. By following these steps, you can quickly install and use Inlets on your NixOS server.

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!