How to Set Up a Minecraft Server at Home (The Complete 2026 Walkthrough)
So you want to set up a Minecraft server at home. Maybe you’re tired of one person hosting a LAN world that vanishes the moment they rage-quit and close the game. Maybe you want a persistent world that survives the night, your friends, and the occasional creeper-induced architectural disaster. Either way, you’ve come to the right place.
Here’s the good news: spinning up a Minecraft server on your own PC is genuinely doable in an afternoon. It’s mostly free software, a few terminal commands, and one fiddly router step. Here’s the honest news: by the end, you’ll understand exactly why so many people eventually move that server *off* their home PC. We’ll get there. First, let’s build the thing.
Key Takeaways
• To set up a Minecraft server at home you need Java installed, a server.jar file (vanilla or Paper), a dedicated folder, and a single command to launch it.
• The launch command looks like `java -Xmx2G -Xms2G -jar server.jar nogui` — the `-Xmx` flag controls how much RAM the server gets.
• You must accept the EULA (edit `eula.txt` to `eula=true`) before the server will run.
• The trickiest step is port forwarding TCP/UDP 25565 on your router to your PC’s local IP so friends outside your network can join.
• Home hosting is perfect for learning and small LAN groups, but it exposes your home IP, leans on your limited upload bandwidth, and requires your PC to stay on 24/7 — which is exactly why dedicated game hosting exists.
This guide is part of our larger game server hosting complete guide, so once you’ve mastered the home setup, you’ll know precisely when (and why) to graduate.
What do you need before you set up a Minecraft server at home?
Before you touch a single config file, gather your supplies. You need surprisingly little:
- A PC that will be the server. It can be the same machine you play on (with caveats we’ll cover), but ideally it’s a box that can stay powered on.
- Java installed. Modern Minecraft (Java Edition) requires a current Java runtime. As of recent versions, that means Java 21 or newer. The server simply won’t start on an outdated Java version.
- The official Minecraft server file (`server.jar`) or a performance-tuned alternative like Paper.
- Admin access to your router for the port forwarding step.
A quick note on flavors. Vanilla is the official server from Mojang: pure, unmodified Minecraft. Paper is a community-built drop-in replacement that’s far more performant and supports plugins. For a home server with friends, Paper is the popular choice because it squeezes better minecraft tps out of the same hardware. The setup steps are nearly identical for both, so pick whichever suits you.
To check whether Java is already installed, open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and run:
“`bash java -version “`
If you see a version number of 21 or higher, you’re set. If you see “command not found” or an old version, install a current JDK first.
How do you install and launch the Minecraft server?
Here’s the core sequence. Follow it in order and you’ll have a running server in minutes.
Step 1 — Make a dedicated folder. The server generates a *lot* of files on first run. Give it its own home so it doesn’t bury your Downloads folder.
“`bash mkdir minecraft-server cd minecraft-server “`
Step 2 — Download the server.jar. Get the vanilla server file from Minecraft’s official download page, or grab the latest Paper build from the Paper project. Drop the `.jar` file into your new folder. Rename it `server.jar` to keep the commands tidy.
Step 3 — Run it for the first time. From inside the folder, launch the server with:
“`bash java -Xmx2G -Xms2G -jar server.jar nogui “`
Let’s decode that command, because you’ll type it a lot:
- `java` — runs Java.
- `-Xmx2G` — the maximum RAM the server may use (here, 2 GB).
- `-Xms2G` — the starting RAM. Setting it equal to `-Xmx` avoids stutters from resizing.
- `-jar server.jar` — the file to run.
- `nogui` — skips the resource-hungry graphical window. Always use it on a server.
The server will start, print some logs… and then immediately stop with a complaint about the EULA. That’s expected.
Step 4 — Accept the EULA. The first run creates a file called `eula.txt`. Open it and change one line:
“`properties eula=false “`
to:
“`properties eula=true “`
By doing this you’re agreeing to Mojang’s End User License Agreement. Save the file, then run the launch command from Step 3 again. This time the server boots fully, generates the world, and lands you at a console prompt. Congratulations — you have a live Minecraft server. Right now, though, only people on your local network can reach it.
How do you configure server.properties?
When the server first ran, it created `server.properties` — the control panel for your world. Open it in any text editor. There are dozens of settings; here are the ones that actually matter for a fresh home server:
“`properties server-port=25565 gamemode=survival difficulty=normal max-players=10 view-distance=10 online-mode=true motd=Welcome to our home server! “`
Here’s what each one does and why you’d touch it:
| Setting | What it controls | Sensible home value |
|---|---|---|
| `server-port` | The network port the server listens on | `25565` (the Minecraft default) |
| `gamemode` | Default mode for joining players | `survival` or `creative` |
| `difficulty` | Mob aggression and damage | `easy`, `normal`, or `hard` |
| `max-players` | How many can be online at once | Match it to your bandwidth (more below) |
| `view-distance` | Chunks rendered around each player | `10` default; lower it to ease CPU/RAM load |
| `online-mode` | Verifies players against Mojang accounts | `true` (keep it on for security) |
| `motd` | The message shown in the server list | Whatever greeting you like |
A few field notes. Leave `online-mode=true` unless you have a very specific reason not to — it stops people from impersonating accounts and is a basic security guardrail. Drop `view-distance` to 6–8 if your hardware groans; it’s one of the biggest levers on server load. And keep `max-players` honest about your connection, which brings us to the next two steps.
How do you allocate RAM to a Minecraft server?
RAM is the fuel your server burns to keep chunks loaded and players moving smoothly. Too little and the server lags, stutters, or crashes; too much (more than your PC actually has free) and you’ll starve the rest of your system.
You allocate RAM right in the launch command via those `-Xmx` and `-Xms` flags:
“`bash java -Xmx4G -Xms4G -jar server.jar nogui “`
That gives the server 4 GB. A rough rule of thumb for a vanilla or Paper survival server: 2 GB comfortably handles a handful of friends, 4 GB suits a small active community with some plugins, and you scale from there. The golden rule is never allocate more RAM than your machine can spare — if you assign 8 GB on a PC with 8 GB total, your operating system (and your game, if you’re playing on the same box) will choke.
This topic runs deeper than one command — chunk loading, garbage collection flags, and right-sizing all play in. We cover the full picture in allocate ram minecraft, which is worth a read once your server has real players on it.
How do you port forward 25565 so friends can join?
This is the step that trips up most home hosters, so take it slow. Right now your server is reachable by anyone *on your home network* (same Wi-Fi/LAN). To let outside friends connect, you must port forward — telling your router to send incoming Minecraft traffic to your specific PC.
Step 1 — Find your PC’s local IP. This is the internal address your router assigned your computer (usually something like `192.168.1.x`).
“`bash
ipconfig
ip addr “`
Look for the IPv4 address on your active connection. Write it down — say it’s `192.168.1.42`.
Step 2 — Log into your router. In a browser, go to your router’s admin page (commonly `192.168.1.1` or `192.168.0.1`) and sign in.
Step 3 — Create a port forwarding rule. Find the “Port Forwarding” section (sometimes under Advanced, NAT, or Virtual Server). Create a rule like this:
| Field | Value |
|---|---|
| External port | `25565` |
| Internal port | `25565` |
| Protocol | TCP and UDP (or “Both”) |
| Internal IP | `192.168.1.42` (your PC’s local IP) |
Minecraft Java primarily uses TCP on port 25565, but forwarding both TCP and UDP is the safe, hassle-free choice. Save the rule and, if prompted, reboot the router.
Step 4 — Allow the port through your firewall. Your PC’s firewall may still block incoming connections. On Windows, add an inbound rule for port 25565:
“`powershell New-NetFirewallRule -DisplayName “Minecraft Server” -Direction Inbound -LocalPort 25565 -Protocol TCP -Action Allow “`
Step 5 — Find your public IP for friends. Friends don’t connect to your local `192.168.x.x` address — they connect to your *public* IP, the one your internet provider gives your whole home. Find it by visiting any “what is my IP” site, or run:
“`bash curl ifconfig.me “`
Hand that public IP to your friends. They enter it (optionally as `your.public.ip:25565`) in Minecraft’s “Add Server” screen, and they’re in. You’ve just turned your bedroom PC into an internet-facing game server.
Here’s the lesson nobody tells you up front: setting up a Minecraft server at home teaches you how the whole thing actually works — Java, ports, configs, the lot. But the moment you forward port 25565 and hand friends your public IP, your home network *becomes a public game server*, and that quietly exposes the four problems no home setup can escape. One: your PC must stay ON 24/7 — and be powerful enough to both host *and* let you play. Two: your home *upload* bandwidth (almost always the weaker half of a home connection) now caps how many players you can actually serve before everyone lags. Three: your home IP address is exposed to everyone who joins — a genuine security and DDoS concern, because that’s the same IP your whole household browses, banks, and works on. Four: most home connections get a *dynamic* IP that changes periodically, silently breaking the address you gave your friends. None of these are bugs in your setup. They’re the inherent limits of running a public service on a private home connection. That’s the real takeaway: home hosting is brilliant for learning and a few friends, but a server meant to stay up, stay fast, and stay safe wants a real always-on host with proper upload bandwidth, a static IP, and DDoS protection.
Home server vs. hosted server: what’s the real trade-off?
Once your home server has a few friends on it, the cracks start to show. Here’s the honest comparison:
| Factor | Home server (your PC) | Hosted / VPS / dedicated |
|---|---|---|
| Uptime | Only while your PC is on and awake | 24/7, always reachable |
| Bandwidth | Limited home *upload*; competes with your household | Dedicated, high upload built for serving |
| Your IP | Your real home IP is exposed to every player | Server’s IP exposed, your home stays private |
| Security / DDoS | An attack hits *your* home internet | DDoS protection shields the server, not your house |
| IP stability | Often dynamic — changes and breaks the address | Static IP that never changes |
| Performance | Shared with your gaming, browsing, everything else | Dedicated CPU/RAM tuned for game server performance |
| Electricity & wear | Your PC runs (and draws power) around the clock | Included; not your power bill, not your hardware |
| Cost | “Free” minus electricity, bandwidth, and your time | A monthly fee, but it’s *someone else’s* problem |
Notice the pattern: every advantage of home hosting is about *learning and convenience*, and every advantage of hosted is about *running a real, reliable service*. That’s why the typical journey looks like: set it up at home, fall in love with running a server, hit the home-network ceiling, and migrate to a proper host.
Why do people move to a hosted server?
People graduate off home hosting for one simple reason: the server starts to matter. When it’s just you and a friend messing around for an evening, your PC is fine. But the day your server becomes the place a dozen friends expect to log into any time, the home setup’s limits become daily annoyances — the server’s down because you turned your PC off, everyone lags during the evening rush because your upload is maxed, or your IP changed and nobody can connect.
A hosted server flips all of that. It’s always on. It has bandwidth built for serving players, not for one household’s Netflix-and-browsing. It keeps your home IP private and absorbs DDoS attacks on its end. And a dedicated game server gives you the strong single-thread CPU performance Minecraft craves for smooth tick rates. Moving up isn’t admitting your home setup failed — it succeeded so well it outgrew the bedroom.
Graduate your server with DarazHost
DarazHost game-ready VPS and dedicated servers solve everything home hosting can’t. You get always-on 24/7 uptime, fast dedicated upload bandwidth built for serving real player counts, a stable IP that won’t change out from under your friends, and DDoS protection that shields the server — not your home network. Under the hood, strong single-thread CPU performance and SSD storage keep your TPS smooth even with plugins and a busy world.
Graduate your Minecraft server from your bedroom PC to real infrastructure — same world, same friends, none of the home-hosting headaches — backed by 24/7 support whenever you need a hand. When your server starts to matter, give it a home that’s actually built to host.
Frequently asked questions
How much RAM do I need to host a Minecraft server at home? For a small group of friends on vanilla or Paper, 2 GB is a comfortable starting point. A more active server with plugins benefits from 4 GB or more. The cardinal rule: never allocate more RAM than your machine can spare after the operating system (and your game, if you’re playing on the same PC) takes its share.
Do I have to port forward to play with friends? Only for friends *outside* your home network. Anyone on the same Wi-Fi/LAN can join using your PC’s local IP with no port forwarding at all. To let internet friends connect, you forward TCP/UDP port 25565 on your router to your PC’s local IP, then share your *public* IP.
Why won’t my Minecraft server start? The two most common culprits are an outdated Java version (the server needs Java 21+ for recent Minecraft) and a non-accepted EULA (you must set `eula=true` in `eula.txt`). If friends can’t connect but the server runs locally, the issue is almost always port forwarding or your firewall.
Is it safe to host a Minecraft server at home? It works, but it carries real trade-offs. Port forwarding exposes your home’s public IP to every player, which is a security and DDoS concern, and a determined attacker hitting that IP affects your *entire* household’s connection. For a few trusted friends it’s usually fine; for a public or growing server, a host with DDoS protection is the safer path.
What’s the difference between vanilla and Paper servers? Vanilla is the official, unmodified Mojang server. Paper is a community-built, drop-in replacement that’s significantly more performant and supports plugins. For most home servers, Paper delivers better tick rates on the same hardware, which is why it’s the popular pick once you want more than a basic world.