Opening a Minecraft server on a Windows server
Here's how to connect to a Windows server with Remote Desktop and open a Minecraft Java Edition server with your mouse, just like on your own PC. If you're not comfortable with Linux, this way is easier.
Before you start
- Specs: Windows itself uses about 2GB of memory. For a few friends playing vanilla, we recommend 6GB of memory or more. How to choose VPS specs (recommended specs by use case)
- Connecting: Get into the server by following Connecting to a Windows server with Remote Desktop (RDP).
1. Install Java
In a browser on the server, go to adoptium.net, download the Windows .msi of Temurin 21 (LTS), and install it. During installation, turn on the "Set JAVA_HOME" and "Add to PATH" options.
When installation finishes, open a new PowerShell window to check.
java -version
2. Download the server file
- Create a
C:\minecraftfolder. - Download
server.jarfrom the "Minecraft: Java Edition server download" page on minecraft.net and put it in this folder. (To use plugins, download the Paper jar from papermc.io and rename it toserver.jar.)
3. Create a start file
Type the following into Notepad, change the file type to "All files", and save it as C:\minecraft\start.bat.
@echo off
cd /d C:\minecraft
java -Xms1G -Xmx4G -jar server.jar nogui
pause
-Xmx4G is the maximum memory given to the server. Set it leaving 2–3GB of the server's total memory for Windows.
4. First run and agreeing to the EULA
Double-click start.bat. The first time, it exits right away and creates eula.txt. Open it in Notepad, change eula=false to eula=true, save, and run it again.
If a "Windows Security Alert" window appears, click Allow access.
5. Open the firewall
Open PowerShell as administrator and run:
New-NetFirewallRule -DisplayName "Minecraft Server" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow
6. Connect
In Minecraft → Multiplayer → Add Server, enter the server IP as the Server Address.
When closing the Remote Desktop window
If you close it with the window's X button, the server keeps running. If you click Sign out inside the server, the Minecraft server shuts down too. For starting automatically after the server reboots and restarting automatically when it stops, see Running programs automatically on a Windows server.
Common problems
- 'java' is not recognized as an internal or external command... — The PATH option was turned off when you installed Java. Reinstall Java with "Add to PATH" turned on.
- I can't connect — Check that
Done (...)!has appeared in the server window, and that you added the firewall rule in step 5. - Korean text is garbled — See "When Korean text is garbled in programs" in Setting up Korean language and Korea time on a Windows server.
- World backups — With the server stopped, compress the
worldfolder and move it to your PC. Uploading and downloading files