Hello,
I am currently trying to build my game for WebGL for itch.io
The game is able to run but not connect to Nakama. I have an issue with SSL Protocol.
I have setup the scheme to be https in Unity but I still receive this error:
POST https://35.203.112.14:7350/v2/account/authenticate/device?create=true&username=EliSky& net::ERR_SSL_PROTOCOL_ERROR
I have seen in other threads in there that I should do the following:
You’ll need to set up an SSL certificate and either configure Nakama to do SSL negotiation (not recommended especially not in production) or set up a load balancer that does the SSL termination.
You cannot just set “https” instead of “http” as the protocol scheme and have the client SDK work. Unfortunately this is not how SSL works. I recommend you look at a service like LetsEncrypt which can issue you a certificate to use for free.
The server is currently running on a Google VM. I have a self-serve SSL certificate that I wish to use just to test the game on itch.io
Here is my local.yml file:
name: nakama-node-1
data_dir: "./data"
logger:
stdout: true
level: "warn"
file: "/nakama/data/logfile.log"
runtime:
js_entrypoint: "build/index.js"
console:
port: 7351
username: "root"
password: "password"
session:
token_expiry_sec: 30
refresh_token_expiry_sec: 30
socket:
ssl_certificate: "/nakama/data/nakamassl_cert.pem"
ssl_private_key: "/nakama/data/nakamassl_key.pem"
I know it is prefered to use a load balancer, but I just want to test the game online for now. Are you able to help? Let me know if you need more info on that. Thanks!