RFD 1088 details: every setup option, headset access, and troubleshooting
Option 1: mkcert, the easiest path
Install
mkcert:choco install mkcerton Windows, or download from its GitHub releases;brew install mkcerton macOS; seemkcert’s own installation guide on Linux.Install the local CA:
mkcert -install.Generate certificates:
mkcert localhost 127.0.0.1 ::1 10.0.0.32(that last address is an example LAN IP), producinglocalhost+3.pemandlocalhost+3-key.pem.Move the certificates into the certs directory:
mkdir certs mv localhost+3.pem certs/localhost.pem mv localhost+3-key.pem certs/localhost-key.pemRestart the dev server:
npm run dev.Access over HTTPS:
https://localhost:3000, orhttps://10.0.0.32:3000for a Galaxy XR device.
Option 2: OpenSSL, one command
npm run setup-httpsGenerates certificates directly into certs/.
Option 3: manual certificate generation
mkdir certs
openssl req -x509 -newkey rsa:4096 -keyout certs/localhost-key.pem -out certs/localhost.pem -days 365 -nodes -subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"Restart the dev server; Vite picks up the certificates automatically.
The browser security warning
A self-signed certificate always triggers a warning. Click “Advanced” or “Show Details”, then “Proceed to localhost (unsafe)” or “Accept the Risk and Continue”. Safe for local development.
Network access, for a Galaxy XR device
- Put both devices on the same network.
- Find the computer’s own IP address (for example,
10.0.0.32). - Add that IP to the certificate (see step 3 under mkcert, above).
- Access
https://10.0.0.32:3000on the Galaxy XR device.
Troubleshooting
- Certificate errors: confirm the certificates sit in
certs/, with the exact expected names. - Connection refused: check firewall settings, and confirm port 3000 is open.
- WebXR still not working: confirm HTTPS, not HTTP, and confirm the certificate warning was accepted.