A lightweight development server for Unity WebGL builds with automatic build detection and responsive UI.
- Download the latest release
- Place
unity-web-server.exenext to your Unity WebGL build folder:YourGame/ ├── Build/ <- Your Unity WebGL build │ ├── index.html │ └── ... └── unity-web-server.exe <- The server executable - Start
unity-web-server.exe- it will:- Automatically try to detect your Unity build
- Open your default browser
- Show your game with a responsive UI
That's it! Your game is now running locally.
- Auto-Detection: Finds your Unity build automatically
- Responsive UI: Dark mode interface with size controls
- Fullscreen Support: One-click fullscreen mode
- Size Controls: Auto-detect or manual size adjustment
- Quick Access: "Open in new tab" option
- Smart Port Selection: Automatically finds next available port if default is in use
unity-web-server [OPTIONS]
Options:
-p, --port <PORT> Server port [default: 8080, auto-increments if busy]
-H, --host <HOST> Host address [default: 127.0.0.1]
-n, --headless Start without opening browser
-h, --help Show helpThe server will:
- Try to use the specified port (default: 8080)
- If the port is busy, automatically try the next port (8081, 8082, etc.)
- Continue up to 10 ports higher than the specified port
- Display a clear message if using a different port than requested
You can also place the server inside your build folder:
Build/
├── index.html
├── unity-web-server.exe
└── ...
The server looks for Unity builds in:
../Build.(current directory)../build./Build./build
- 🔍 Automatic build & canvas size detection
- 📦 Brotli (.br) and Gzip (.gz) compression support
- 🔒 Proper MIME types and CORS settings
- 🌐 Health check endpoint (
/health)
# Debug build and run
cargo run
# Release build
cargo build --release
# Run tests
cargo testHandles all Unity WebGL-specific file types:
.wasm→application/wasm.js→application/javascript.data→application/octet-stream.symbols.json→application/json
Automatic detection and correct serving of:
- Brotli compressed files (.br)
- Gzip compressed files (.gz)
GNU General Public License v3.0