WebGL Deployments
To allow players to connect to your game servers from web-based games (WebGL), you must configure your server’s network port to accept secure connections. The process is simple and only requires enabling one extra setting.Prerequisites
- A PlayFlow project with a build uploaded and ready
- Access to the project Settings page in the dashboard
- A WebGL client that connects over WebSockets
The Key Requirement: TCP with TLS
Web browsers require secure WebSocket connections (wss://) for WebGL games. To enable this, set your game server’s port to use the TCP protocol and turn on the separate TLS option for that port.
How to Configure Your Server for WebGL
Follow these steps in your PlayFlow project dashboard:1
Open Network Ports
Open the project Settings page in your dashboard and find the Network Ports section (under Configuration).
2
Set the protocol to TCP
For the port your game server uses, set the Protocol to TCP. The protocol control is a toggle between UDP and TCP.
3
Enable TLS
With TCP selected, a separate TLS checkbox appears for that port. Enable it.For example, if your server listens on port
8080, your configuration should be:- Port:
8080 - Protocol:
TCP - TLS: enabled
4
Save and Deploy
Save your configuration. Any new servers you deploy for this project will now support WebGL connections.
How It Works
You don’t need to change your server code. Your game server can continue to listen for unencrypted TCP traffic on its port. PlayFlow automatically handles the TLS encryption and termination at our infrastructure level.- Your WebGL Client: Connects to a secure
wss://address. - PlayFlow Infrastructure: Receives the secure connection, handles the TLS, and forwards the traffic to your server as standard TCP.
- Your Game Server: Receives standard TCP traffic, no TLS implementation needed.
Client-Side Connection
PlayFlow does not hand you a ready-madewss:// URL — you build it from the connection details of your running server.
Read the connection host and port from the server’s API response (GET /api/v3/servers/{id}), from the network_ports[] array. Each entry includes the public host and the proxy-allocated external_port. These values are also shown on the server’s detail page in the dashboard as a copyable host:port value, with a shield indicator when TLS is enabled.
Construct your WebGL client’s connection URL as:
Next Steps
Quick Start Guide
Deploy your first game server.
Installation Guide
Review the setup and installation process.