← Back to Forum
2
Getting Started
LocaltoNet share localhost site, do I send the tunnel URL or my IP
I've got the app running and it says the tunnel points to my local port, but this is the part that's confusing me. For someone outside my Wi-Fi, am I supposed to send them the LocaltoNet domain it gives me, or my 127.0.0.1 address, or my home public IP?
I only need the basic mental model here. Like what exact URL does the other person open, and how does that end up hitting my localhost app on that port.
Comments (3)
Send them the LocaltoNet URL, that’s the only address they can actually reach from outside your network. 127.0.0.1 only means “this same computer,” and your home IP only matters if you were doing port forwarding yourself, LocaltoNet is basically taking requests from that public URL and piping them to whatever local port you picked like 3000 or 8080.
Yeah, sending the LocaltoNet URL was the part I was missing, thanks, that makes the whole thing click. I tried opening that link from my phone with Wi-Fi off and it hit my site, so I think I've got the basic idea now, just one follow-up: if my app is on localhost:3000, is the tunnel always tied to that port until I change it in LocaltoNet, or can it somehow follow the app if I restart it on a different port?
It stays pointed at the port you configured in LocaltoNet, so if your app comes back on 3001 instead of 3000 the same public link won't magically find it. You usually need to edit the tunnel target to the new local port, the public URL can stay the same depending on how LocaltoNet set that tunnel up.
Please log in to post a comment.