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. Create the policy in the dashboard, copy its ID, attach it in ngsrv.yml:
tunnels:
- name: preview
port: 4200
subdomain: client-preview
security_policies:
- ngsrv_hdr_ABC123
Send the client the URL plus whatever header or credentials the policy requires.
IP allowlist. Create the policy under Dashboard → Security, then reference its ID:
security_policies:
- ngsrv_ips_client_office
Policy count limits apply when you create policies, not when you reuse an existing ID.
What clients actually see
A regular HTTPS site. The ngsrv edge handles TLS, so the green padlock is real. On Pro and Pay as you go, visitors go straight to your app — no warning interstitial. The Free tier may show a one-time security notice page (visitors can continue through); upgrade removes it for client-facing previews.
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 — Free includes one custom domain; paid plans include more. 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.