Minecraft is more than just one of the world’s most popular video games. It is a powerful tool for teaching code, an open platform for mod developers, and the foundation of a massive global community.
Table of Contents
While playing on public servers is fun, launching your own private Minecraft server gives you complete control over your gaming experience. You set the rules, invite your friends, and create a customized world.
Here is a complete, step-by-step guide on how to host and configure your own Minecraft server across Windows, Mac, and Linux environments.
Before You Start: Prerequisites and Hosting Options
Setting up a Minecraft server requires a basic understanding of computer networking and command-line interfaces. Before diving into the installation, ensure you are comfortable with:
- Using the command line or terminal.
- Basic networking concepts (IP addresses, DHCP, and ports).
- Configuring your local system and network.
- Accessing and editing your home router’s configuration.
Home Server vs. Hosted Server
Running a server on your home desktop is perfectly viable, but you should use a wired Ethernet connection for maximum stability. Keep in mind that hosting from home exposes your personal network to the public.
If you want to avoid this security risk, or if you plan on hosting a large number of players, consider renting a Virtual Private Server (VPS) or a Dedicated Server from a hosting provider.
How to Host a Minecraft Server on Windows
1. Install the Latest Version of Java
Minecraft runs on Java, so having the latest version is critical.
- Open the Windows Control Panel, navigate to Programs, find Java, and click Update Now.
- To verify your version, open the Command Prompt and type
java -version. - If you do not have Java installed, download it directly from the official Java website.
2. Choose a Location for Your Server Files
Create a dedicated folder for your Minecraft server. The server software generates multiple configuration files upon its first launch, and keeping them organized in one specific folder (like on your Desktop or in your Documents) will prevent clutter.
3. Download and Configure the Server Software
- Download the official Minecraft server software (a
.jarfile) from the Minecraft website and place it in your dedicated folder. - Double-click the
.jarfile. It will briefly run and generate a few files, includingeula.txt. - Open
eula.txtin a text editor and change the lineeula=falsetoeula=trueto accept the End User License Agreement. Save the file. - Note: If you receive a “Can’t save server properties” error, right-click the
.jarfile and select Run as administrator.
4. Enable Port Forwarding
To allow players outside your home network to connect, you must forward TCP port 25565 on your router.
- Open the Command Prompt and type
ipconfigto find your server’s local IPv4 address. - Log into your router’s admin panel and use this local IP as the Output/Server IP for the forwarded port.
5. Start the Server
Open the Command Prompt and navigate to your dedicated server folder. Start the server by entering the following command (replace the .jar filename with your exact downloaded version):
java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui
To use the server’s graphical user interface instead, simply remove the nogui parameter at the end.
Find your public IP address by searching “my IP address” on Google. Share this public IP with your friends so they can connect, and verify your server is online using a Minecraft Server Status Checker.
How to Host a Minecraft Server on Mac
1. Verify Java Installation
Newer versions of macOS typically include Java by default. If you are running an older OS X version, download the legacy Java installer from Apple’s official website.
2. Prepare Your Server Folder
Create a new folder on your Desktop (or your preferred location) to house all of the server configuration files.
3. Download the Software and Create a Start Script
- Download the Minecraft server
.jarfile from the official website and move it into your new folder. - Open TextEdit, set the format to Plain Text, and paste the following script (ensuring the
.jarfilename matches exactly):
#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1G -Xmx1G -jar minecraft_server.1.12.2.jar nogui
- Save this file as
start.commandin the exact same folder as your.jarfile. - Open the Terminal, type
chmod a+x(make sure to leave a space after the ‘x’), and drag thestart.commandfile into the Terminal window. Press Enter to grant the file execution permissions.
4. Enable Port Forwarding
Log into your router to forward TCP port 25565. To find the local IP address you need to point the router toward, open your Terminal and type ifconfig.
5. Start the Server
Double-click the start.command file. A Terminal window will open and initiate the server. It is normal to see a few error messages during the very first boot. Once running, share your public IP address with external players so they can join your world.
How to Host a Minecraft Server on Linux
Using a Linux VPS or Dedicated Server is the best way to host a server without exposing your home network. You will need to connect to your Linux host via SSH to execute these steps.
1. Install Java
Log in as the root user and search for the available OpenJDK packages:
apt-cache search openjdk
Update your package list and install the Java Development Kit (this example uses OpenJDK 7, though you may opt for a newer version depending on your server’s requirements):
apt-get update
apt-get install openjdk-7-jdk
Press “Y” to authorize the installation. Verify it by typing java -version.
2. Create the Directory
Create and navigate into a dedicated directory for your server:
mkdir minecraft
cd minecraft
3. Download the Server Files and Install Screen
Download the server file using the wget command. Always check the official Minecraft site for the most up-to-date download URL.
wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
Install and run screen so your server continues running in the background even after you close your SSH connection:
yum install screen
screen
4. Start and Configure the Server
Launch the server, allocating 512MB of RAM (adjust -Xmx and -Xms up to 1G or more depending on your hosting plan):
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
To enable public server status querying, stop the server by typing stop. Open the server.properties file in a text editor, change enable-query=false to enable-query=true, and restart the server.
5. Point a Custom Domain to Your Server
Instead of forcing players to memorize a string of IP numbers, point a custom domain name to your server. Log into your domain registrar’s DNS settings and add an A Record.
Use @ for the root domain or a subdomain like mc as the hostname, and point it directly to your Linux server’s IP address. Note that global DNS propagation can take up to 24 hours.
Running your own Minecraft server requires some initial technical setup, but the payoff is a completely customizable, private world that you and your community can enjoy on your exact terms.

