How to setup your own minecraft server (Java, latest version, your hardware, free, official/hacked, online, ~20 players, safe)
Disclaimer
This is not an article but rather an instruction I made for myself to not forget how to setup a server. I was using Windows and doing that for cracked vanilla minecraft 1.21.3 so I can’t say if it’s working correctly in different conditions. It should generally be a universal approach as Java, Minecraft client and server, and Playit.gg have official ports to Linux and Mac (AFAIK).
This approach requires no use of console, no investments, you will have full control over your server. I listed pros and cons of it later in this note.
Some of the tutorials/resources that I used:
- Host a Minecraft Server Without Port Forwarding Using Playit.gg – video by KasaiSora
- Making your minecraft server public in 48 seconds without port forwarding – video by playit
- How To Make A Cracked Minecraft Server (Any Version) – video by KasaiSora
- How to Setup a Minecraft: Java Edition Server – help.minecraft.nent
- How to create a Minecraft server for free! – cyberxgaming.com
Steps:
- Install Java
You have to have Java of the version corresponding to your desired minecraft version (for 1.18+ it is Java 17, for 1.21+ it is Java 21 etc). You can check which version you need to have here.
choose and download your version on oracle website
simply download it, run installer, nothing more to do here
- Official minecraft server software
Install minecraft official server setup software. It should be a file named server.jar
downloaded from official minecraft page. AFAIK only the latest MC release is available here. For a simple setup you won’t need console and running commands as opposed to what’s said on that page.
Alternatively, you may download it from other websites like mcversions where you can choose a specific version.
- Dedicate a folder to the server files
Put that server.jar
file where you want to keep your server data. At this stage you should have a folder somewhere on your device where there is only that file.
- Generate server files
Run server.jar
file by double clicking it, it’s java executable. In a few seconds it should generate a bunch of files around it (along with server.properties
and eula.txt
). If so, move straight to step 5. It might take around 10 seconds, but If you waited and nothing happened, you need to install jarfix
(program to fix ‘java archive’ execution issue on Windows) from here or here.
- Tweak server settings
First and foremost, you must open eula.txt
and set eula
to true
, so that the whole file looks like this (with your date and time, of course):
|
|
Then, if you or your friends who you are planning to play with are using cracked minecraft, you also need to go to server.properties
and change online-mode
to false
.
do not forget to save both files!
In the same server.properties
you are also able to set difficulty, gamemode (including hardcore), max number of players, pvp, whitelist, generate structures and view distance along with other settings. I recommend to leave them default and play with them after succeeding in setting up the server to work correctly.
- Run server
Run server.jar
again, a GUI (a window) should appear (it might take some time). Your server is now up and running, but it’s only local, meaning that only you can join it. You still should test that everything is working by going to minecraft, multiplayer mode, direct connection and type in localhost
or 127.0.0.1
. If it returns an error, try restart your game AND launcher, restart the server and restart the PC. It might be giving errors at first but then begin working normally.
- Setup
Playit.gg
In order to make server public and open for other people, we need to setup a way for them to connect to your server.
One of the ways to do so is by using Playit.gg
. Here is a concise tutorial by its developer (here is a reddit tread about it).
In a nutshell, you need to download Playit.gg
from official website, create an account/login as a guest, then create a tunnel. When created, at the very bottom of the page there is a table with attributes and values, you need one called Allocation (Shared IP)
(IP) OR Domain (Auto Assigned)
(Domain) - you and anyone who wants to connect to your server will need either of these two.
- Try in minecraft
Run minecraft (cracked or official) of the exact same version you created your server on step 1, go to multiplayer, direct connection/add server, put there IP:port from Playit.gg
page from previous step OR domain. Click connect. The only thing you need to share with your friends for them to be able to join your server is either IP or domain, provided by Playit.gg
.
How to run it / shut it down
running
Run server.jar
, wait for it to launch. Run Playit.gg
application installed on your PC, wait for it to launch. In minecraft, go to multiplayer, paste in your IP:host OR public domain of your server, auto assigned by Playit.gg
, click connect.
stopping
To stop the server properly you need to shut down both Playit.gg
app and server.jar
app.
If getting errors on login
If getting errors, check following:
Playit.gg
ANDserver.jar
are both running. Check their consoles for any errors- Minecraft is of correct version (same as server)
- Internet connection is stable
- Java version is correct
- Check if localhost is working correctly. To do so, you won’t need
Playit.gg
, simply runserver.jar
and try to connect to it usinglocalhost
as described earlier in steps 1-6.
If errors persist, try following:
- Restart game and launcher, server.jar,
Playit.gg
app and/or PC - Disable and enable
Playit.gg
tunnel, try deleting it and creating a new one
Pros/Cons
Pros:
- Completely free
- Safe (you do not share you own IP or open extra ports)
- Works on both official and cracked minecraft
- Can work with mods (search for a better instruction on that)
- Can handle up to 20 players by default
- You are using your own hardware for that (you can dedicate a lot of RAM and storage)
- All files are stored on your device, noone has control over them except for you, you can change settings etc
- You can create a whitelist and have control over connections
Cons:
- Might be a bit problematic to setup
- Your device has to be running for the server to be running
- Your server will take storage space and resources of your device
- I could figure out how to create a server of non-latest version
Other approaches to creating a Minecraft server
Using hosts, like Scalacube (2.8GB, 6GB RAM for free - getting full very quickly) etc. Limited to storage space and RAM, but very easy to setup and use.
Using the same
server.jar
with port forwarding (less safe, more difficult to setup, needs access to your router).Using LAN and Hamachi (not exactly a server but allows to play with friends). Might cause severe ping.
Minecraft Realms. Paid and works only with official minecraft