Multiplayer Server
The En Parlant~ multiplayer relay is a lightweight WebSocket server written in Rust using Axum and socketioxide. It connects two players for real-time chess over Socket.IO, with no persistent storage and minimal resource requirements.
The relay server source code lives in the en-parlant-relay repository.
Why Self-Host
Section titled “Why Self-Host”The default relay server works out of the box, but there are good reasons to run your own:
- Privacy — all game traffic stays on your infrastructure
- Lower latency — deploy closer to your players for faster move transmission
- Independence — no dependency on the default relay’s uptime or availability
Deployment Options
Section titled “Deployment Options”Fly.io (Recommended)
Section titled “Fly.io (Recommended)”The relay repository includes a fly.toml configuration file, making Fly.io the easiest deployment path. Fly.io’s free tier is suitable for personal use.
-
Install the Fly CLI:
Terminal window curl -L https://fly.io/install.sh | sh -
Sign up or log in:
Terminal window fly auth signup# orfly auth login -
Clone the relay and deploy:
Terminal window git clone https://github.com/DarrellThomas/en-parlant-relay.gitcd en-parlant-relayfly launchfly deploy
Fly.io will build the Rust binary, deploy it, and give you a public URL like your-app-name.fly.dev.
Self-Hosted
Section titled “Self-Hosted”Build the relay from source and run it on any machine with a Rust toolchain.
-
Clone and build:
Terminal window git clone https://github.com/DarrellThomas/en-parlant-relay.gitcd en-parlant-relaycargo build --release -
Run the server:
Terminal window ./target/release/en-parlant-relayThe server listens on port 3210 by default.
-
For production use, run behind a reverse proxy (nginx, Caddy, or similar) to handle TLS termination. The relay itself speaks plain WebSocket — your proxy adds the
wss://encryption layer.
The server is very lightweight. It holds game rooms in memory, forwards moves between two players, and does nothing else. A small VPS or even a Raspberry Pi can handle it comfortably.
Configuring En Parlant~
Section titled “Configuring En Parlant~”Once your relay is running, point En Parlant~ to it:
- Open Settings in En Parlant~
- Find the multiplayer relay server URL setting
- Enter your server’s WebSocket endpoint:
- For Fly.io:
wss://your-app-name.fly.dev - For self-hosted with TLS proxy:
wss://relay.yourdomain.com - For local development:
ws://localhost:3210
- For Fly.io:
That’s it. The app will use your relay for all multiplayer games.
Server Details
Section titled “Server Details”A few things to know about how the relay operates:
-
Room codes — The server generates 6-character game codes using an unambiguous character set. Characters that look alike are excluded (no
0/O, no1/I/L) to avoid confusion when sharing codes verbally. -
Room cleanup — Rooms are automatically removed after 30 minutes of inactivity. A cleanup task runs every 60 seconds to sweep idle rooms.
-
No persistent storage — All state lives in memory. If the server restarts, active rooms are lost. This is by design — the relay is stateless and trivially replaceable.
-
Minimal resources — The server uses very little CPU and memory. It only receives Socket.IO events from one player and forwards them to the other. There’s no game logic, no move validation, no database.