How can I create a PaperMC server? [closed]

There are many substitutes to hosting on your machine, but lets say you want to actually host a server.


Solution 1:

Step One - Download the server jar from the papermc website.

Papermc website: https://papermc.io/downloads (Note, you can do this with any other software, but you must change the file names in the code blocks to the name of the server jar)

Once you are on the website it should look like this:

enter image description here

Download the latest version. (At the time of writing it is paper 1.16.5 #457)

Create a folder to put the jar file in and move it to your desktop.

Step Two - Setting up the server

Once you have moved the jar file into the folder, you now must open Command Prompt. First find the file location of your jar file to cd to. To find it, go into the folder and click on the bar that says "This PC > Downloads > " or something related to that.enter image description here

Right click and select copy.

Now open up command prompt and type cd <file location you have just copied> and press enter. You are now in the location of your Minecraft server.

The next command to run is java -Xms2G -Xmx2G -jar paper-###.jar. The ### represents the name of the jar file you are using. To change the ammount of ram allocated to your server, change the numbers in the -Xms2G -Xmx2G to the amount of ram you would like.

After running those commands, you should see more files starting to pop up. You will then see an error that looks like this: enter image description here

Don not worry, you just need to agree to the eula. Find the file eula.txt and change the eula=false to eula=true

enter image description here

After you have done that, simply run the command again. Your server should start up.

Step Three - Create Run.bat

To run your server instead of having to use cmd every time, create a file called "run.bat" in your server folder. Then type java -jar paper-###.jar nogui. The ### would be the name of your jar. Then whenever you want to run the server, just double click the run.bat file.

How can I connect to my server?

If you are just using your server to test out plugins you can simply connect via localhost. But if you are trying to allow your friends or other people to connect, you can either port forward or use a tunneling program such as playit.gg

I will be going over playit.gg, but if you would like to port forward, look for a tutorial on youtube.

When on the playit.gg website you should see this: enter image description here

Select the "Minecraft Java". It will then ask you a series of questions. Answer it like this: enter image description here

Download the tunnel from the link, select the "Done" box, then run the file.

You then should see this, but instead of there being a server IP, there will be a button that says "add tunnel." Add the tunnel and you should be able to connect via the IP it tells you. Feel free to edit if this playit.gg part is wrong, as I have already setup a server with this and is hard to see what the site is.