How to host minecraft server (JAVA)

Decided to make a guide as some people might not know how.
First go to playit, add a tunnel, minecraft java, click next, click create tunnel
(dont touch the ipv4 and port we will tune that later)

Downloading server jar
Go to where you can find server jar files.
For this demo just download 1.19 (You can choose any version you would like however you need to make sure to use the correct java version for the version that you have chosen. More on Java info) , click Vanilla and download 1.19. If it is in a rar file, open in winrar or 7zip. Click META-INF, versions, 1.19 (you can use ‘modded’ version of vanilla server such as papermc)

Making a folder for server jar and playit
Make a folder on your desktop and put the server jar inside, also make a folder for playit. Download 0.9.3 version

Making a bat file to run server
Now you need to make a bat file to run your server. Make a text document (Notepad) in the same folder as your server, paste this in '@ECHO OFF java -Xms3G -Xmx3G -jar forge-1.16.5-36.2.20.jar nogui pause ’ with out the ’ follow according to the picture.
Ignore forge-1.16.5-36.2.20 replace with whatever version you downloaded in this case it will be -jar vanilla-1.19.jar or something similar

[Refer to this section later on] in brackets []
[*Xms is minimum amout of ram used and Xmx is maximum amount of ram used. In this case I have set it to use 3 gigabyte of ram used. *
For optimized settings refer to Aikar’s Flags. I recommend using Aikar’s flags as it will reduce ram usage such as when the server does not need the intended minimum ram of 2gb it will use lesser than that
If you see in your server cmd something like running behind ticks if is above something like 1000 ticks add more ram, it means the server is lagging behind. However you should add more ram when there are multiple reports of your server lagging, other issues can cause this as well such as your wifi or cpu.]

1st time running server
click save as, save file type as all files, name the file run.bat
Now run playit and the run.bat file.
It should prompt you to agree to EULA. Close the cmd, open EULA.txt in your server file set to true and save. Also a good time to check the server properties file to adjust things such as, if you want to disable pvp set pvp to false, change ports and all that. For now dont change anything.
After EULA set to true run your server again. Don’t close playit, playit portforwards your ports so if you dont have playit open if will not work same if you close cmd. (the run.bat file)

Setting ur local ipv4 ip and port number
Now go back to playit website and adjust your tunnel. Click on your tunnel and set local ipv4 as your ipv4 ip. You can do so by running cmd as admin and type ipconfig to find your ip, it should be called IPv4 Address.
Default port for minecraft is 25565 however if you want to change this you can but make sure to do so in the server properties file as well, its called server-port.

After that try and connect to your server with both your local ipv4 address and the playit address, it should work.
Use the [name] address to connect to your server (it would be like
You can use the IP, Ipv4 as well but make sure to put the port number ( as example 44185 is my port number so replace with whatever your port number is.
This port number is different from the tunnel details port number

A quick search on google should help you find out what java version is needed to run a certain version of minecraft.
For example 1.12.2 you need java 8. I download java JREs from as the official java site does not have it available. To check type java in search bar on windows, click configure java or check for updates then click on java tab and click view as seen in attached screenshot. Download whichever is needed and enable.

Example of run.bat file for 1.12.2 would be like this

“C:\Program Files\Eclipse Adoptium\jre-8.0.322.6-hotspot\bin\java.exe” -Xms3G -Xmx3G -jarforge-1.12.2- nogui

Replacing java with ’ “C:\Program Files\Eclipse Adoptium\jre-8.0.322.6-hotspot\bin\java.exe” ’ is telling it to use the java in the location you pointed to instead of the default java that is installed on the system which would be the latest version in most cases
If you have errors like connection timed out could be due to that you did not set up the tunnels correctly. There are lots of reasons to this such as your wifi and others. If you get this issue ask in the discord as I personally never have this issue. You can also try joining your server by direct connection or localhost to see if it works as your ISP might be blocking playit.

That’s the end of the guide. Thanks for reading!
If you need help you can ask the members in the playit discord server


Question for you. Do you place the playit folder in the mine craft Server folder or do you have 2 Folders one for play it and one for minecraft both placed in the same server folder? so like localdisk/server-> with 2 folders in it “modedmc and playit” or localdisk/server/playit with just the jar being in server? I’m trying this on a mod pack that is running a .ps1 file type if that makes any difference.

1 Like

I place them in separate folders, 1 for minecraft sv and 1 for playit