Reference
Run the connector against your app
Look up the connector's run command: the quick form, the durable-tunnel form and every option.
- Applies to
- Connector 0.2.0
- Time
- About 5 minutes to read
- What it changes
- While it runs, requests to the tunnel's address reach the app at the origin you give.
- Last reviewed
- , by Product documentation
Quick address
The quick form opens a temporary address for a port on your computer and signs the computer in first if needed.
npx @instawormhole/connector 3000You can also give a loopback address such as localhost:5173, 127.0.0.1:8080 or [::1]:3000.
Durable tunnel
A durable tunnel keeps its address, can be protected and shows its requests in the inspector. Copy the command from the tunnel's Connect an app section.
npx @instawormhole/connector run --relay wss://relay.instawormhole.site --origin 127.0.0.1:3000 --stored-device --tunnel <tunnel id>Options
| Option | What it does |
|---|---|
| --origin <address> | The loopback address your app listens on, for example 127.0.0.1:3000. |
| --relay <address> | The InstaWormhole relay to connect to. Use wss://relay.instawormhole.site. |
| --tunnel <tunnel id> | Connect to a durable tunnel from the dashboard instead of opening a temporary address. |
| --stored-device | Use the sign-in saved by the login command. |
| --credential-stdin | Read a one-use credential from standard input instead of using the saved sign-in. Useful in containers and scripts. |
| --config <file> | Start several tunnels from one file. Needs --stored-device. See Run several tunnels from one file. |
| --origin-timeout <seconds> | How long to wait for your app to answer or to send more, from 1 to 3600 seconds. The defaults are 10 minutes to wait for a response to start and 2 minutes with no data. |
| --server <address> | The InstaWormhole service to sign in to. The default is https://instawormhole.com. |
| --json | Put it first. Prints one JSON object per event, for scripts. |
| --store file | On Linux, keep the credential in a private file instead of the operating system store. It can be added to any command. |
The connector refuses an option given twice, instead of letting the last one win, and refuses anything that is not a loopback address for --origin.
Stop and reconnect
Press Ctrl+C. The connector stops and the public address stops answering. If the connection drops, for example when your computer sleeps, the connector reconnects on its own and a durable tunnel keeps its address.
What to do next
Related
This page is part of Connect a local app. Still stuck? Contact support.