Itch.io connect to AWS server?

Godot Version

4.6

Question

Hey all, I’ve got a multiplayer game that is setup as a client-server game. Hosting the server on an AWS instance, and putting the client up on itch for now. Everything works when I’m testing locally, but I can’t seem to connect to the server once I’m up on itch.

I’ve tried a few things by googling, like adding “ws://” or “wss://”, checked ports (all open and security rules allow for it), and all that. So far, nothing seems to allow me to connect. I keep getting a 1006 error, which when I look it up is an error with the connection but I can’t find where the problem is.

Is there a better guide or instructions for how to set this up? Could it be itch that is blocking the connection?

First glance reading this: it might be a TLS issue. You are correct about using wss:// because itch.io serves the site via HTTPS, so the browser will block plain ws:// connections (mixed content). Error 1006 fits that, the browser kills the connection before it even establishes.
But just switching to wss:// in the client isn’t enough, your AWS server also needs to actually terminate TLS. Are you using a reverse proxy like Nginx or Caddy in front of your Godot server? That would handle the TLS certificates and forward the traffic as plain ws:// internally.
To be honest, I have no experience with AWS specifically, but I’m a network technician by trade, and from the first impression this looks like a classic TLS/mixed content problem.

Hey there! Thanks for the info!

I ended up moving away from itch.io and just hosting on my own site. It was weirdly easier to do that when it comes to the connections.

Currently I am using Nginx and have set everything up (I think properly) and have gotten the connection to work a few times. The problem I seem to keep running into is every time I update my game files on the server, even though nothing about the new build affects connections I somehow get a new problem. Sometimes its just a simple update of security, but more often than not its something else that needs to be added or changed. It feels like what I change to fix a problem today will be what is broken tomorrow, so my fixes keep turning into breaks.

For instance right now I have updated my files, but I can’t get a connection. I can’t quite pinpoint where the problem is either, like I can’t tell if its a problem with my Nginx setup, or with some other networking issue.