How to self-host a Minecraft server on your own PC

The real steps to run a Minecraft server from your own computer, plus the honest tradeoffs: cost, uptime, and the router setting that quietly breaks it.

Omne Team4 min read

Quick answer Yes, you can run a real Minecraft server from a spare PC at home, for free beyond the electricity. The steps are: install Java, download the server jar, accept the EULA, forward port 25565 on your router, and give your friends a way to find your address that survives it changing. The honest tradeoffs are uptime (the PC has to stay on), your home network’s public IP situation, and who is responsible when something breaks at 11pm.

What self-hosting actually means

Self-hosting means the server runs on hardware you own, in your home, on your internet connection. Nobody else’s data center, nobody else’s uptime, nobody else’s bill. It’s the same software a rented server runs, just on your own box.

This is different from a VPS (a rented computer somewhere else that you fully control) and different from managed game hosting (someone else runs the software for you). Self-hosting is the DIY end of the spectrum.

What you need

  • A computer that can stay on. Doesn’t need to be powerful. RAM and single-thread CPU speed matter far more than a graphics card, since the server barely touches the GPU.
  • RAM: the Minecraft Wiki recommends at least 2 GB free for a small server, and says larger servers may need 4 GB or more [1]. Free means free after your operating system and everything else running takes its share, not your PC’s total RAM.
  • Java, matching whatever version the game currently requires. This changes with major updates, so check the current requirement on the wiki before installing; recent releases have needed newer Java versions than older ones did [1].
  • A router you can log into, to set up port forwarding.

Setting it up

  1. Install the right Java version, then download the official server jar from minecraft.net.
  2. Run it once. It creates a folder of files and an eula.txt. Open that file and change eula=false to eula=true to accept Mojang’s end user license agreement, then run the jar again.
  3. Edit server.properties if you want to change anything, like the default port (server-port=25565) or difficulty. Most people can leave the defaults alone.
  4. Forward port 25565 (or whatever you set) on your router to your PC’s local IP address, so traffic from the internet reaches your machine instead of stopping at your router [1].
  5. Find your public IP and give it to your friends, or set up a free dynamic DNS service so they get a name instead of a number.
  6. Start the server and connect locally first (localhost or your PC’s local IP) to confirm it works before asking anyone outside your house to try.

The part that quietly breaks it: CGNAT

Port forwarding assumes your router has its own public IP address. A meaningful number of home internet connections, especially cable and some fiber and mobile plans, instead sit behind Carrier-Grade NAT, where your ISP shares one public IP across many customers. Port forwarding cannot work through that, because there is no single address pointing back to your house.

The quick way to check: compare the WAN IP your router reports in its admin page to what a “what is my IP” site shows you from the same network. If they don’t match, you’re behind CGNAT, and port forwarding will not work no matter how correctly you configure it. Some ISPs will give you a real public IP if you ask, sometimes for a fee; otherwise a tunneling service is the workaround, which is a bigger step up in complexity than this guide covers.

Your public IP address will change

Most home internet connections don’t have a fixed IP. It can change when your router reboots, or just periodically. Your friends’ saved server address will stop working when it does. A free dynamic DNS service solves this: it gives you a fixed hostname that automatically updates to point at your current IP.

The costs nobody puts on a spec sheet

Electricity. A basic PC left on around the clock draws a modest but real amount of power. Multiply its wattage by 24 hours and your local electricity rate to see whether it’s worth it for your situation; it varies enough by hardware and region that there’s no single number worth quoting here.

Uptime is on you. If your power goes out, your internet drops, or the PC needs a restart for an update, the server goes down with it, and nobody is watching that but you.

You’re opening a door into your home network. Forwarding a port exposes that service to the internet. Minecraft server software has had real, serious vulnerabilities before: the Log4Shell flaw in December 2021 affected the logging library many servers depended on and allowed remote code execution against unpatched servers, Minecraft included [2]. Keeping the server jar and any plugins updated isn’t optional busywork, it’s the actual security model.

When self-hosting is the right call, honestly

It’s a good fit if you’re comfortable with routers and command lines, you’re playing with a small group who can tolerate the server going down when your power blips, and you want to pay nothing beyond electricity.

It’s a worse fit if you want the server reachable while your own PC is off, if nobody in the group wants to be the one who restarts it and applies updates, or if the group has grown past what a home upload connection can comfortably serve. At that point a rented server, ours or anyone else’s, is mostly buying you someone else’s uptime and someone else’s 11pm restart.

Questions people ask

Do I need a powerful gaming PC?

No. A server barely uses the GPU at all. What matters is RAM and single-thread CPU speed, the same two things that matter on a rented server. An older office-grade PC with 8 to 16 GB of RAM handles a small survival world fine.

Can I just close my laptop and it keeps running?

No. Sleep and hibernate stop the server process. You need a machine that stays powered on and awake, which is the main reason people move off a laptop that doubles as their daily computer.

Is this legal and against Mojang's terms?

Running your own server is explicitly supported by the game and documented on the official wiki. It is a normal, intended way to play.

Sources

  1. Tutorial: Setting up a Java Edition server (Minecraft Wiki)
  2. Log4Shell (Wikipedia)