Quick Start
Create your first Localport tunnel and get a public HTTPS URL for localhost in about two minutes. A full dashboard walkthrough for web apps, APIs, databases, and game servers.
Summary
What you need before you start#
Three things, and the first two take under a minute each.
1. A Localport account. Sign in or create one at dashboard.localport.io. This is where you create tunnels and copy your connection command.
2. The Localport CLI. It is a single binary with no dependencies. Install it for your operating system:
brew install localport/tap/localportcurl -fsSL https://localport.io/install.sh | shirm https://localport.io/install.ps1 | iexSee Installation for more options. Verify with localport --version.
3. Something running locally. Any app that listens on a port works. If you do not have one handy, start a throwaway server on port 3000:
# Python (built in on macOS and most Linux)
python3 -m http.server 3000
# or Node.js
npx serve -p 3000
Step 1: Create a tunnel in the dashboard#
Open dashboard.localport.io, go to Tunnels, and click New. Give the tunnel a name and pick a region, then click Create.
Two fields, two decisions:
- Name is a label for you. It helps you tell your tunnels apart in the dashboard. You can rename it later.
- Region is where your tunnel is served from. Pick the one closest to you or your users: EU, US, or Asia Pacific. A closer region means lower latency.
Your tunnel and its URL are yours to keep
Step 2: Copy your connect command#
Right after you create a tunnel, the dashboard moves to the Connect step and builds the exact command to run. You can reopen it any time with the Connect button on the tunnel. Here is what each control does:
- Preset. Fills in the protocol and port for a known tool (Next.js, Vite, Django, PostgreSQL, Minecraft), or pick Custom.
- Protocol.
httpfor web apps and APIs,tcpfor databases, game servers, and SSH,tlsfor services that handle their own TLS. - Local Address. The address to forward to. Defaults to
localhost; set something like192.168.1.50:5432to reach another machine. - Custom Name. Labels the connection with
--name. Optional here, required for mesh devices. - No UI. Swaps the live panel for plain logs (
--noui), for servers, CI, and Docker. - Token. Your tunnel's secret key, already in the command. Treat it like a password.
Copy the finished command. It looks like this:
localport http 3000 --token tok_k8f2 --region eu
What the command means
http is the protocol, 3000 is the local port, --token authenticates the tunnel, and --region picks the region. When your service runs on your own machine the protocol and port go first, which is the shortest form. The CLI reference covers every flag.Step 3: Run the tunnel#
Paste the command into your terminal and hit Enter. A second later Localport is connected and the terminal turns into a live status panel.
The panel tells you everything at a glance:
- Forwarding is your public URL. This is the link you share.
- Local is the address on your machine that traffic is sent to.
- Region confirms the region you connected through.
- Bandwidth and Connections update live as requests come in, with a per-connection breakdown of IP, duration, and bytes in and out.
Leave the command running. As long as it runs, the URL is live.
Step 4: Open your public URL#
Copy the Forwarding URL and put it to work:
- Open it in your browser, or on your phone over mobile data to test on a real device.
- Send it to a teammate or a client to show your work in progress.
- Paste it into a webhook setting for Stripe, GitHub, Slack, or Twilio.
https://my-api.eu.localport.dev
Every HTTP tunnel is served over HTTPS with a real, browser-trusted certificate, so there are no security warnings and nothing extra to set up.
Step 5: Stop the tunnel#
Press Ctrl+C and the tunnel is gone. The public URL stops responding right away, with nothing to clean up and no stray process left behind.
For the full list of flags, protocols, and environment variables, see the CLI reference.
Frequently asked questions#
Do I need to install anything on the server I am exposing?
No. Localport runs on your machine and forwards traffic to a port that is already open locally. The service you are exposing needs no changes and no Localport-specific code.
Is my tunnel URL public?
Yes. Anyone with the URL can reach your local service while the tunnel is running. If you need to restrict access to devices you approve, use locked tunnels, which require a client certificate before any traffic reaches you.
Does my tunnel URL stay the same?
Yes. Every standard tunnel keeps the same public URL for as long as it exists, so it does not change between restarts or sessions. You can also pick a custom subdomain, your own word in place of the default, which is ideal for webhook endpoints, OAuth callback URLs, and links you have already shared. Each tunnel has more controls in the dashboard too, such as an IP allowlist to limit which addresses can connect. See HTTP tunnels.
Does Localport work behind a firewall, NAT, or CGNAT?
Yes. The connection is outbound from your machine to Localport, the same kind of connection your browser makes. There is no port to forward and no inbound firewall rule to add, so it works on home routers, corporate networks, and mobile hotspots.
Can I expose a database or game server instead of a web app?
Yes. Use a tcp tunnel for anything that is not HTTP, including PostgreSQL, MySQL, Redis, SSH, and game servers like Minecraft. See TCP tunnels and the game server guide.
How do I run more than one tunnel at once?
List them in a YAML file and start them all with localport --config localport.yaml. The Configuration page has worked examples.
What to read next#
Pick the guide that matches what you are building:
- HTTP & HTTPS Tunnels. Share a web app, test webhooks, demo to a client.
- TCP Tunnels. Expose databases, game servers, and SSH.
- Mesh Tunnels. Give every device in a fleet its own URL.
- Shared Tunnels. Send one webhook to your whole team at once.
- Locked Tunnels. Lock a tunnel to devices you approve with mutual TLS.
- CLI. Every flag, option, and exit code.