How to host a Minecraft server for Java on PC
Tags: minecraft, download, papermc
Published: 2024-06-04 02:16:47

   You should totally host your own server, it can save you money and give you more control and options. You could totally buy a realm or pay for a server hosting service but that is like 8 dollars a month and you can only have two people on at the same time for that price. And if you have a nice computer you might as well put it too use. With your own server you can make all the rules. Have things be peaceful and you don't lose your stuff when you die, sure. Or you can make it super hard and have all the nightmare creatures you want. And my personal favorite is only having it open for a limited time. If it is only open on the weekends then it will make to time you do play more fun.

- Why Should You Host a Minecraft Server? 
Hosting a minecraft server is super fun and has a huge payoff. You can have your own world, make your own rules, and do whatever you want. My favorite part is that I can turn on my server and walk away from it for any reason and everyone can still use it while I am away. Hosting your own server is a great way to save money, there are lots of server hosting services with varying quality and versatility, one thing in common is they all require you to pay every month to keep them active. If you already have a machine that can support the server it can basically run for free (minus the electricity and internet costs). You can also have any amount of players and mods on your server. Keep in mind that the more you want to add to the server, the more it will demand of your computer. So make sure your specs are good enough for what you want to do.
- Risks of Hosting a Minecraft Server(?)
	Of course everything you do holds an inherent risk, hosting a Minecraft server is pretty risky though. The biggest risk to hosting your own server is a DDoS attack. In order for others to connect to your server they need your IP address (your computer's address). If the wrong person gets your IP address they can mess up your computer and ruin your server. DDos attack stands for distributed denial of service. When a hacker gets access to a lot of computers they can coordinate an attack. They carry out this attack by having a lot of computers send requests to your server at the same time. This can mean a computer that is only suppose to support 10 people of a server at once is now getting 1,000 requests for others to join. This can slow down your server and make your actual players unable to play.
	On a less depressing note, someone can also grief your world in game. For whatever reason, someone could totally kill you, steal your stuff, burn your house down. So just make a plan for Griefers ahead of time. 
	There is also the risk of someone physically accessing your computer and inputting commands to give themselves stuff and lock you out. Now that all of the risks are covered, how do you actually host a Minecraft server?
- How Do I Host a Minecraft Server?
-What do You Need?
I will go over some of the bare minimum requirements of hosting a minecraft server. If you have exactly these specifications then you will be able to run a server, mostly. With the bare minimum parts you will be able to support a small server with only a few people online at a time and maybe some lag at times. Now I'm sure your system is at least a little bit better than this and there are endless combinations of parts and specs for PCs out there. But a general rule is the more people and mods you want, the more resources your server will need. You should do your own research but below is the bare minimum requirements to hosting a minecraft server.

_A PC Of Course

I’m sure there is a way to force a Playstation or an xbox to hosting a minecraft server for you, but I don’t know how to do that. So I recommend getting a computer. You can do way more than just games on it (like host a server for any game) and it can play games really well. PCs are always going to be more expensive and more work than a console. But if you love games and technology I highly recommend getting a Computer (and try building your own).

_A PC With: 
1. A Fast CPU
A CPU with enough cores and fast enough speed is needed for a server. The bare minimum would be something like a Core i5-4590 or an AMD equivalent. That CPU has four cores and a clock speed of 3.5 GHz. That CPU is 10 years old so it might be time for an upgrade soon.

2. Enough RAM (memory DDR3 and above)
RAM, or random access memory, determines how much short term memory your computer has access too. The bare minimum is 8GB of RAM with the recommended 16GB of RAM. Without enough memory your server will have lag issues and might forget that you and your friends beat the ender dragon.

3. Enough Storage Space
The bare minimum disk space requirement is 20GB. This number will go up depending on how many mods you want to have. And don’t forget to keep server backups just in case something goes wrong.

- What You Need to Download
      0.   Download java for minecraft
[Link to download Java ](https://thebreakdown.xyz/how-to-download-install-the-java-se-development-kit/)
1.   To download java go to this link and go to the version that is right for you. Currently it is java 21 but this may change with new versions of minecraft and java coming out. Once you go there navigate to the computer system you are using and download the x64 installer 
2.   [Link to the paperMC download page](https://papermc.io/downloads/paper)
3.   Bring that file to your desktop and open it
4.   Download paper server and store it in a folder
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdcs20plu96ncbrvi7is.png)
5.   Rename the paper file to paper or paper.jar if your file started with a .jar at the end.
6.   Make a text file and copy this text into it
`@echo off
java -Xmx8G -jar paper-1.20.4-393.jar nogui
pause`
The Xmx8G says that I want to allocate 8 Gigabytes of memory to the server (can be changed as you like). The paper-1.20.4-393.jar is the current version of minecraft we want to run. You will use the original name of your paper file you first downloaded here. And the pause will pause your computer if there is an issue with the server, so you can read what the issue is before closing the tab. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/477vm9nc7n8bpd8tim3v.png)
Navigate to File then Save as save the type as all files and the name should be start.bat 
7.   Click on the start.bat file. It will fail. But it will generate some other useful files
8.   Open the eula.txt file. Change eula=false to eula=true. That will make you agree to the eula.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1j869vqh4pktpjvi9by.png)
9.   Click the start.bat again

In conclusion hosting a Minecraft server does have a high cost of effort and money up front. Also some necessary risk you must take on. But once you get it up and running it can be a great addition to your Minecraft community and that of your friends. 

Sources: 

[DDoS attack explained](https://www.youtube.com/watch?v=ilhGh9CEIwM) - [what is needed to host a server](https://hostadvice.com/blog/web-hosting/minecraft/minecraft-server-hosting-requirements/) - [explaining how to install paperMC](https://youtu.be/3zRdrLXFS8o?si=JIQ7WPT1azN7FBs_) - [how to download JAVA](https://youtu.be/syW8hEPQRRg?si=VJPBkxSxOpWsnQue)