How to Use the Connect Command – Wiki Guide
This Minecraft tutorial explains how to use the /connect command with screenshots and step-by-step instructions.
The /connect command attempts to connect to the websocket server on the provided URL (see also /wsserver). Let’s explore how to use this game command.
Requirements
To run game commands in Minecraft, you have to turn cheats on in your world.
Connect Command
Connect Command in Minecraft Pocket Edition (PE)
In Minecraft Pocket Edition (PE), the syntax to attempt to connect to the websocket server on the provided URL is:
/connect <serverUri>
Definitions
- serverUri is the URL of the websocket server to attempt to connect to.
Examples
Example in Pocket Edition (PE)
To connect to the server called minecraftserver.example.com using the default port in Minecraft PE:
/connect minecraftserver.example.com
To connect to the server called minecraftserver.example.com on port 19132:
/connect minecraftserver.example.com:19132
To connect to the server at 198.162.0.10 on port 19132:
/connect 198.162.0.10:19132
TIP: The URL minecraftserver.example.com, minecraftserver.example.com:19132 and 198.162.0.10:19132 are fictious servers and used for demonstration purposes.
How to Enter the Command
1. Open the Chat Window
The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:
- For Java Edition (PC/Mac), press the T key to open the chat window.
- For Pocket Edition (PE), tap on the chat button at the top of the screen.
- For Xbox One, press the D-Pad (right) on the controller.
- For PS4, press the D-Pad (right) on the controller.
- For Nintendo Switch, press the right arrow button on the controller.
- For Windows 10 Edition, press the T key to open the chat window.
- For Education Edition, press the T key to open the chat window.
2. Type the Command
In this example, we will attempt to connect to the server called minecraftserver.example.com with the following command:
/connect minecraftserver.example.com
Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.
Once the cheat has been entered, the game will try to connect to the server.
Congratulations, you just learned how to use the /connect command in Minecraft!