How to open to LAN with commands in Minecraft
Type /publish true 25566 in chat in your singleplayer world to open it to LAN on port 25566 with commands allowed.
publish
Opens a singleplayer world to your local network (LAN), optionally allowing commands and choosing a port.
/publish [<allowCommands>] [<port>] Examples
/publish Opens the world to LAN.
/publish true 25566 Opens to LAN on port 25566 with commands allowed.
Arguments
allowCommandsOptionaltruelets LAN players use commands.portOptional- Port to host on, from 0 to 65535.
What it does
This is the command version of Open to LAN and is meant for singleplayer worlds; a dedicated server already accepts connections. allowCommands sets whether LAN players can use commands, and port picks the port.
Good to know
- Needs operator permission level 4 (owner), the level
opgrants by default.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.