Phone and LAN debugging
Phone debugging has two reachability requirements: the device must open the Shopify CLI preview and it must reach Vite assets on the development machine. Making Vite listen on the LAN does not by itself guarantee that the browser accepts the final resource combination.
Check in this order
- Set Vite's
server.hostto0.0.0.0or a specific LAN interface; - Set the plugin option
devOrigin: "network"so the development Mixer uses Vite's network URL instead of a loopback URL; - Pass Shopify CLI's native
--hostoption through Theme Run, for exampleshopify-theme dev --path theme-frame --environment development --host 0.0.0.0; - Confirm that the phone and development machine share a network and that the firewall allows both the Shopify preview and Vite listeners;
- Open the LAN preview printed by Shopify CLI and inspect Vite asset requests on the phone.
If Vite has no network URL, devOrigin: "network" stops with an error asking you to set server.host.
HTTPS and tunnels
Do not combine a remote HTTPS preview with a LAN HTTP Vite origin; browsers normally block that as mixed content. For remote-device access, provide an explicit HTTPS proxy or tunnel and pass its complete origin through devOrigin, such as https://dev.example.com. The value must be an HTTP(S) origin without a path, query, or hash; Vite still owns listening and transport. See the repository phone and LAN example for the installed version's syntax.