Using ngrok with Vuer¶

ngrok is a popular tunneling service that can expose your local server with SSL/TLS encryption.

Installation¶

For Mac users:

brew install ngrok

For other platforms, see the official ngrok installation guide.

After installation, you’ll need to sign up for a free account at ngrok.com and authenticate:

ngrok config add-authtoken YOUR_AUTHTOKEN

Free Tier (No Subscription Required)¶

The ngrok free tier works perfectly for WebXR development. Simply start ngrok with:

ngrok http 8012

You should see output like:

Forwarding
https://1a2b-3c4d-5e6f.ngrok-free.app -> http://localhost:8012

Note: The URL will be randomly generated and will change each time you restart ngrok.

This successfully promotes your local vuer server from ws://localhost:8012 to wss://1a2b-3c4d-5e6f.ngrok-free.app (note the double wss in the protocol).

Connecting to Your Vuer Server (Free Tier)¶

Once ngrok is running, use the randomly generated URL to connect:

https://vuer.ai/?ws=wss://1a2b-3c4d-5e6f.ngrok-free.app

Note: If you change the Vuer port (e.g., app = Vuer(port=3012)), you need to update the ngrok command accordingly:

ngrok http 3012

The connection URL remains the same format, just with the new ngrok-generated domain.