← Back to Forum
1

LocaltoNet + basic auth for client previews on localhost

I needed to let 2 clients poke around a work-in-progress site, but I really didn't want to expose anything beyond the app running on my local port. Ended up putting basic auth in front of the LocaltoNet URL and that was the bit that made me finally feel ok sending the link out.

Pretty lightweight setup, which is nice for quick previews. If you're doing this kind of temporary share, what do you usually do after the review round, just kill the tunnel and rotate creds, or is there another obvious cleanup step I'm missing?

Comments (6)

adamphillips Jul 9, 2026

Yeah, for temporary previews I'd also nuke the tunnel as soon as the review's done, credentials hanging around is just future-you's problem with better branding. I usually also make sure any demo/test data gets wiped after, because clients will absolutely type real-looking stuff into a "temporary" form and then vanish.

krivera Jul 9, 2026

Yeah, the demo data point is a good catch, I hadn't really thought about clients pasting real-ish stuff into a throwaway form but of course they do. My current plan was just kill tunnel, rotate the basic auth, and clear any temp uploads, do you also regenerate the LocaltoNet URL itself every time or just bring the same one back later if needed?

samuelnelson Jul 9, 2026

Regenerate the LocaltoNet URL each review round if you can, that's the one extra thing I'd do because old links have a way of lingering in email threads and bookmarks longer than anyone remembers. In practice I treat the URL like a temporary secret too, even with basic auth in front, it just reduces the chance of an old preview resurfacing later.

sarahharrison Jul 9, 2026

Set the tunnel to an expiration or calendar reminder before you send the link out, that's the bit that saved me from old previews hanging around when a client came back a week later. I agree on rotating the URL too, but imo the auto-cleanup matters more because people forget, and then suddenly you're wondering why a half-finished staging page is still reachable.

cbennett Jul 9, 2026

Put a hard banner on the preview itself that says "temporary client preview" plus the date, that's the extra safety net I'd add on top of the reminder. Even if the tunnel stays up longer than planned, at least nobody can mistake it for a real staging or prod link later, and clients are way less likely to keep recirculating it like it's official.

edwardperez Jul 10, 2026

I really like the banner idea, especially with the date right on it. I've also started making the preview obviously unfinished on purpose, like a different accent color or a little note in the footer, just so nobody screenshots it later and treats it like the final site.

×