Creating a Minecraft server allows you and your friends to enjoy the game in your own private space, customizing it to your liking. Whether you’re using Windows or Ubuntu, setting up your own Minecraft server (Java Edition) can be a fun and rewarding project. Here’s a step-by-step guide to help you get started.
For Windows Users:
- Download Minecraft Server Software: First, visit the official Minecraft website to download the latest version of the server software. Save it in a dedicated folder.
- Install Java: Minecraft Server requires Java to run. Ensure you have the latest version of Java installed on your computer. You can download it from the official Java website.
- Run the Server Software: Double-click the server file you downloaded. It will create some configuration files in the folder. Initially, it will fail to run properly because you need to agree to the EULA (End User License Agreement).
- Agree to the EULA: Open the newly created
eula.txt
file in the server folder, changeeula=false
toeula=true
, and save the file. This indicates that you agree to the EULA. - Launch the Server: Run the server software again. This time, it should start properly, and your Minecraft server will be up and running.
- Configure Your Server: You can edit the
server.properties
file to customize your server settings, such as game mode, difficulty, and more. - Port Forwarding: To allow external players to connect to your server, you’ll need to set up port forwarding on your router. Forward TCP port 25565 to your computer’s IP address.
- Connecting to Your Server: You can connect to your server using your computer’s local IP if you’re playing on the same network or your public IP if you’re playing from different locations.
For Ubuntu Users:
- Install Java: Open a terminal and install Java using the command
sudo apt install openjdk-17-jre
. This command may vary based on the current version of Java, so ensure you’re installing the latest version compatible with Minecraft. - Download Minecraft Server Software: Use
wget
followed by the direct download link from the official Minecraft website to download the server software into a dedicated directory. - Install Screen: Screen is a terminal tool that allows your server to run in the background. Install it using
sudo apt install screen
. - Run the Server: Navigate to your server directory and start a new Screen session. Run the server software with
java -Xmx1024M -Xms1024M -jar serverfile.jar nogui
, replacingserverfile.jar
with the actual server file name. Adjust the memory allocation (-Xmx
and-Xms
) according to your server’s requirements. - Agree to the EULA: Similar to Windows, modify
eula.txt
to agree to the EULA. - Launch the Server in Screen: With the EULA agreed upon, start the server again inside a Screen session to keep it running in the background.
- Configure Your Server and Port Forwarding: As with Windows, customize your server by editing
server.properties
and set up port forwarding on your router to allow external connections. - Connecting to Your Server: Use your local or public IP address to connect, depending on where you’re accessing the server from.
Remember, running a Minecraft server on your computer can consume significant resources. Ensure your system meets the requirements and consider dedicating a machine to server hosting for the best performance. Enjoy creating a world of your own with friends and family!