+1 vote

I run my Web exported program on a localhost server (python) and want to start a Godot server but I can't connect to this. Localhost and the port of the python server dosen't work either.

Godot version 3.3
in Engine by (214 points)

1 Answer

+1 vote

I asked a similar question a couple months ago and didn't get a clear answer. Based on my experimenting, the answer is "yes, but don't". Failure to connect to a local host server can be caused by a number of things. First, the Godot server must use a different port than that used by the web server (usually port 80). Second, the HTML exported "server app" cannot run unless the web page hosting it is loaded. Try loading the server page in one browser, then load the client page in a second browser. Based on my experiments, the HTML export is not a viable option for Godot server apps.

If you are planning to making your game publicly available, you need to be aware of the limitations of HTML exports of a server apps. If you plan to host your server on an inexpensive shared hosting service, it won't work without a dedicated IP. Shared hosting plans often map domain names to different ports on a common host server IP. Obviously, trying to open a server listener on a port not mapped to your domain is going to fail. You will need either a VPS with static IP or a dedicated physical host with a static IP.

by (70 points)

I also can't connect a web client to an .exe server. In the Web debugger (Firefox) is this Warning.

Do you know what this mean?

Firefox Warning - Sending failed

I realized that I need to use Websocket and not the MultiplayerENet function.

Thanks for your answer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.