How to make a Minecraft server on your own PC or a host
Hosting it yourself means installing Java, downloading server.jar and setting up port forwarding on your router so friends outside your network can join. With a rented server, you pick a version in the control panel and press Start, and the server runs in a data center.
If everyone is on the same Wi-Fi, you don't need a server yet. In a single-player world, press Esc and choose Open to LAN, and anyone on the same network can join you.
Your own PC or a rented server
| Compared | Your own PC | Rented server |
|---|---|---|
| Cost | Electricity | Taiwan from NT$99/mo |
| Uptime | Only while the PC is on | 24/7 |
| Friends connecting | Needs port forwarding, which some networks cannot do | Share the server address |
| Versions and plugins | Download and swap files yourself | Pick them in the control panel |
| Backups | Copy the folder yourself | Weekly off-site backups. With the local backup add-on, create and schedule backups in the panel |
| If attacked | Your home connection goes down | Basic DDoS protection at the data center |
Host it on your own PC (Java Edition)
These steps use Windows. On Mac and Linux the process is the same, but you open a terminal instead of Command Prompt.
1. Install the right Java version
The server runs on the Java installed on your computer. Each Minecraft version needs a specific Java version, and the server will not start with the wrong one.
| Minecraft version | Java version |
|---|---|
| 26.1 and later | Java 25 |
| 1.20.5 to 1.21.11 | Java 21 |
| 1.18 to 1.20.4 | Java 17 |
| 1.17 | Java 16 |
| 1.16.5 and earlier | Java 8 |
A free OpenJDK build called Temurin is available from Adoptium. After installing, type java -version in Command Prompt. If it prints a version number, Java is ready.
2. Download server.jar
Get server.jar from the Minecraft server download page. Create a new folder, such as D:\mc-server, and put server.jar inside. The world and config files will be created in this folder.
To run plugins or mods, swap server.jar for different server software. Plugins need the Paper jar, and mods need the Fabric or NeoForge server installer.
3. First launch and the EULA
Click the address bar at the top of the folder window, type cmd and press Enter. Command Prompt opens in that folder. Start the server with this command.
java -Xms2G -Xmx4G -jar server.jar nogui-Xmx4G is the most memory the server may use, and -Xms2G is what it takes at startup. Keep the maximum under half of your computer's RAM. The RAM calculator suggests an amount.
The first run creates eula.txt and then stops. Open it in Notepad and change eula=false to eula=true to accept the Minecraft End User License Agreement. Save, then run the same command again.
Once the console prints Done and For help, type "help", the server is running. To shut it down, type stop so it saves first. Closing the window instead can lose the last few minutes of progress.
To skip typing the command each time, create a text file in the same folder, paste the two lines below and save it as start.bat. Double-click it to start the server. The pause line keeps the window open after the server stops, so you can read any error.
java -Xms2G -Xmx4G -jar server.jar nogui
pause4. Edit server.properties
Server settings live in server.properties in the same folder. Restart the server after changing them. These are the ones people change most.
| Setting | Default | What it does |
|---|---|---|
server-port | 25565 | The port the server listens on |
max-players | 20 | Maximum number of players online at once |
online-mode | true | true lets in only accounts that own Minecraft |
white-list | true | Only players on the allowlist can join. The default was false before 26.3 |
difficulty | easy | peaceful, easy, normal or hard |
gamemode | survival | Game mode for new players |
motd | A Minecraft Server | The description shown in the server list |
view-distance | 10 | Render distance. Lower values reduce server load |
Starting with 26.3, a newly generated server.properties has white-list set to true. Friends who try to join will see You are not white-listed on this server!. Add them to the allowlist first with whitelist add FriendName in the console, or set the value to false.
5. Let friends connect
Friends on the same network connect with this computer's local IP. Type ipconfig in Command Prompt. The IPv4 Address line, such as 192.168.1.20, is the one you need.
For friends outside your network, set up port forwarding on your router.
- Log in to the router's admin page. The address is usually printed on the back of the router.
- Add a forwarding rule that sends TCP 25565 to this computer's local IP.
- The first time the server starts, Windows Firewall asks for permission. Allow Java through.
- Look up your public IP and give friends
public IP:25565.
With your own public IP
- Friend's computer Connects to 203.0.113.5:25565
- Internet 203.0.113.5 Your router's public IP
- Forward TCP 25565 192.168.1.20:25565 The Minecraft server on your computer. The firewall must allow Java.
CGNAT (the ISP shares one public IP among many customers)
- Friend's computer
- Internet ISP's shared IP Doesn't match your router's WAN IP
- Can't reach Your router Port forwarding has no effect
Some connections do not have their own public IP. Phone tethering and some apartment networks put many customers behind one shared address (CGNAT). If the WAN IP on your router's admin page differs from the public IP you looked up, this is your situation, and port forwarding will not help. You need to ask your ISP for a public IP, or rent a server.
Home public IPs can change. When yours does, send friends the new one.
Before you self-host
- Windows goes to sleep after it has been idle for a while. While the server is running, set sleep to Never in the power settings.
- With more players or mods, playing on the same PC gets slower too.
- Friends will know your home IP, and an attack on that IP knocks your home internet offline.
- You handle backups yourself. Copy the whole server folder regularly.
When the server will not start
The last few lines in Command Prompt usually say why.
| Message contains | Cause | Fix |
|---|---|---|
'java' is not recognized as an internal or external command | Java is not installed, or the installer did not add it to PATH | Reinstall Java as in step 1, make sure Add to PATH is selected, then open a new Command Prompt |
UnsupportedClassVersionError | Your Java is too old, for example Java 17 running 1.21 | Install the Java version from the table above. In the message, class file version 65 means Java 21 and 69 means Java 25 |
You need to agree to the EULA | You have not accepted the Minecraft EULA yet | Open eula.txt and change eula=false to eula=true |
FAILED TO BIND TO PORT | Another program is already using 25565, often a second copy of the same server | Close the other server window, or set server-port to a different number |
OutOfMemoryError | -Xmx does not give the server enough memory | Raise -Xmx, but keep it under half of the RAM in your computer |
If the log is long and confusing, copy the last 20 lines or so and paste them into an AI tool or a Minecraft community. You will get a better answer than with "it won't start".
Rent a server
1. Choose a plan and pay
In the client portal, choose a location, product line and memory, then check out with your AtomRoute account. Ports, local backups and a database are selected before checkout. Skip them if you do not need them.
2. Pick the server software and Minecraft version
Open Version installer in vPanel, choose Paper, Fabric, Forge, NeoForge or another server software, then choose a Minecraft version. Changing versions later happens on the same page.
Set the Java version under Runtime on the Startup page. Match it to the Java table earlier in this guide.
3. Start the server
Go back to the Console and press Start. When the log finishes, the top of the console shows a notice that your server is up, along with its address, and Show join guide opens join steps you can send to friends.
If you installed 26.3 or later, you still need to run whitelist add FriendName in the console before friends can get in.
4. Add plugins or your own world
On a plugin server, Plugins searches Modrinth, Hangar and CurseForge and installs what you pick. You can also install plugins by hand by putting the jar in the plugins folder.
To bring a world from your PC, zip it and upload it with Upload a world. The current world is saved as a backup before it is replaced. Before uploading, check that the world and server versions match.
To let friends connect with play.yourdomain.com, add an SRV record.
How friends join (Java Edition)
- Open Multiplayer
Launch Minecraft and choose Multiplayer.
- Add Server
Choose Add Server and enter the address in Server Address, for example
play.example.com:25565. If the port is 25565, you can leave it off. - Join
Select the server in the list and press Join Server.
The game version has to match the server. If it does not, the game shows a version mismatch message. Pick the same version in the launcher and try again.
Bedrock players (phones, tablets, consoles) cannot join a Java server by default. On a self-hosted Java server you can install Geyser to let them in, or run a Bedrock server instead.
References
- Tutorial: Setting up a Java Edition server Minecraft Wiki
- Minecraft Server Download: Host Your Own World Minecraft
- server.properties Minecraft Wiki
- Java Edition 26.1 Minecraft Wiki