HTTP and HTTPS tunnels
An HTTP tunnel gives a local web server — a website, an API, or a webhook receiver — a public HTTPS URL.
Create an HTTP tunnel
- In the dashboard, choose New tunnel and select HTTP.
- Choose a subdomain: 3–31 lowercase letters, numbers or hyphens. Your public URL is
https://<subdomain>.tunnel.portlark.com. - Enter the local address that the client should forward to:
| Local address | Use it for |
|---|---|
127.0.0.1:3000 | A service on the same computer as the client |
192.168.1.20:8080 | A service on another machine in your network that the client can reach |
- Connect with
portlark setuporportlark connect(see the CLI reference), or let your Agent do it.
A tunnel's local address cannot be changed after creation. To use a different port, create a new tunnel (delete the old one first if you are at your plan's limit).
How traffic flows
Visitors connect to the PortLark edge over HTTPS. The edge terminates TLS and forwards each request through the client's connection to your local service as plain HTTP, so your local service does not need a certificate. WebSocket upgrades are forwarded.
Your application receives the original Host header (<subdomain>.tunnel.portlark.com). Some development servers reject unknown hosts; allow the tunnel host in their configuration, for example server.allowedHosts: ['.tunnel.portlark.com'] in Vite or allowedHosts: ['.tunnel.portlark.com'] in webpack-dev-server.
Webhooks
Use the public HTTPS URL as the callback base in the external service and keep any path your application needs, for example https://my-app.tunnel.portlark.com/webhooks/stripe. Validate webhook signatures in your application. Webhook deliveries fail while the client is stopped, so keep it running during tests.
Limits
- Each tunnel uses one slot of your plan's tunnel allowance. The free trial includes one tunnel; see https://portlark.com/pricing for paid plans.
- Subdomains stay reserved while your access is active and for a short retention period afterwards.
- Customer-owned domains and guaranteed bandwidth are not included.
- Use PortLark in line with the Acceptable Use Policy.
Last updated
Report an issue with this page