> Intel // field guide_
How to Host a Minecraft Server on Your PC (Step-by-Step)
You've been playing Minecraft for hours, building structures and exploring, and now you want your friends in the same world. The next step is learning how to host a Minecraft server on your PC.
Hosting your own Minecraft server gives you complete control over gameplay, plugins, mods, and world rules. Setting one up on your personal computer is more involved than it looks, though. You'll deal with Java, RAM allocation, port forwarding, firewall rules, and your home internet connection.
This guide walks through the whole process for Minecraft Java Edition, from pre-flight checks to getting your friends connected.
Is Hosting a Minecraft Server on Your PC Right for You?
Before the technical setup, be realistic about what hosting a Minecraft server on your personal computer involves.
Benefits
- Complete control over server settings and world rules
- No monthly hosting fees
- Freedom to mod and customize gameplay
- Uses hardware you already own
Drawbacks
- Your PC must stay on for the server to stay online
- Higher electricity use
- Games and other apps compete with the server for CPU and RAM
- More technical setup
- Your home upload speed limits how many players you can support
If you'd rather skip port forwarding, firewall rules and keeping a PC running, a hosted server is the alternative. But if you want to do it yourself, let's get started.
Pre-Setup Checklist
Internet Requirements
Your upload speed (not download) is what matters most, because the server sends world data to every connected player. More players, larger view distances and resource packs all need more upload bandwidth. A stable wired connection helps more than raw speed. You can check your current speed at speedtest.net.
Hardware Requirements
- RAM: Enough to give the server a few GB while still running Windows or macOS and anything else you use. More players and mods need more RAM.
- Storage: Free disk space for the server files, world, and backups. Worlds grow as players explore.
- CPU: Single-core speed matters most, because the main game tick runs largely on one thread.
Software Requirements
- Minecraft Java Edition (to play on the server)
- A Java runtime that matches your Minecraft version (see Step 2)
- Administrator access to your computer
- Access to your router's settings for port forwarding
Step 1: Download the Minecraft Server Software
Mojang publishes the official server jar on the Minecraft website.
Here's how:
- Go to the Minecraft Java Edition server download page
- Download the server jar for the current release
- Create a dedicated folder, for example on your C: drive (Windows) or in your home directory (Mac/Linux)
- Move the jar file into this folder and rename it
server.jarif you like, so it matches the commands below
Name the folder something intuitive like MinecraftServer. All server files will live here.
Step 2: Install Java
Minecraft servers run on Java, and each Minecraft version needs a minimum Java version. Current Minecraft Java releases (26.1 and later) require Java 25 (Minecraft Wiki). If you're hosting an older Minecraft version, check which Java version it needs.
Note that the download on java.com is Java 8, which is too old for current servers. Use an OpenJDK build instead.
Windows and Mac
- Download a Java 25 installer, such as Eclipse Temurin from adoptium.net
- Run the installer and follow the prompts
- Open Command Prompt (Windows) or Terminal (Mac) and type:
java -version - Confirm it shows version 25 or later
Linux
- Install Java 25 from your distribution's package manager if it offers it (on Debian and Ubuntu releases that package it, the name is
openjdk-25-jre-headless), or use Temurin from adoptium.net - Verify the installation:
java -version
Step 3: Create the Server Launch Script
Your server needs a startup command. This is where RAM allocation comes in.
Windows
- Open your MinecraftServer folder
- Right-click in empty space and select "New > Text Document"
- Name it
launch.bat(make sure Windows isn't hiding a.txtextension) - Paste the following code:
@echo off
java -Xmx4G -Xms4G -jar server.jar nogui
pause
The -Xmx4G flag sets the maximum RAM (4GB in this example). The -Xms4G flag sets the starting RAM. Adjust both based on how much memory your PC can spare.
- Save the file and close it
- Double-click
launch.batto start your server
Mac/Linux
- Open Terminal and go to your MinecraftServer folder
- Create a new file:
nano launch.sh - Paste:
#!/bin/bash
java -Xmx4G -Xms4G -jar server.jar nogui
- Press Ctrl+X, then Y, then Enter to save
- Make it executable:
chmod +x launch.sh - Run it:
./launch.sh
Step 4: Accept the EULA
On first launch, the server creates a eula.txt file and stops. It won't start until you accept Minecraft's End User License Agreement.
Here's what happens:
- Run your launch script (the server stops and asks you to accept the EULA)
- Open
eula.txtin your MinecraftServer folder - Change
eula=falsetoeula=true - Save and run the launch script again
- The server generates the world and its files, which can take a minute or two
The server creates configuration files including server.properties. Once you see a line starting with "Done" and a hint to type "help" in the console, your server is running.
Step 5: Configure Your Server Settings (server.properties)
The server.properties file controls how your Minecraft server operates. Stop the server, then open the file in any text editor.
Common settings to adjust:
server-port=25565
max-players=20
difficulty=normal
gamemode=survival
pvp=true
spawn-protection=16
online-mode=true
white-list=false
Key settings explained:
server-port: 25565 is the default port; don't change it unless you need tomax-players: How many players can be online at once (set it based on your bandwidth and hardware)difficulty: peaceful, easy, normal, or hardgamemode: survival, creative, adventure, or spectatorpvp: Whether player-versus-player combat is enabledwhite-list: Whether only whitelisted players can join
Save the file without changing the file extension, then start the server again for changes to take effect.
Step 6: Configure Port Forwarding and Router Settings
This is the trickiest part of hosting a Minecraft server on your PC, and where many people get stuck.
Why port forwarding matters: Your computer has a private IP address (like 192.168.1.100). Your router has a public IP address. When friends connect, they connect to your public IP. Port forwarding tells your router to send incoming connections on port 25565 to your PC.
How to port forward (varies by router):
- Open your router settings (often 192.168.1.1 or 192.168.0.1 in your browser)
- Log in with your router credentials (often printed on a sticker on the router)
- Find "Port Forwarding," "Virtual Server," or "Port Mapping"
- Create a new rule:
- External Port: 25565
- Internal Port: 25565
- Internal IP: Your PC's local IP address (see below)
- Protocol: TCP (Java Edition connections use TCP)
- Save the rule
Finding Your Local IP Address
Windows:
- Open Command Prompt
- Type:
ipconfig - Look for "IPv4 Address" under your active connection
Mac:
- Open Terminal
- Type:
ipconfig getifaddr en0(or check System Settings > Network)
Linux:
- Open Terminal
- Type:
ip addr - Look for the "inet" address on your active connection
Router interfaces differ. If you're unsure, search "[your router brand/model] port forwarding." Some internet providers use carrier-grade NAT, which blocks port forwarding entirely; if a correct rule still doesn't work, ask your provider whether you have a public IP.
For more detail, see our Minecraft port forwarding guide.
Step 7: Reserve a Local IP and Set Up Dynamic DNS (Optional but Recommended)
Your PC's local IP address can change when it reconnects to the network, which breaks your port forwarding rule. Your public IP can change too.
Keep Your Local IP the Same
The simplest method on any operating system is a DHCP reservation in your router. Find your PC in the router's list of connected devices and reserve its current IP address. You can also set a static IP in your operating system's network settings, but then you must enter the subnet mask, gateway and DNS servers yourself.
Dynamic DNS Setup
Dynamic DNS services such as No-IP or DuckDNS give you a hostname that updates automatically when your public IP changes. Friends can use that name instead of remembering your IP.
Step 8: Configure Firewall Rules
Windows Firewall and third-party firewalls can block incoming connections.
Windows Firewall
The first time you start the server, Windows usually asks whether to allow Java through the firewall. Allow it on private networks. If you missed the prompt:
- Open "Windows Defender Firewall" from the Control Panel or Settings
- Click "Allow an app or feature through Windows Defender Firewall"
- Click "Change settings," then "Allow another app..."
- Browse to the
java.exeyou installed in Step 2 (for example, inside the Temurin folder under Program Files) and add it - Tick "Private" (and "Public" only if you really need it)
- Click OK
Alternatively, create an inbound rule in "Windows Defender Firewall with Advanced Security" that allows TCP port 25565.
Mac/Linux
If a firewall is enabled, allow incoming TCP traffic on port 25565 (or allow Java in macOS's firewall settings).
Step 9: Set Up the Whitelist and Operators
With online-mode=true, anyone with a Minecraft account and your address can join. Use the whitelist to restrict access, and operator (op) status to give admin rights.
Enable the Whitelist
Run whitelist on in the server console, or change white-list=false to white-list=true in server.properties and restart.
Add Players
The easiest way is from the server console:
whitelist add PlayerName
op PlayerName
The server looks up each player's UUID and writes whitelist.json and ops.json for you. You can also edit those files by hand while the server is stopped:
[
{
"name": "PlayerName",
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
]
Operator level 4 grants full administrative access, so only give it to people you trust.
Step 10: Share Your Server Address and Get Friends Connected
Once everything is configured, your friends need your address.
Your server address is: your public IP address, or your Dynamic DNS hostname.
Find your public IP by searching "what is my IP" from a device on your home network. If you kept the default port, players don't need to add :25565.
Connecting
- Open Minecraft Java Edition (the same version as your server)
- Go to Multiplayer
- Click "Add Server"
- Name it (e.g., "MyServer")
- Enter your public IP or hostname
- Click "Done" and join
You can't usually test the public address from inside your own network. Join with localhost yourself, and have a friend test the public address.
If friends can't connect, check that:
- Your server is still running
- Port forwarding points to your PC's current local IP
- Your firewall isn't blocking Java
- They're on the whitelist (if it's enabled)
Common Issues When Hosting a Minecraft Server on Your PC
"Can't connect to server"
- Verify the port forwarding rule in your router
- Confirm the server is running and the console shows no errors
- Check that friends are using your public IP, not your local IP
- Make sure your firewall allows Java or TCP port 25565
"Server keeps crashing"
- Read
logs/latest.logand thecrash-reportsfolder for the cause - Check you're using the Java version your Minecraft version needs
- If the log shows out-of-memory errors, raise
-Xmxif your PC has RAM to spare - Remove recently added plugins or mods
"Server is very laggy"
- Check whether your upload bandwidth is maxed out
- Lower
view-distanceandsimulation-distancein server.properties - Reduce max-players or remove heavy mods
- See our Minecraft server lag guide
"Some players can't connect but others can"
- Check whether the whitelist is enabled and they're on it
- Make sure they're running the same Minecraft version as the server
Bandwidth and Upload Speed
Every connected player receives a constant stream of world data from your PC. More players, a higher view distance and resource packs all increase the upload bandwidth the server uses. If your household also streams video or plays online at the same time, everyone competes for the same upload capacity, and players may lag.
Some internet plans also have data caps or rules about running servers, so check your provider's terms.
When to Consider a Hosted Minecraft Server
Hosting on your PC works well for small groups of friends. Consider a hosted server when:
- Your player count outgrows your upload speed or hardware
- You want the server online when your PC is off
- You're tired of router and firewall troubleshooting
- You want to run heavier modpacks without slowing down your own PC
- Your ISP limits data or blocks incoming connections
FAQ: Hosting a Minecraft Server on Your PC
How do I host a Minecraft server on my own computer?
Download the server jar, install the right Java version, create a launch script, accept the EULA, configure port forwarding and firewall rules, and manage player access with the whitelist. Follow the steps above for details.
Do I need to port forward?
For friends outside your home network to connect directly, yes. Port forwarding sends traffic from your public IP to your PC's private IP on port 25565. Players on your own network can join with your local IP without it.
How much internet speed do I need?
It depends on player count, view distance and mods. Upload speed matters far more than download speed. Start small and watch whether players lag when more people join.
Can my friends join my server?
Yes, as long as they have your public IP or hostname, your port forwarding is set up, and they're on the whitelist if you use one.
How do I host a Minecraft server on my PC without port forwarding?
You can use a VPN that puts you and your friends on the same virtual network, or a tunneling service that gives you a public address. Minecraft Realms and hosted servers are other options that avoid port forwarding entirely.
What's the difference between hosting on my PC and using a game server host?
Hosting on your PC is free and fully under your control, but it needs technical setup, uses your internet connection, and ties up your PC. A host runs the server on its own hardware and network, so it stays online when your PC is off.
How do I allocate more RAM to my Minecraft server?
Edit your launch script and change the -Xmx4G value. For example, -Xmx8G allows up to 8GB. Leave enough memory for your operating system and anything else you run, especially if you play on the same PC.
Can I run a modded server on my PC?
Yes. Install a mod loader such as Forge, NeoForge or Fabric. Modded servers need more RAM and CPU than vanilla, so your PC must be able to handle the extra load. See our guide to making a modded Minecraft server.
What happens if my internet goes down?
Your server goes offline and everyone is disconnected until your connection comes back.
How do I back up my Minecraft server world?
Stop the server (or run save-off and save-all first), then copy the world folder in your MinecraftServer directory somewhere safe. Backup plugins and mods can automate this.
Is hosting a Minecraft server on my PC cheaper than hosting?
There's no monthly fee, but you pay in electricity, wear on your hardware, and your own time. Whether it's cheaper depends on your setup and how long the server needs to stay online.
Conclusion
You now have a roadmap for how to host a Minecraft server on your PC. It takes some setup and ongoing management, but it's achievable for small groups.
Remember to:
- Install the Java version your Minecraft version needs
- Configure port forwarding carefully
- Give the server enough RAM without starving your PC
- Manage player access with the whitelist
- Keep an eye on bandwidth and performance
Hosting Your Minecraft Server With EZ Game Host
If you'd rather not run the server on your own PC, EZ Game Host offers Minecraft server hosting with plans from $12/month. Every plan includes 24/7 support and a 99.9% monthly uptime SLA, and you choose your server region at checkout. See the Minecraft plans to compare RAM, CPU and storage.
Intel
More Minecraft guides
- How to Make a Modded Minecraft Server (Forge & Fabric)How to make a modded Minecraft server with Forge or Fabric: Java versions, installing the loader, useful admin mods, fixing crashes and tuning performance.
- Best Minecraft Server Hosting: How to Choose in 2026How to choose the best Minecraft server hosting: a checklist covering Java vs Bedrock, RAM, CPU, server software, backups, location, billing and support.
- Best Modded Minecraft Server Hosting: Forge and FabricWhat to look for in the best modded Minecraft server hosting for Forge and Fabric: CPU, RAM for big modpacks, loader support, setup and performance tips.