How to share a local website with a client
ngsrv helps developers expose local services, share preview links, test webhooks, and get feedback faster. The shortest workflow for "can you check this real quick?" is: keep coding on your laptop, send your client a normal URL, and skip the deploy.
This is the use case where ngsrv earns its keep on the marketing side of the business — designers, PMs, and clients don't care about your CI pipeline; they want to click a link.
Why deploying a staging server for every change is wrong
The default playbook for sharing work-in-progress is:
- Commit
- Push
- Wait for CI
- Wait for the staging deploy
- Realize you forgot an env var
- Repeat
That's 10-15 minutes you don't have when a client says "is the button red enough?" An ngsrv tunnel collapses that loop to two seconds.
Step 1 — Run your dev server
Pick your stack. Common ports:
# Next.js / Express / Rails / Django
npm run dev # 3000
# Angular CLI
ng serve # 4200
# Vite
npm run dev # 5173
# Storybook
npm run storybook # 6006
Step 2 — Tunnel it with a stable URL
ngsrv http 4200 --subdomain client-preview
You get back:
https://client-preview.tnl.ngsrv.com -> http://localhost:4200
Reserved subdomains stay yours across CLI restarts on Pro and above, so the link you sent yesterday still works tomorrow.
Step 3 — Send the link
Paste the URL into Slack, email, Linear, Notion — wherever your client lives. They click and see your laptop. They don't see "localhost", they don't see a :4200, they don't need a VPN. It's just a normal HTTPS site.
Keeping it private
You probably don't want random people on the internet poking your work-in-progress. Two cheap protections:
Header auth. Add a required token to ngsrv.yml:
tunnels:
- name: preview
port: 4200
subdomain: client-preview
security_policies:
- type: header_required
header: "X-Preview-Token"
value: "kj4f-rt9z-p1ld"
Send the client the URL with the token, or use a simple shareable link wrapper. Done.
IP allowlist. If your client works from a fixed office:
security_policies:
- type: ip_allowlist
ips: ["203.0.113.0/24"]
Both policies are on the free tier.
What clients actually see
A regular HTTPS site. The ngsrv edge handles TLS, so the green padlock is real. There's no banner, no warning interstitial, no "free tier" watermark — just your app.
FAQ
Can I share a local website with a non-technical client? Yes. ngsrv gives you a normal HTTPS URL that forwards to your local dev server. The client just clicks the link.
Does ngsrv work with Angular? Yes. ngsrv http 4200 and you're done.
Does ngsrv work with Vite? Yes. ngsrv http 5173.
Can I use my own domain? Yes, on Pro and above. Add a domain: field to your ngsrv.yml tunnel and follow the DNS instructions in /docs/cli/domains.
Will the link still work tomorrow? Yes if you used a reserved subdomain or a custom domain. Random subdomains rotate per session.