VOOZH about

URL: https://minecraft.wiki/w/Tutorial:Setting_up_a_LAN_world

โ‡ฑ Tutorial:Setting up a LAN world โ€“ Minecraft Wiki


Tutorial:Setting up a LAN world

From Minecraft Wiki
Jump to navigation Jump to search

A local area network (LAN) game is a type of multiplayer game that allows other people in your local network (i.e., just the people connected to your home network via router, switch, or mobile hotspot) to join a Minecraft world. Players over the internet cannot connect unless other workarounds (such as port forwarding or VPN) are set up.

Java Edition

[edit | edit source]

Hosting a LAN server

[edit | edit source]
๐Ÿ‘ Image
Settings for a multiplayer game on local area network (LAN).

To open an active single player world to LAN:

  • Navigate to "Pause menu" โ†’ "Open to LAN",
  • Optionally change the default game mode and/or whether players may use commands,
  • Click "Start LAN World".

It is also possible to start a LAN world by the command /publish [<allowCommands>] [<gamemode>] [<port>].

After the world has been opened to LAN, a confirmation message will be sent in the chat, for example: Local game hosted on port 2121. Notice the port, this is useful for players to help connect to the LAN game later.

Ports

[edit | edit source]

If you're looking to port forward, or set up LAN via some zero-trust VPN with strict ACLs; while the game does not allow to set a constant port, you can choose one every time you open to LAN by clicking on the Port Number box, the randomly generated port has been editable since snapshot 22w45a (1.19.3)

Joining

[edit | edit source]
๐Ÿ‘ Image
A LAN game with the world playing named "LAN World". LAN games always appear below custom servers you've added, so always check the bottom of the list to see.

If joining from the same local network, the game should automatically appear in the server list in the Multiplayer menu. Otherwise, check if the computer hosting the LAN game has firewall properly configured, by allowing the port shown by the confirmation message sent in the world previously. This port may be inserted into the server address with the host's local IP address in the Multiplayer menu for the players to connect explicitly.

Getting the local IP address

[edit | edit source]

The server host's local or internal IP address is important for connecting to your server in LAN. It's also may be used in port forwarding, specifying which internal IP and port for your router to port forwards to.

With that in mind, here are the steps to retrieve the internal IP address:

๐Ÿ‘ Image
The internal IP location on Windows 11
  1. Press โ€ฏ+โ€ฏ; this should be up to the "Run" dialog box. Type cmd and hit .
  2. This should open a command window with a black background. From there, type ipconfig and press . You should be given a list of text.
  3. Scroll up to "Wireless LAN" (if using wireless) or "Ethernet" (if using a wired connection), and look at "IPv4 address".
  4. The right side of the column should be a string of numbers (of the form xxx.xxx.xxx.xxx). Copy this down by right-clicking the window and selecting "Mark", then highlight the area and hit Enter. Don't copy any parentheses or letters.
๐Ÿ‘ Image
The internal IP location on OS X
  1. Locate your way to your desktop.
  2. Pull up the apple menu under the logo and scroll down to System Preferences.
  3. Select "Network" your IP should be on the lower right as "IP address (xxx.xxx.xxx.xxx)". Once you have your IP, copy it down.
๐Ÿ‘ Image
The internal IP location on Arch Linux
  1. Open the terminal, and run ip address (or ip addr for short).
    • The output will display all of your network interfaces. If you're using ethernet, you want start looking for the line that starts with ethX or enpXsX, and for wireless, wlanX or wlpXsX. Notice the "X" on the device names, they usually indicate the bus and the slot number.
    • Depending on your system configuration, the numbers may be different, but the first or second network interface on the list is usually the one connecting into your router.
  2. Find the internal IP address written next to inet, which will look like inet xxx.xxx.xxx.xxx, copy the xxx.xxx.xxx.xxx numbers down.

Notes

[edit | edit source]
  • Using one Minecraft account on two or more computers will not work to join the same world. Alternatively, you may use offline mode server (by disable the online-mode setting on server.properties) to join with alternative names without a Minecraft account.
  • Players over the Internet can connect to a LAN game if one forwards the game's port on the host's router. If done, people over the internet can connect to your game using your public IP in place of your computer's local IP. See Tutorial:Setting up a Java Edition server ยง Port forwarding for further reading.
  • Third-party virtual private network (VPN) services can be used to simulate LAN connections over the Internet, see Tutorial:Setting up a Java Edition server ยง Virtual Private Network for further reading.

Bedrock Edition

[edit | edit source]

In Bedrock Edition, LAN multiplayer is on by default. You can set "Visible to LAN Players" setting to turn it on or off in "Edit World" โ†’ "Multiplayer" menu, though you cannot change this while playing in the world. The host must be connected to a local network, either by Wi-Fi hotspot or router, in order to make their world discoverable to other players and let them join the multiplayer game.

The host can set the number of available slots by using /setmaxplayers up to 30, and the default game mode upon players joining in "Edit World" โ†’ "Game" โ†’ "Default Game Mode" setting.

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Tutorial:Setting_up_a_LAN_world?oldid=3524915"

Navigation menu