Skip to main content

Open your Minecraft LAN world to the internet

"Open to LAN" only reaches devices on your own network. This guide explains why, how friends can still join from home, and how to skip port forwarding.

A LAN world can't be reached from outside because your router blocks incoming connections. You can open it with port forwarding, build a shared virtual network with a VPN, or route the connection through a relay. With CraftProxy you type /host in your world and send friends the address it shows, without touching your router.

Why friends can't see your LAN world

When you open a world to LAN, Minecraft starts a small server on your PC and announces it on the local network. Devices outside your Wi-Fi never get that announcement. Even if a friend knows your public IP address, your router drops the connection because it doesn't know which computer to send it to.

On top of that, many internet connections use CGNAT. You then share one public IPv4 address with other customers of your provider, and port forwarding on your router does nothing because the connection is stopped at the provider first.

Without port forwarding: put your LAN world online with CraftProxy

CraftProxy turns the direction around. Instead of waiting for incoming connections, the mod opens an outgoing connection from your PC to our relay. Every router allows outgoing connections, so this works behind CGNAT, on a mobile hotspot or on dorm Wi-Fi. You don't have to open the world to LAN yourself first; /host does that.

From outside, Nova can't get past your router. With /host your world opens a connection to the outside itself, and your friends come in through it.

How to host with CraftProxy

  1. 1

    Install the mod

    Put CraftProxy in your mods folder (Fabric). Only you, the host, need it.

  2. 2

    Type /host in your world

    Open a singleplayer world and type /host in chat. CraftProxy opens a tunnel to our relay.

  3. 3

    Send the address

    Your friends add the address as a server in the multiplayer menu and join.

Your friends only need Minecraft Java Edition on the same version as you, plus the same mods if you play a modpack.

Playing together often? If your friends install CraftProxy too, add each other in the Social menu (key I). You see who is online, chat with them and invite them with one click instead of sending an address every time.

If your internet drops for a moment, the tunnel reconnects by itself. When you leave the world, your friends are disconnected.

With port forwarding: the classic way

If you can access your router and have your own public IPv4 address, you can forward the port yourself. The menus differ between routers, but the steps are roughly the same:

  1. Give your PC a fixed local IP address in the router.
  2. Create a TCP port forward to that IP for your server's port (25565 by default on a dedicated server). With "Open to LAN", Minecraft picks a random port unless you set one yourself in the LAN menu.
  3. Allow Java to accept incoming connections in your firewall.
  4. Send your friends your public IP address with the port, for example 203.0.113.7:25565.

The downside: everyone you give the address to knows your home IP. If your provider changes the IP, you have to send it again. And behind CGNAT this doesn't work.

With a VPN: a virtual LAN

VPN software connects all players into one shared virtual network. To Minecraft it looks like you are on the same LAN. It works without router settings, but every player has to install the program, sign in and join the same network. Typical problems are timeouts when the virtual adapter isn't preferred, and firewalls blocking the VPN.

Common errors and fixes

  • LAN world not showing up: Check that everyone is on the same network and not on a guest network. Many routers isolate guest devices from each other. As a workaround your friend can use Direct Connection with your local IP and the port from the chat.
  • "Connection timed out: getsockopt": The connection isn't arriving. Usually a firewall blocks Java on the host PC, or the port forward points to the wrong IP. With CraftProxy the router can't cause this error, because the connection goes through the relay.
  • "Outdated client" or "Outdated server": You are on different Minecraft versions. Pick the same version in the launcher.
  • Missing or different mods: With a modpack everyone needs the same mods. See Play modpacks with friends.

Questions

Can you play a Minecraft LAN world over the internet?

Yes, but not with the game alone. You need port forwarding, a VPN everyone joins, or a relay. With CraftProxy you type /host and your friends join via an address without installing anything.

How do I know if I am behind CGNAT?

Compare the WAN IP in your router with the IP a "what is my IP" site shows you. If they differ, or the WAN IP starts with 100.64 to 100.127, you are behind CGNAT. If your router only shows an IPv6 address and something like DS-Lite, you have no public IPv4 address of your own. In both cases IPv4 port forwarding won't work; CraftProxy will.

Is port forwarding for Minecraft dangerous?

A single port forward for Minecraft is not a big risk as long as your PC is up to date. The downside is that every player sees your public IP address. With CraftProxy they only see the relay address.

Is a relay connection slower?

The detour through the relay can add some ping because the data doesn't flow directly. For normal play with friends it is usually hard to notice.