Back to Writing
NOTESunitymirrorwebglawsec2networking

Unity Mirror — WebGL Hosting on AWS EC2

September 7, 2021Updated Feb 17, 2026

![](

KdSQCyqewqWrtFR_FUg.XcFtqxe1Ien_u9XiwOVFwktvcJIWvzX8CDlChA_5RrIg.PNG.cdw0424/image.png?type=w966)

I set up Ubuntu and Nginx on an AWS EC2 instance and hosted files uploaded via SFTP through FileZilla.

Everything was smooth up to that point, but I kept running into issues with WebSocket access and couldn't host through the server.

I didn't want to deal with WSS (WebSocket Secure) configuration just for testing.

So I intentionally hosted over HTTP — but it turned out WebGL builds couldn't be hosted on the server that way.

The fix was surprisingly simple: host on a non-WebGL platform instead.

Once I joined as a client, things went smoothly :)

By the way, Mirror isn't an official Unity tool — it's a free community-built networking solution.

If Photon feels too expensive, Mirror is worth considering.

Or if you're thinking about performance at scale — hundreds or thousands of concurrent connections — MLAPI is a solid option to explore.