Connect to a Websocket Server with wsserver
The /wsserver command in Minecraft Bedrock Edition attempts to connect your game to a websocket server using a URL you provide. You can also use this command to disconnect from an active websocket server.
Players and server administrators use this command when setting up external tools or services that communicate with Minecraft through a websocket connection. Because it requires admin permissions, cheats must be enabled in your world to run it.
/wsserver <serverUri: text>WSServer
| Argument | Type | What it means |
|---|---|---|
serverUri | text | A `URI` of the server to connect to. Or use an empty `string` to disconnect. |
/wsserver ws://localhost:8080Attempts to connect to a local websocket server running on port 8080.
/wsserver ws://127.0.0.1:3000Connects to a local websocket server using the loopback IP address on port 3000.
/wsserver ws://192.168.1.50:19134Connects to a websocket server hosted on another computer on the same home network.
/wsserver ws://10.0.0.12:9001/minecraftConnects to a local network websocket server at a specific path.
/wsserver wss://ws.example.com:8443Attempts to connect to a remote websocket server domain on port 8443.
/wsserver ""Passes an empty string to disconnect from the currently connected websocket server.
Minecraft Java Edition does not have a /wsserver command, as this feature is exclusive to Bedrock Edition.
It attempts to connect your Minecraft Bedrock Edition game to a websocket server at the URL or URI you provide.
You can disconnect from the active server by running the /wsserver command with an empty string as the serverUri argument.
The command requires an Admin permission level and cheats must be enabled in the world, otherwise the game will not let you run it.
/allowlist/changesetting/deop/kick/list/op/permission/save/setmaxplayers/stop/transfer