The fastest way to run a Minecraft server on your PC
You can run a Minecraft server on your PC in two ways: use the official server software that Minecraft provides, or rent space on someone else's server hardware. The official route is free but ties up your computer—your PC must stay on and connected to the internet the whole time players are online. If you want to play and host at the same time without lag, renting a server from a hosting company (which costs money per month) is simpler, but running the official software yourself works fine for a small group of friends.
This guide covers the free method: downloading the server software, setting it up on your PC, and getting friends connected. You'll need Java installed, about 1 GB of free disk space, and a stable internet connection. The whole setup takes 15 to 30 minutes.
Key Takeaways
- read the official server software from minecraft.net, not from third-party sites, to avoid malware.
- You must have Java installed on your PC; the server will not run without it.
- Run the server file once, agree to the EULA in the text file it creates, then run it again to start the server.
- Give your friends your PC's IP address and the port number (usually 25565) so they can connect in Minecraft.
- Your PC must stay powered on and connected to the internet while the server is running, or players will be disconnected.
read Java and the server software
Minecraft servers run on Java, so you need it installed first. Go to java.com and read the latest version for Windows or your operating system. Run the installer and follow the prompts. You only need to do this once.
Next, go to minecraft.net/read/server and read the server software file. It is a single .jar file, usually named something like "server.jar". Save it to a new folder on your PC—create a folder called "Minecraft Server" on your Desktop or Documents, and put the .jar file inside. Do not read the server software from any other website; only use the official Minecraft launcher site.
Run the server and accept the EULA
Open the folder where you saved server.jar. Right-click in the empty space and select "Open in Terminal" (on Mac, "Open in Terminal"; on Windows 11, "Open in Windows Terminal"; on Windows 10, hold Shift and right-click, then select "Open PowerShell window here"). Type this command and press Enter:
java -Xmx1024M -Xms1024M -jar server.jar nogui
The server will start, create several new files in the folder, then shut itself down. This is normal. Look for a file called "eula.txt" in the same folder. Open it in Notepad, find the line that says "eula=false", and change it to "eula=true". Save the file. This confirms you agree to Minecraft's End User License Agreement.
Run the same command again. This time the server will stay running. You will see text that says "Done! For help, type 'help'" when it is ready. Leave this window open while players are connected.
Find your PC's IP address and share it with friends
Players need two pieces of information to join: your PC's IP address and the port number. The port is almost always 25565 unless you changed it in the server settings.
To find your IP address on Windows, open Command Prompt (search for "cmd" in the Start menu), type "ipconfig", and press Enter. Look for "IPv4 Address"—it will be four numbers separated by dots, like 192.168.1.100. This is your local IP address, which works only if friends are on the same home network as you.
If friends are outside your home network, you need your public IP address. Go to whatismyipaddress.com in a web browser. The first number shown is your public IP. Tell your friends to use this IP address plus the port: for example, "203.45.67.89:25565". Your public IP can change if your internet provider reassigns it, so check it again if friends cannot connect after a few days.
How friends connect to your server
Friends open Minecraft, click "Multiplayer", then "Add Server". They enter a name for the server (anything they want), then paste your IP address and port in the "Server Address" field. If they are on your home network, they use your local IP. If they are outside your home, they use your public IP. They click "Done" and then click the server to join.
If the connection fails, the most common reasons are: your PC is not running the server, Java is not installed on your PC, your firewall is blocking the port, or you gave them the wrong IP address. Ask them to try again after a few seconds—sometimes it takes a moment for the connection to establish.
Adjust server settings and performance
When the server starts, it creates a file called "server.properties". You can open this in Notepad to change settings like the game mode (survival, creative, adventure), difficulty level, and the world name. Common changes: set "gamemode=1" for creative mode, or "difficulty=0" for peaceful. Save the file, stop the server (type "stop" in the terminal window), and run the startup command again.
If the server lags or crashes, it usually means your PC does not have enough memory. In the startup command, change "1024M" to a larger number like "2048M" (for 2 GB of RAM). Your PC needs at least 4 GB of total RAM to run the server and Minecraft at the same time without slowdown. If you only have 2 GB of RAM, close other programs before starting the server.
Keep the server running safely
Your PC must stay on and connected to the internet while the server is running. If you shut down your PC or lose internet, all players are kicked out. Set your PC to never sleep while the server is active—go to Settings > System > Power & Sleep and set the sleep timer to "Never".
Do not share your public IP address with people you do not trust. Anyone with your IP and port can try to join your server. Use the whitelist feature to control who can play: in server.properties, set "white-list=true", then type "whitelist add [playername]" in the server window for each friend you want to allow. Restart the server for the change to take effect.
Frequently Asked Questions
Do I need to buy anything to run a server on my PC?
No. The official Minecraft server software is free. You only need Java, which is also free. If you want to rent server space from a hosting company instead, that costs money, but running it yourself on your PC costs nothing.
Can I play on my own server while other people are connected?
Yes. Open Minecraft on the same PC where the server is running and go to Multiplayer > Add Server. Use "localhost" or "127.0.0.1" as the address. You will join your own server. Performance depends on your PC's power—if it slows down, close other programs or rent a hosted server instead.
What if friends say they cannot find my server?
First, make sure the server window still shows "Done! For help, type 'help'" and has not crashed. Check that you gave them the correct IP address and port. If they are outside your home network, you may need to forward port 25565 in your router settings—search "port forwarding" plus your router model for instructions. If you are unsure, ask them to try again in a few minutes; sometimes connections take time to establish.
Will running a server on my PC slow down my internet for other people in my house?
It depends on how many players are online and what they are doing. A few friends playing casually uses very little bandwidth. Many players or heavy activity like constant building can noticeably slow down other devices. If this is a problem, a rented server hosted elsewhere is a better choice.
How do I stop the server?
Type "stop" in the server terminal window and press Enter. The server will shut down gracefully and save the world. Do not close the terminal window without typing "stop" first, or you risk losing recent changes to the world.