How to Install Inlets on Ubuntu Server Latest
Inlets is a reverse proxy and tunneling tool that helps you expose local services to the internet. In this tutorial, we will guide you through the installation of Inlets on an Ubuntu Server Latest.
Prerequisites
Before you start, you need to have the following:
- An Ubuntu Server Latest with root/sudo privileges
- A domain name that points to your server's IP address
- A running HTTP server on your server (e.g., Nginx or Apache)
Step 1: Install Inlets
Start by logging in to your server as a
rootuser.Use the
curlcommand to download the Inlets binary from the official website.$ curl -sLS https://inlets.dev/get | shThis will create a new directory called
inletsin your current working directory and download the latest version of the Inlets binary to this directory.Move the Inlets binary to the
/usr/local/bindirectory so that it can be accessed by all users.$ sudo mv inlets /usr/local/bin
Step 2: Create a Systemd Service for Inlets
Create a new systemd unit file for Inlets.
$ sudo nano /etc/systemd/system/inlets.serviceInsert the following contents into the unit file.
[Unit] Description=Inlets server After=network.target [Service] User=root ExecStart=/usr/local/bin/inlets server --auto-tls --port=80 --token=YOUR_TOKEN --upstream=http://localhost:8080 Restart=always [Install] WantedBy=multi-user.target- Replace
YOUR_TOKENwith a random string that will act as your authentication token. - Replace
http://localhost:8080with the address and port of the service you want to expose.
- Replace
Save and close the file.
Reload the systemd daemon.
$ sudo systemctl daemon-reloadEnable and start the Inlets service.
$ sudo systemctl enable inlets.service $ sudo systemctl start inlets.serviceVerify that the service is running without errors.
$ sudo systemctl status inlets.service
Step 3: Expose Your Local Service to the Internet
Install the Inlets client on your local machine.
You can find the client installation instructions for your operating system here (https://docs.inlets.dev/#/tools/inlets-clients).
Start the Inlets client and connect it to your server.
$ inlets client connect --url wss://YOUR_DOMAIN:443 --token YOUR_TOKEN- Replace
YOUR_DOMAINwith your server's domain name. - Replace
YOUR_TOKENwith the authentication token you used in the systemd unit file.
- Replace
Verify that your local service is accessible over the internet by visiting your server's domain name.
Congratulations! You have successfully installed Inlets on Ubuntu Server Latest and exposed your local service to the internet using Inlets.