webglgodotlan

How to access web game in Godot via lan while developing


I'm trying to develop a web game on Godot and I need to serve the game on lan to access from another device, the game is being served to html5 trought localhost, but can't access it trought ipv4

Edit:

I found the file in /home/user/.cache/godot/web the problem now is that if I try to serve this with "npx serve" I get this error:

Error The following features required to run Godot projects on the Web are missing: Secure Context - Check web server configuration (use HTTPS) Cross Origin Isolation - Check web server configuration (send correct headers) SharedArrayBuffer - Check web server configuration (send correct headers)

The thing is that to serve it on prod I don't need https, so idk why it asks me now for that and other things


Solution

  • Finally got it working, had to look in this folder (linux):

    /home/user/.var/app/org.godotengine.Godot/cache/godot/web

    Edit 1:

    Even better, go to editor/editor settings/export/web and changethe http host from localhost to your private ip address, now you can access it from any other device on lan :) enter image description here