Put a service that runs on your device online in a few minutes: copy your AuthToken, start the Localtonet client with it, then create and start a tunnel in the dashboard.
Before you start #
- A Localtonet account. Create one for free, or sign in with Google or GitHub.
- A service that is already running on your device, for example a web app that listens on port 3000.
Steps #
-
Copy your AuthToken #
The AuthToken connects a device to your account. Open the Dashboard and select Copy on the AuthToken card. All your tokens are listed under My Tokens.
Keep your token private. It allows the Localtonet client to connect as this device.
-
Install and start the client #
Install Localtonet on the device that runs your service and start it with your token. Replace
<YOUR_TOKEN>with the token you copied.Windows
Download a Windows build from the Downloads page and extract it. Open Command Prompt in the folder that contains
localtonet.exe, then run:Command Promptlocaltonet --authtoken <YOUR_TOKEN>In PowerShell, write
.\localtonetinstead oflocaltonet.macOS
Install with Homebrew from the Localtonet tap, then start the client:
Bashbrew tap localtonet/tap brew install localtonet localtonet --authtoken <YOUR_TOKEN>Linux
The install script detects your CPU and operating system, downloads the matching build and installs it to
/usr/local/bin/localtonet:Bashcurl -fsSL https://localtonet.com/install.sh | sh localtonet --authtoken <YOUR_TOKEN>Docker
Pull the official image and pass your token to the container:
Bashdocker pull localtonet/localtonet docker run localtonet/localtonet --authtoken <YOUR_TOKEN>Android
Install Localtonet from Google Play. To sign in, open My Tokens in the dashboard, choose to connect the device, then scan the QR code with the app or enter the PIN. You can also paste the token into the app.
Leave the client running. A tunnel only works while the client of its device is connected.
-
Create a tunnel #
For a web app, open My Tunnels › HTTP and fill in the form:
Field What to enter URL type Random subdomain gives you an address right away. Custom subdomain and Custom domain let you choose it. Device token The token you started the client with. Server region The Localtonet server that carries the tunnel. Choose a region close to your device for lower latency. Local IP address 127.0.0.1when the service runs on the same device as the client.Local port The port your service listens on, for example 3000.Select Create tunnel.
-
Start the tunnel #
The new tunnel appears under Your tunnels. Select Start, then open the public address shown for the tunnel in a browser. Requests to that address now reach the service on your device.