Inlets is a powerful tool for exposing local services to the internet, making it ideal for developers who want to host their applications on their own servers. In this tutorial, we will guide you through how to install Inlets on FreeBSD Latest.
In order to install Inlets, we need to first install Go on our FreeBSD machine.
Connect to your FreeBSD machine using your preferred method (SSH, console, etc.).
Update your system's package list and upgrade any existing packages by running the following commands:
# pkg update
# pkg upgrade
Install Go by running the following command:
# pkg install -y go
Now that we have Go installed, we can proceed with installing Inlets.
Make sure you are still connected to your FreeBSD machine.
Install Inlets by running the following command:
# GO111MODULE=on go get github.com/inlets/inlets
After installing Inlets, we need to configure it before we can use it to expose our local services.
Create a configuration file for Inlets by running the following command:
# mkdir ~/.inlets && touch ~/.inlets/config.yaml
Open the configuration file in your preferred text editor and add the following lines:
up:
domain: yourdomain.com
token: yourtoken
Replace yourdomain.com
with the domain you want to use for accessing your local services, and yourtoken
with a unique token of your choice.
Save the configuration file and exit the text editor.
Now that we have Inlets configured, we can run it to expose our local services.
Run the following command to start the Inlets server:
# inlets server --auto-tls=true --port=443 --token=yourtoken --tcp-ports=80
Replace yourtoken
with the token you chose in Step 3.
In another terminal window, run the following command to connect Inlets to your local service:
# inlets client --auto-tls=true --remote=yourdomain.com --upstream=http://localhost:80
Replace yourdomain.com
with the domain you chose in Step 3, and http://localhost:80
with the URL of your local service.
Congratulations, you have successfully installed and configured Inlets on your FreeBSD Latest server. You can now use Inlets to expose your local services to the internet using a secure tunnel.
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!
Alternatively, for the best virtual desktop, try Shells!