Prerequisites:
- A computer with at least 4GB of RAM (more is preferable for better performance) and a recent version of Java installed.
- A stable internet connection.
- Basic understanding of your computer’s network settings (for configuring network and firewall rules).
Steps:
- Download the Minecraft Server Software:
- Visit the official Minecraft website (minecraft.net) and download the Minecraft server software. Choose the version that matches the Minecraft version you wish to play.
- Prepare the Server Folder:
- Create a new folder on your computer where you will store all the server files. You can name it something like “Minecraft_Server”.
- Move the Downloaded File:
- Move the downloaded server .jar file into the newly created folder.
- Run the Server for the First Time:
- Open a command prompt (CMD) or terminal window in the folder containing the server .jar file.
- Run the server .jar file using the following command:
java -Xmx2048M -Xms2048M -jar server_file_name.jar nogui
- Replace
server_file_name.jar
with the actual name of the server file you downloaded. - Adjust the
-Xmx2048M -Xms2048M
part to increase the amount of RAM allocated to the server if your computer has more RAM available.
- Agree to the EULA:
- After running for the first time, a file named
eula.txt
will be created. Open it and changeeula=false
toeula=true
to agree to Mojang’s End User License Agreement.
- Run the Server Again:
- Execute the same command in your command prompt or terminal to start the server again.
- Configure Your Network:
- To allow external connections, you’ll need to configure port forwarding on your router. Forward TCP port 25565 to the computer running the server.
- Ensure your firewall allows incoming connections on port 25565.
- Connecting to Your Server:
- The server setup is complete! Connect to your server using the host computer’s IP address (if playing locally) or your external IP address (for players outside your local network).
- You can find your external IP address by searching “What is my IP address” in a web browser.
Safety and Privacy Measures:
- Whitelist: Activate the whitelist in the
server.properties
file to allow only specified players to join your server. Enable it by settingwhitelist=true
and then use the command/whitelist add playername
in the server console to add players. - Server Settings: You can adjust various settings in the
server.properties
file, such as game mode, difficulty, and whether PvP (player vs. player combat) is allowed.
This setup provides a basic, private Minecraft server for you and your child to play on together. Remember, running a server on your home network may expose your network to risks, so ensure you understand the implications and configure network settings securely.