Overview
Thehttp command creates a secure tunnel to expose a local HTTP server to the internet. This is the primary command for creating wormholes in Wormkey.
Usage
Arguments
The local port number to expose (1-65535)
Options
Enable basic HTTP authentication. When enabled, the CLI will generate and display a username and password that must be used to access the tunnel.
Session expiration duration. Accepts time units like
30m, 1h, 24h.Examples:30m- 30 minutes1h- 1 hour24h- 24 hours (default)
Override the control plane URL. By default, uses
https://wormkey-control-plane.onrender.com in production or http://localhost:3001 in local mode.Override the edge tunnel URL. By default, uses
wss://t.wormkey.run/tunnel in production or ws://localhost:3002/tunnel in local mode.Use localhost control plane and edge servers for local development. This sets the control plane to
http://localhost:3001 and edge to ws://localhost:3002/tunnel.Environment Variables
You can configure Wormkey using environment variables instead of command-line flags:WORMKEY_ENV=local- Equivalent to--localflagWORMKEY_CONTROL_PLANE_URL- Override control plane URLWORMKEY_EDGE_URL- Override edge tunnel URL
Examples
Output
When you run thehttp command, you’ll see output like this:
With Authentication
When using--auth, you’ll see credentials displayed:
Understanding the Output
Public URL
The public HTTPS URL where your local server is accessible. Share this URL with others.
Owner claim URL
A one-time URL to claim ownership of this tunnel. Open this link once to associate the tunnel with your account. After the first use, this URL becomes invalid.
Path B integration script
A script tag for Path B integration. Add this to your application layout to enable collaborative browsing features.
Validation
Closing the Tunnel
Press
Ctrl+C to gracefully close the tunnel and terminate the wormhole connection.Error Handling
If the tunnel fails to connect, you’ll see an error message:- Local port is not accessible or not running
- Network connectivity problems
- Control plane or edge server unavailable
- Invalid session parameters
See Also
- Quick Start - Get started with Wormkey
- Overlay Helpers - Learn about collaborative browsing
- Basic Authentication - Secure your tunnels