In short: install 64-bit Java (25 for Paper 26.x, 21 for 1.21.x), put Paper in its own folder, start it with start.bat and set eula=true in eula.txt. When the firewall asks about "OpenJDK Platform binary", allow access — or create a rule for TCP port 25565 by hand. For players to join from the internet, forward the port on your router. The server runs as long as the computer is on and the console window is open.
Step 1. Java
| Paper version | Java |
|---|---|
| 1.20–1.21.11 | 21 |
| 26.1 and newer | 25 |
You need an OpenJDK build. Paper's guide for Windows 10 and 11 installs Amazon Corretto 25 from an MSI installer and says it's safe to click "Next" all the way through. Eclipse Temurin from Adoptium works too: its MSI adds Java to PATH and associates .jar files by default, while setting JAVA_HOME is a separate option that's off by default. According to Adoptium's docs, the Temurin MSI is meant for 64-bit (x64) Windows.
java -version
where javaThe first line of the output should start with openjdk 25 (or 21 for a 1.21.x server) and the last one should contain 64-Bit. where java shows which java.exe Windows finds first on PATH: with several Javas installed, the top one runs. If the command isn't found, open a new window — Paper's docs suggest the same.
Step 2. The folder and Paper
- 1
Create a dedicated folder
For example
C:\mc-server. The world, configs andpluginswill live there, so keep it apart from Downloads and the Desktop and make sure your account can write to it. - 2
Download Paper
On the Paper downloads page pick a version and click the build number. Put the file in the server folder and rename it to
paper.jar— it's easier to reference in the script. - 3
Show file extensions
In File Explorer on Windows 11: View → Show → File name extensions. On Windows 10, tick "File name extensions" on the View tab. Without this it's easy to create
start.bat.txtinstead ofstart.bat.
Step 3. start.bat and the first start
Start the server with a command, not by double-clicking the .jar: that way you see the console where errors appear and commands go in, and you set the memory. Create a text file named start.bat in the server folder with this content:
@echo off
java -Xms4G -Xmx4G -jar paper.jar --nogui
pause-Xms and -Xmx set the memory (the 4 GB in the example comes from Paper's docs; how to pick your own amount is in how much RAM a server needs). --nogui turns off the vanilla server window, and pause keeps the console open if something fails. A ready-made start.bat with Aikar's flags and auto-restart comes out of the free start script generator.
- 1
Run start.bat
Double-click it. The first start creates
eula.txtand stops. - 2
Accept the EULA
Open
eula.txtin Notepad, changeeula=falsetoeula=trueand save. That confirms you've read the Minecraft EULA; without it the server shuts down right after starting. - 3
Run it again
The server creates the world,
server.propertiesand thepluginsfolder. It's ready when the console prints aDoneline. Join from the same computer atlocalhost. - 4
Shut it down with stop
Type
stopinto the console: the server saves the worlds and disables plugins properly. Don't close the window with the X while the server is running.
The other settings live in server.properties — see the server.properties guide. The whole path from choosing a server jar to the pre-launch checklist is in the complete server setup guide.
Step 4. Windows Firewall
Windows Firewall blocks inbound connections by default. On the server's first start you'll get a prompt for "OpenJDK Platform binary": allow access and Windows creates the rules itself. If you click Cancel or answer No, Windows creates block rules for Java — usually two, for TCP and UDP. A block rule beats any allow rule, so a port rule next to it won't help: find the Java block rules in the list and delete them.
You can also create the port rule by hand, with administrator rights. In the Windows Firewall with Advanced Security console (type wf.msc in Start): Inbound Rules → Action → New Rule, rule type Port, protocol TCP, local port 25565, action "Allow the connection", then the profiles and a name. Or in one command:
# PowerShell as Administrator
New-NetFirewallRule -DisplayName "Minecraft 25565" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action AllowStep 5. Access from the internet
- The same home network. Friends join by the computer's local IP:
ipconfig, the "IPv4 Address" line. - The internet. Forward TCP port 25565 on the router to this computer and give players your public IP. Pin the computer's local address, or after a reboot the router may hand out another one and the forward stops working.
- Carrier-grade NAT. If your ISP shares one public IP between many customers, a port forward won't work: you need a public IP, a tunnel or hosting — options in a server for friends.
Port forwarding, testing the port from outside and NAT step by step are in server IP and port. To let players join by name instead of digits, set up a domain and an SRV record.
Keeping the server up
- Sleep. A sleeping computer doesn't answer players. Lengthen or turn off sleep in Settings → System → Power & battery → Screen, sleep, & hibernate timeouts.
- Auto-restart. The script generator can add a loop: after a crash or
stopthe server starts again. Leave the loop withCtrl+Cin the console window. - Shared memory. If you play on the same computer, the Minecraft client and Windows need memory too — don't give the server all of it.
- Around the clock. A home PC isn't built to run nonstop. When players want to join without you, move to hosting or a VPS — see hosting or VPS and a Minecraft server on Linux.
Common mistakes on Windows
| What you see | Cause | What to do |
|---|---|---|
| 'java' is not recognized as an internal or external command | Java isn't installed or isn't on PATH | Install Temurin with Add to PATH (on by default) and open a new window. Or put the full path to java.exe in quotes in start.bat |
| The console window flashes and closes | An error at startup and no pause in the script | Add pause as the last line — the error stays on screen |
| The script opens in Notepad and nothing starts | The file is called start.bat.txt | Show file extensions and rename it to start.bat |
| The server keeps asking for the EULA | An eula.txt.txt was created next to the real file | Edit the eula.txt the server created; delete the extra file |
Unable to access jarfile | The .jar name in the script doesn't match the file | Rename the file to paper.jar or fix the script |
UnsupportedClassVersionError | An old Java runs but the build needs a newer one | where java shows which Java comes first on PATH; install 25 for Paper 26.x |
Failed to bind to port | The server is already running in another window, or server-ip is wrong | Close the second server; leave server-ip empty |
| You can join, friends on the same network can't | A firewall block rule left by Cancel | Delete the Java block rules in wf.msc and allow the port |
An anticheat on a Windows server
A server on a home computer is open to anyone who knows the address, and a cheater doesn't care which OS it runs on. DGuard — the best anticheat for a modern Minecraft server — installs like any other Paper or Leaf plugin for 1.21–26.3: a key from the panel, the latest PacketEvents release and DGuard.jar in the plugins folder, the key in plugins/DGuard/config.yml, then a restart. It needs no inbound ports, only outbound HTTPS, and Windows Firewall allows outbound connections by default.
DGuard barely touches a computer you also play on: checks run in network threads, and the main thread cost is 0.03% of one core. It catches cheats in combat, movement, packets, inventory, building and the world, and up to 30 players online it's free — with the same protection as the paid plans.
FAQ
Which Java does a Minecraft server on Windows need?
64-bit Java 25 for Paper 26.1 and newer and Java 21 for 1.20–1.21.11. The Amazon Corretto or Eclipse Temurin MSI installers both work; check with java -version in a new Command Prompt window.
Why does start.bat close right away?
The server failed at startup and the window closed with it. Add pause as the last line of start.bat and read the error. Common causes are an unaccepted EULA, Java missing from PATH or a wrong .jar name.
How do I open port 25565 in Windows Firewall?
Allow access in the "OpenJDK Platform binary" prompt on the first start, or create an inbound rule for TCP port 25565 in wf.msc. As administrator, New-NetFirewallRule in PowerShell does the same.
Why can't my friends join my server?
Check in order: the server is listening (netstat -ano | findstr :25565), the firewall isn't blocking Java, the port is forwarded on the router, and your ISP doesn't put you behind its NAT. Friends on the internet need your public IP, not 192.168.x.x.
Can I play on the same computer that runs the server?
Yes, join at localhost. Mind the memory: the client and Windows need RAM too, so don't give the server all of it.
Sources
- Paper: Getting started (Java versions, start command)
- Paper: installing Java on Windows
- Adoptium: installing Temurin on Windows (MSI)
- Minecraft Wiki: setting up a Java Edition server
- Minecraft: End User License Agreement (EULA)
- Microsoft Learn: Windows Firewall rules
- Microsoft Learn: creating an inbound port rule
- Microsoft Learn: New-NetFirewallRule
- Microsoft Learn: the netstat command
- Microsoft Learn: the where command
- Microsoft Support: file name extensions
- Microsoft Support: power settings in Windows 11
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions