minecraftlocalhostserver setupguides

How to Set Up a Local Host Minecraft Server (And When to Stop)

Step-by-step guide to running a localhost Minecraft server on your own PC — plus an honest look at the limits of self-hosting and when a dedicated server makes more sense.

How to Set Up a Local Host Minecraft Server

Running a local host Minecraft server on your own computer is completely doable, and for a small group it works well enough. This guide walks through the setup step by step — Java Edition, no mods required to start — then covers the honest limitations so you know what you're getting into before you commit.

Short answer: A localhost Minecraft server takes about 15 minutes to set up and works fine for 2–5 friends on the same network or via port forwarding. Beyond that, the cracks start to show.


What You Need Before You Start

  • A computer running Windows, macOS, or Linux
  • Java 21 or newer (download from Adoptium)
  • At least 4 GB of RAM free to dedicate to the server process
  • A reasonably fast internet connection if you want players joining remotely (not just over LAN)

Check your Java version first:

java -version

If nothing returns, or the version is below 21, install it before continuing.


Step 1 — Download the Minecraft Server JAR

Go to minecraft.net/en-us/download/server and download the latest server.jar. Create a dedicated folder for it — something like C:\MinecraftServer or ~/minecraft-server. Put the JAR in there.


Step 2 — Run the Server for the First Time

Open a terminal in that folder and run:

java -Xmx2G -Xms1G -jar server.jar nogui

The server will stop immediately and generate a file called eula.txt. Open it, change eula=false to eula=true, and save. This accepts Mojang's end-user licence agreement.

Run the same command again. This time the server fully starts. You'll see a > prompt and log output as the world generates.

RAM tip: The -Xmx2G flag sets the maximum heap to 2 GB. For a vanilla server with 2–4 players, 2 GB is enough. For 5–10 players or light mods, bump it to -Xmx4G.


Step 3 — Connect From the Same Computer

Open Minecraft, go to Multiplayer, and add a server. Use localhost as the address. That's it — you're in. This works because Minecraft's server and client are running on the same machine, so no networking is involved yet.


Step 4 — Let Friends Join Over LAN (Same Network)

If your friends are on the same Wi-Fi or wired network — same house, same office — they can connect using your local IP address. Find it with:

  • Windows: ipconfig in Command Prompt, look for IPv4 Address
  • macOS/Linux: ifconfig or ip a, look for inet under your network interface

It'll look something like 192.168.1.105. Your friends add that as the server address in Minecraft. No port forwarding needed for LAN play.


Step 5 — Port Forwarding for Remote Players

This is where a localhost Minecraft server setup gets more involved. If players outside your network want to join, you need to forward port 25565 (the default Minecraft port) through your router to your computer.

The exact steps vary by router brand, but the general process is:

  1. Log into your router admin panel (usually 192.168.1.1 or 192.168.0.1 in your browser)
  2. Find the Port Forwarding section (sometimes under "NAT" or "Advanced")
  3. Create a rule: TCP/UDP, external port 25565, internal IP = your computer's local IP, internal port 25565
  4. Save and restart the router if needed

Once that's done, share your public IP address with friends so they can connect. Find your public IP at whatismyip.com.

One problem: your home IP likely changes periodically (this is called a dynamic IP). If it changes, your friends' server address stops working. Some routers support Dynamic DNS (DDNS) to get around this — your ISP may offer it, or free services like No-IP work for this.


Configuring Your Server

The server.properties file in your server folder controls most of the important settings. A few worth knowing:

SettingWhat it does
max-playersCap on concurrent players
gamemodesurvival, creative, adventure, spectator
difficultypeaceful, easy, normal, hard
online-modeSet to false only if using cracked clients (not recommended)
server-portDefault 25565 — change if you're running multiple servers
view-distanceLower this (try 8) to reduce server load

Restart the server after editing this file for changes to take effect.


The Real Limitations of Self-Hosting

A localhost Minecraft server works. But there are genuine downsides worth understanding before you build a world your friends depend on.

Your server goes down when your PC does

The biggest practical problem: your server is only online when your computer is on and the server process is running. If you close the lid on your laptop, everyone gets kicked. If Windows decides to restart for an update at 2am, your friends lose progress if they were online.

For a casual 2–3 player group where you all play at the same time, this isn't a big deal. For a server where people expect to log in whenever they want, it becomes a constant issue.

Performance is shared with your OS and other apps

When you're gaming, streaming, or running other software, those resources compete with your Minecraft server process. Server tick rate drops, players notice rubber-banding and lag spikes. A dedicated machine helps, but most people running a localhost Minecraft server are also using that machine for other things.

Your home IP is exposed

When you share your public IP for friends to connect, anyone with that address can see it's a residential connection and target it. Residential IPs have no DDoS protection. A targeted flood can knock your internet offline for everyone in your house, not just the server.

This is a low probability event for a small friends server, but it's not zero — especially if your server grows or you share the address publicly.

Upload bandwidth limits how many players can join smoothly

Minecraft is not bandwidth-intensive, but it adds up. Each player connected to your server uses roughly 10–20 KB/s of your upload. On a 10 Mbps upload connection that's fine for 10 players. The problem is latency, not throughput — residential connections are optimised for download, not upload, and that asymmetry shows up as jitter for remote players.

No automatic backups (unless you set them up)

If something goes wrong — corruption, a griefed world, a bad mod install — there's no backup to roll back to unless you've manually scripted one yourself. World recovery on a self-hosted server means whatever you've personally backed up, nothing more.


Localhost vs. Dedicated Hosting: The Honest Comparison

Local Host Minecraft ServerDedicated Hosting
CostFree (electricity aside)From $5.99 your first month
UptimeOnly when your PC is on24/7
PerformanceShared with your OSDedicated resources
DDoS protectionNoneIncluded
BackupsManualAutomatic
Port forwardingRequiredNot needed
Dynamic IPProblemNot applicable
Setup time15–30 minutesUnder 2 minutes

For a 2–3 player group that always plays together at the same time, self-hosting is a perfectly reasonable call. You don't need to spend money on something that works fine for your use case.

For anything beyond that — players in different time zones, a world you care about losing, 5+ players, or modpacks — a hosted server starts to make more sense. The cost difference is small and you get uptime, DDoS protection, and automatic backups without thinking about it.


If You Want to Skip the Setup

If port forwarding, dynamic IPs, and manual backups sound like more hassle than they're worth, 3LifeHosting.com offers Minecraft server hosting starting at $5.99 your first month. Your server is live within seconds of checkout, no configuration required. Plans include automatic backups, DDoS protection, and full mod support.

Browse Minecraft hosting plans


Quick Reference

Start the server:

java -Xmx2G -Xms1G -jar server.jar nogui

Connect locally: localhost

Connect on LAN: Your local IP (e.g. 192.168.1.105)

Connect remotely: Your public IP (requires port forwarding on port 25565)

Default config file: server.properties in your server folder