Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lDEVinux/eaglercraft/llms.txt

Use this file to discover all available pages before exploring further.

Eaglercraft’s LAN world feature uses WebRTC peer-to-peer connections brokered through a relay server. Unlike traditional LAN play, this works between any two devices connected to the internet — you are not limited to players on the same Wi-Fi network. A friend across the world can join your singleplayer world as easily as someone sitting next to you.

Opening a World to LAN

1

Open the Pause Menu

While in your singleplayer world, press Esc to open the pause menu, then click Open to LAN.
2

Configure LAN Settings

Choose the game mode players will join with, whether to allow cheats, and whether to hide the world (see Hidden vs Visible LAN Worlds below).
3

Note the Join Code and Relay URL

Once the world is open, the pause menu will display a join code and the relay URL your session is hosted on. Keep this screen handy — you will need to share both pieces of information with your friends.
4

Share the Join Code

Send the join code to anyone you want to invite. Also send them the relay URL so they can add it to their Network Settings (see Joining a LAN World below).

Joining a LAN World

Before a friend can join your world, they must have the correct relay server added to their client:
  1. From the main menu, go to MultiplayerNetwork SettingsAdd Relay.
  2. Paste in the relay URL shown in your pause menu and save it.
  3. Return to MultiplayerDirect Connect.
  4. Enter the join code and click Join Server.
If your friend does not have the relay URL added to their Network Settings, the game will be unable to locate your world and the connection will fail. Always share both the join code and the relay URL.

Hidden vs Visible LAN Worlds

When you open a world to LAN without hiding it, it appears on the Multiplayer screen for anyone else on the same Wi-Fi network. This makes it easy for nearby friends to join without a join code. However, at school, a library, or any other public network, this means anyone on the network can see and attempt to join your world. Enable the hidden option in that case — hidden worlds are only joinable by players who have your join code and relay URL, regardless of whether they are on the same network.

Public Relay Servers

Relay servers broker the initial WebRTC handshake between you and your friends. The following public relay servers are available for anyone to use:
  • wss://relay.deev.is/
  • wss://relay.lax1dude.net/
  • wss://relay.shhnowisnottheti.me/
These are configured by default in the official Eaglercraft client (index.html), and one is chosen at random each session to distribute load. If all three are unreachable, you will need to self-host a relay or wait for them to come back online. For instructions on running your own relay, see Self-Hosting a Relay.

How Relay Signaling Works

The relay does not carry game data — it only brokers the initial WebRTC handshake. Here is how the signaling flow works, based on sp-relay/protocol.txt:
  1. Server opens the world — the Eaglercraft client acting as the “server” opens a WebSocket to the relay and sends PKT 0x00, identifying itself as a server. The relay replies with PKT 0x00 assigning a join code, then sends PKT 0x01 containing the ICE server (STUN/TURN) list.
  2. Friend (client) connects — the friend opens their own WebSocket to the same relay and sends PKT 0x00, identifying as a client and including the join code. The relay replies with PKT 0x00 (assigning a client ID) and PKT 0x01 (ICE server list), then notifies the hosting player with PKT 0x02 containing the client’s ID.
  3. ICE candidate exchange — SDP descriptions and ICE candidates are exchanged through the relay in both directions using PKT 0x04 (descriptions) and PKT 0x03 (ICE candidates), with the relay forwarding them between server and client.
  4. P2P connection established — once ICE negotiation succeeds, the client sends PKT 0x05 (success) or PKT 0x06 (failure). On success, the relay sends PKT 0xFE to signal the client to close its relay WebSocket — the game now communicates directly peer-to-peer, and the relay is no longer involved.

Build docs developers (and LLMs) love