How to run your own Minecraft server, from zero to friends joining (and the shortcut that skips the work)
How to run your own Minecraft server, from zero to friends joining (and the shortcut that skips the work)
Last updated 2026-08-12
Short answer
You can run a Minecraft server for free on your own PC: install Java 25, download server.jar from minecraft.net, run java -Xmx2G -jar server.jar nogui, accept eula.txt, then open port 25565 for friends. The real limits: your home IP changes almost daily, the PC must stay on, and many home connections sit behind CGNAT where port forwarding is impossible — the alternative is hourly hosting from ฿0.30/hour.
Steps at a glance
Install Java 25
Download server.jar
Run it once and accept the EULA
Configure server.properties
Open port 25565
Share your IP with friends
Contents
Contents
You want a Minecraft server for your group. The work has two halves: getting the server running (easier than people expect — ten minutes to first results) and making it reachable for friends who live somewhere else (the real boss fight). This article walks through both halves without skipping steps, is honest about the limits of hosting from home, and ends with the shortcut for people who would rather not maintain any of it.
Three ways to get a server, compared
"Having a Minecraft server" can mean three different arrangements, and each trades something different — see the whole board before picking:
Option
What it really costs
What you maintain
How friends join
Your own PC
Free, plus roughly ฿11–16/day of electricity if it stays on
Installing, updating, backups, port forwarding — and the machine stays on
Your home IP — with its daily changes and the CGNAT risk
Rent a VPS and set it up
A fixed monthly rent, charged even in months you barely play
Almost everything from the first row, plus running a Linux box — but you get a real IP that is on 24/7
The VPS's IP
uniz.host
Hourly, only while the server is online, from ฿0.30/hour with a ฿5/day cap
Almost nothing — installed for you, backups built in, networking ready
A permanent domain for your server, no port forwarding
Choosing the do-it-yourself path? Let's go step by step. Everything below assumes Windows, since most people run this from the family PC.
The do-it-yourself path: from zero to friends joining
Install Java 25
Minecraft Java Edition is a Java program — the machine needs a Java new enough for the game version you plan to run. The current versions (the year-style numbers, like 26.x) need Java 25; older versions follow this table:
Minecraft version
Java you need
Year-style (26.x) and the latest release
Java 25
1.20.5 – 1.21.x
Java 21
1.17 – 1.20.4
Java 17
1.16.5 and below
Java 8
Java is a free download from adoptium.net (the package is called Eclipse Temurin) — pick the number from the table. During installation, watch for the Add to PATH and Set JAVA_HOME options and tick both, so the java command works from anywhere.
Check it worked: open a fresh Command Prompt (Win + R, type cmd) and run java -version. It must print the version you just installed. If it prints an older number, the machine has several Javas and the system still points at an old one — uninstall the old one, or reinstall with Add to PATH ticked.
Download server.jar
The official server is a free download on minecraft.net's server download page (search "minecraft server download" — first result). The file arrives as server.jar, and the page always offers only the latest version.
Make a dedicated folder first, for example C:\mcserver, and put the file there — on first run the server creates a pile of files and folders around itself.
Run it once and accept the EULA
Open Command Prompt and run these two commands:
cd C:\mcserver
java -Xmx2G -jar server.jar nogui
-Xmx2G is the RAM ceiling you grant the server (2GB here). How much you should give it depends on the group size and mods — see the table in how much RAM a game server needs.
The first run works for a moment and then stops by itself, leaving behind a file called eula.txt — that is normal behavior, not an error. Open it in Notepad, change eula=false to eula=true (that is you accepting Mojang's usage agreement), save, and run the same command again.
This time wait until you see a line like Done (3.2s)! For help, type "help" — the server is up. Test immediately from the same machine: open the game → Multiplayer → Add Server → address localhost. You should see the server and be able to join.
If instead the console shows UnsupportedClassVersionError, the Java on the machine is older than this game version needs — go back to the Java step and re-check java -version. (If you hit this error after installing mods or a modpack, on a game version that is already correct, the full fix is in Java runtime and modded servers.)
Configure server.properties
After the first run, the folder contains server.properties — the server's main control panel, editable in Notepad. The keys worth knowing before letting anyone else in:
Key
What it does
motd
The text under your server's name in players' server lists
max-players
Player cap (default 20)
gamemode
Default mode for new players, e.g. survival, creative
difficulty
peaceful / easy / normal / hard
view-distance
How far the world loads around each player (default 10) — lowering it relieves both the machine and the network noticeably
white-list
Set true, then add friends with the console command whitelist add playername — any server with an open port should have this on
online-mode
true = verify genuine accounts. Don't turn it off without a real reason — with it off, anyone can impersonate any name
server-port
The server's port (default 25565)
After editing, save and restart the server for the changes to apply — shut down properly by typing stop in the console (it saves the world before exiting), then run the start command again.
Open port 25565
At this point the server genuinely runs, but nobody outside the house can reach it: routers pass no inbound connections to any machine by default. You need port forwarding — point port 25565 (protocol TCP) at the machine running the server, and open the same port in Windows Firewall too. The screen-by-screen walkthrough, including pinning your internal IP so the rule doesn't silently break, is in what is port forwarding and how to let friends join.
Check it worked: test your public IP against an online port checker on port 25565 — it must say open. If it says closed even though everything is configured correctly, suspect CGNAT first (how to check is in the same article) — a large share of Thai home connections have it, and it makes port forwarding impossible no matter what you configure.
Share your IP with friends
Search "what is my IP" and send the number to your friends. On their side: open the game → Multiplayer → Add Server → enter IP:25565 (or just the IP — the game fills in the standard port 25565 by itself).
One testing caution: don't test from a phone on the same home Wi-Fi. Many routers can't loop a connection back into their own network (NAT loopback), which produces the classic "works for me, not for them" confusion — or the reverse. Turn Wi-Fi off and test over 4G/5G to see exactly what your friends will see.
The limits you will meet hosting from home
All of this is what actually awaits everyone hosting from home — facts, not sales copy. Some have workarounds, some don't:
Your home IP changes almost daily — home connections use dynamic IPs: whenever the router reboots or the ISP rotates addresses, your server's address changes and you're re-sending the new one to friends. The mitigation is DDNS (a free domain that tracks your IP automatically, e.g. DuckDNS) — but DDNS does nothing about CGNAT.
CGNAT closes the door before you start — if your ISP shares one public IP across many households, forwarding on your own router changes nothing. The only fix is requesting a public IP from the ISP (free with some, a monthly fee with others) — check this before spending time on any other setup.
The PC must stay on — friends can join only while your machine runs. A PC drawing 100–150W around the clock is 2.4–3.6 kWh/day, roughly ฿11–16/day at about ฿4.5/unit — ฿330–490 a month, which is more than an entire month of a hosted 1GB server at its monthly cap.
Home upload speed is the player ceiling — the more players, and the more they spread out exploring, the more chunk data the server pushes. Upload bandwidth, not download, is what actually limits your player count.
The upkeep never ends — you update versions yourself, you back up yourself (the world folder is your server's entire life — copy it before every update), and an open port is a real door that internet scan bots will visit as a matter of routine. Turning the whitelist on removes most of that concern.
The shortcut: up on uniz.host in 3 steps
Everything above is genuinely doable and free — in exchange for the upkeep and your home network's limits. The other path is letting a host run the machine and network layers while you manage just the game:
Sign up and top up — log in with a Google account at uniz.host and top up credits, minimum ฿20 (฿1 = 1 credit).
Create the server — pick Minecraft, choose the version and software (Vanilla, Paper, Fabric, Forge, or a CurseForge/Modrinth modpack), and pick a RAM size — starting at 1GB is fine, you can resize later without moving the world.
Send friends the address — the server gets its own domain from the moment it's created, like yourname.uniz.host, joinable from any network immediately. No port forwarding step exists, and CGNAT never enters the picture.
Billing is hourly, only while the server is online, with automatic daily and monthly caps:
RAM size
Price/hour
Daily cap
Monthly cap
1GB
฿0.30
฿5
฿99
2GB
฿0.50
฿7
฿149
4GB
฿0.90
฿13
฿279
Larger sizes and the disk allowance included with each are on the pricing page — that first minimum ฿20 top-up equals roughly 66 hours of a 1GB server actually online.
System behavior worth knowing up front:
Auto-sleep is available in the server's settings (pick a window of 5–120 minutes with no players; it defaults to off — you enable it yourself). A sleeping server accrues no hours, and a friend pressing join wakes it automatically: the server list shows a message saying the server is asleep, join to wake it. On that first join while it wakes, the game may report a timeout — wait a moment and join again.
A server left stopped for more than 7 days has its world archived automatically (nothing is lost), and restoring it is free.
Before picking a size, read how much RAM a game server needs — starting small and growing on real symptoms beats over-provisioning every time.
Frequently asked questions
Is there anywhere to host a Minecraft server for free?
Running it on your own PC is the free option with the most control — the real cost is electricity at roughly ฿11–16/day if the machine stays on around the clock (a 100–150W PC at about ฿4.5/unit), plus all the upkeep this article describes. If you want to pay little without doing the upkeep, hourly hosting starts at ฿0.30/hour with a ฿5/day cap — a quiet month simply costs less.
What specs does a Minecraft server need?
RAM is the deciding factor: 1–2GB covers 2–5 friends without mods, and a modpack wants 4–6GB or more. For CPU, the game runs its main world on a single thread, so per-core speed matters more than core count. Detailed numbers per situation are in the RAM article (/wiki/server-ram).
How do I install mods?
On the server side you replace the plain server.jar with a mod loader (Fabric or Forge) and drop mod files into the mods folder — and for content mods, every player needs the same mods installed on their own machine. With Paper you can only install server-side plugins, but players need nothing. On uniz.host you pick the server software and can install CurseForge/Modrinth modpacks straight from the web page.
Can Bedrock friends (phone/console) join a Java server?
Not by default — they speak different protocols. You need GeyserMC as a translator plus one extra open port, 19132/UDP. On uniz.host there is a Crossplay switch in the server settings: turn it on and the system installs Geyser and hands out a separate address for Bedrock players.
Why does a self-hosted server lag?
Three usual causes: not enough RAM (rhythmic, regular stutters), not enough per-core CPU speed (the whole world slows down, TPS drops), and a saturated home upload line (worse the more players you have — upload is the real player ceiling). How to tell them apart is covered in the RAM article (/wiki/server-ram).
How is self-hosting different from Minecraft Realms?
Realms is Mojang's monthly rental (about US$8/month for Java, up to 10 players at once). The trade: no mods or plugins, no access to the server files, no deep configuration. A server you run yourself — or on a host — gives you full control over mods, files, and settings.