Setting up a Minecraft server on Windows, Mac, or Linux is a fun and rewarding experience. Whether you want to play with friends or create a large community, hosting your own Minecraft server allows you to customize the experience and manage your world however you like. In this guide, we’ll walk you through the process of setting up a Minecraft server on each of these operating systems.
What You’ll Need:
- A copy of Minecraft Java Edition (the only version that allows custom servers).
- A computer with Java installed (Minecraft uses Java, so it’s required for the server to run).
- Internet connection for downloading files and allowing players to connect (especially if hosting externally).
- Server software (Minecraft server
.jar
file). - Optional: Mods or Plugins if you’re setting up a modded or plugin-based server (e.g., Spigot or Paper for plugins).
Step 1: Download and Install Java
Minecraft requires Java to run the server. Most modern versions of Minecraft are compatible with Java 17 (or later).
Windows:
- Visit the official Java download page: Java Downloads (or a similar page for the latest version).
- Download and run the installer for Java Development Kit (JDK). Make sure to choose the correct version for your system (e.g., 64-bit or 32-bit).
- During installation, ensure that the Java installation path is added to the environment variables (the installer typically does this automatically).
Mac:
- Download the JDK from Oracle or use Homebrew to install it (
brew install openjdk@17
). - Install Java by running the downloaded
.dmg
file and following the prompts.
Linux:
- For most Linux distributions, you can install Java via the package manager. For example, on Ubuntu or Debian:
sudo apt update sudo apt install openjdk-17-jdk
- Alternatively, you can download Java from Oracle’s website and follow the installation instructions.
After installing Java, you can verify it by running this command in a terminal (or command prompt):
java -version
This should display the installed version of Java.
Step 2: Download the Minecraft Server Software
- Go to the official Minecraft website and download the Minecraft server
.jar
file:- Visit: Minecraft: Java Edition Server Download.
- Download the Minecraft Server .jar file to a folder on your computer (e.g.,
Minecraft_Server
).
Step 3: Set Up the Server Folder
- Create a new folder on your computer to store the server files (e.g.,
Minecraft_Server
). - Move the Minecraft server
.jar
file you downloaded into this folder.
Step 4: Run the Server for the First Time
Windows:
- Open Command Prompt:
- Press
Win + R
, typecmd
, and press Enter.
- Press
- Navigate to the folder where your Minecraft server
.jar
file is stored by typing:cd path\to\your\Minecraft_Server
(Replacepath\to\your\Minecraft_Server
with the actual path where the server.jar
is located.) - Run the server with this command:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
-Xmx1024M
allocates 1GB of RAM for the server (you can adjust this depending on your system’s available memory, e.g.,-Xmx2048M
for 2GB).nogui
disables the graphical user interface, making the server run more efficiently.
- The first time you run the server, it will generate several files, including the
eula.txt
file. You’ll need to agree to the End User License Agreement (EULA) before proceeding.
Mac/Linux:
- Open a Terminal window.
- Use the
cd
command to navigate to the folder where the.jar
file is located.cd /path/to/Minecraft_Server
- Run the following command:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
- After the server starts, the same
eula.txt
file will be created. Open it and changeeula=false
toeula=true
to accept the terms.
Step 5: Accept the EULA and Restart the Server
- Open the
eula.txt
file in a text editor (Notepad on Windows, TextEdit on Mac, or Nano/Vi on Linux). - Change the line that says
eula=false
toeula=true
and save the file. - After saving, run the server again using the same command. This will generate additional files, including the
server.properties
file.
Step 6: Configure the Server
- Open the
server.properties
file in a text editor to configure your server settings.- Here, you can change settings like:
- server-port: The port your server will use (default: 25565).
- max-players: Set the maximum number of players allowed on your server.
- difficulty: Adjust the difficulty level (peaceful, easy, normal, hard).
- spawn-monsters: Enable or disable monster spawns (
true
orfalse
). - level-name: The name of the world (can be changed to load different worlds).
- Here, you can change settings like:
Step 7: Port Forwarding (For External Connections)
To allow friends to connect remotely to your Minecraft server, you need to set up port forwarding on your router.
- Find your local IP address:
- On Windows, open Command Prompt and type:
ipconfig
Look for the IPv4 Address under your active network connection. - On Mac/Linux, use the command:
ifconfig
orip a
- On Windows, open Command Prompt and type:
- Login to your router:
- Open a browser and enter your router’s IP address (e.g.,
192.168.1.1
or192.168.0.1
). Refer to your router’s manual for login details.
- Open a browser and enter your router’s IP address (e.g.,
- Set up port forwarding:
- Forward TCP port 25565 to your local IP address (the IP you found earlier).
- The specific steps to do this will depend on your router model, but generally, you will need to navigate to the “Port Forwarding” or “NAT” settings and add a new rule for port
25565
.
- Test your server:
- To test if port forwarding is working, you can visit a site like canyouseeme.org and check if your server’s port is open.
Step 8: Connecting to Your Server
- Local Network: If you’re on the same network as the server, use the local IP address (e.g.,
192.168.x.x
). - Remote Connection: To connect from anywhere, use your public IP address. You can find your public IP by searching “What is my IP” on Google. Share this address with others so they can join your server.
Step 9: Optional – Install Mods or Plugins
If you want to run mods or plugins, you’ll need to install additional server software.
- For mods: You’ll need to set up Minecraft Forge.
- Download Minecraft Forge from here, and follow the installation instructions.
- Place mods in the
mods
folder created by Forge.
- For plugins: You can install Spigot or Paper for plugin support.
- Download Spigot or Paper from their respective websites and follow the instructions for installation.
- Install plugins by placing them in the
plugins
folder.
Conclusion
Setting up a Minecraft server on Windows, Mac, or Linux is straightforward and opens up a world of possibilities for you and your friends. With this guide, you can run a vanilla server or customize your server with mods and plugins. Whether you’re hosting a private world or running a community server, you’re now equipped to make the most of your Minecraft multiplayer experience!