How to make a Minecraft server on your computer using command? In order to create a Minecraft server on your PC with the help of command, it is better to install an up-to-date Java and download the official server.jar file through theś official site of Minecraft and put it in a special folder. Start the server like this, in open Command Prompt (Windows) or Terminal (Mac/Linux), navigate to that folder using the cd command, and run java -Xmx1024M -Xms1024M -jar server.jar nogui to start the server. Agree to the EULA by switching the eula.txt to true directory and restarting the server using the same command, as before. The server can be connected by typing localhost into the Minecraft multiplayer section, assuming you want friends to join as well, port forward (DEFAULT 25565) in your router and give out your public IP address.
In this tutorial, I will take you through the detailed step by step procedure of how to make a Minecraft server on your computer using command. Perhaps you want a small friends-only server, or you want to experiment with plugins and custom worlds, but you have no idea how to go about getting it up and running – this tutorial will help you get started.
How to Make a Minecraft Server on Your Computer Using Command? Step-by-Step Guide
Step 1: Check Requirements of the Computer
You must ensure sufficient compatibility of your computer with the setting up of a server before going forward with it. Both playing Minecraft itself and hosting a server on it require resources, and, at that, additional memory and CPU power. This is the suggested minimum requirements:
- Operating System: Windows, macOS or Linux
- Processor: intel core I 5 or similar
- RAM: Minimum Ideal 8GB (2-4GB should be allocated to the server)
- Linked storage: 2GB free server files and world
- Java: Up to date Java installed
In order to play with mods or have a lot of players (>10), you will have to get more powerful equipment. A somewhat powerful PC is sufficient to rely on when it comes to casual use among friends.
Step 2: Set up Java
Minecraft servers are Java-based so there is a need to install or update Java before creating the server.
- Visit the Java official Web site
- Instead, update your computer’s Java software.
- Install it as prompted by it
- To confirm that Java has been installed properly, open a Command Prompt (Windows) or a Terminal (macOS/Linux) and issue following command:
nginx copy Edit java -version
If it displays a version number, that is the good news.
Step 3: Get a Copy of Minecraft Server File
Then, you should download the official Minecraft server software, Mojang.
- Go to on graphical server download page
- The file to download is called server.jar (it may be called minecraft_server.<version>.jar).
- Make a folder on your computer (C:\MinecraftServer, for example) and upload the server. The folder contains a jar file.
Here all the worlds and everything regarding the server will be saved.
Step 4: Run Command Prompt or Terminal
Here we will begin to work with commands in order to configure the server.
- On a Windows machine, hold the Win key and press R, type in cmd and hit enter.
- On Mac/Linux, open the Terminal application.
to move directories to your server’s location. jar file, enter cd (change directory).
For example:
bash copy Edit cd C:\MinecraftServer
Wizard (Substitute the actual folder path location for the path.)
Step 5: Launch Minecraft Server
To start the server the first time use the following command:
nginx copy Edit java -Xmx1024M -Xms1024M -jar server.jar nogui
What the command means is this:
- -Xmx1024M = The maximum amount of memory set (1G here).
- Xms1024M = Minimum memory that can be allocated.
- server.jar = Instructs Java on how to use the server file.
- nogui = Runs in the background without the graphical interface (saves resources).
The files will start being generated on your folder successfully when everything goes through.
Step 6: Agree with EULA
The server will automatically stop and a file will be created eula.txt. Open it using Notepad or any other text client.
Find the line:
ini copy Edit eula=false
Change it to:
ini copy Edit eula=true
Save the file and close down the file. Which implies your acceptance of Mojang End User License Agreement.
Step 7: Server Properties
At this point you will have a file in your folder called server.properties. This is where you change how the server behaves. Change the following values after opening it in a text editor:
- server-port=25565 → Default port number
- max-players=10 → Set how many players can join
- online-mode=true → Ensures only verified accounts can join
- motd=My Minecraft Server → Message of the day (appears in multiplayer list)
Once you have edited, save the file.
Step 8: Restart server
re-run the start command:
nginx copy Edit java -Xmx2048M -Xms1024M -jar server.jar nogui
This time, there should not be an error on launching the server. In the command window you will see your log messages indicating that the world is being generated.
Step 9: Link to Your Server
- Open Minecraft in your PC.
- On Main Menu, Click Multiplayer then Add Server.
- Fill in the name of the server as localhost and localhost as IP address.
- Click enter server
You should be within your own Minecraft server in a local computer environment.
Step 10: Invite Edited:
In case you are only interested in playing alone, then you are finished. However, in case you want others to connect with you, you will need to give them your IP address, and open up the firewall.
- Find your IP number
In command prompt, on Windows, run ipconfig and locate IPv4. - Port forward:
Log into your routers settings and then forward port 25565 to the local IP of your computer. - Share IP:
Tell your friends your public IP (search in the browser What is my IP).
Your friends are able to connect to enter your IP within Minecraft.
Step 11:Simple Server commands
When you are in the server console (Command Prompt), commands may be executed to control. Some of the useful ones are as follows:
- /op <username> → Makes a player an operator (admin).
- /gamemode creative <username> → Change player’s game mode.
- /ban <username> → Ban a player.
- /stop → Safely stops the server.
Step 12: Maintaining a Smooth Server
- Assign more RAM: In case your server is sluggish, data and memory allocation should be raised:
nginx copy Edit java -Xmx4096M -Xms2048M -jar server.jar nogui
- Write a startup script: Just write a .bat (Windows), or .sh (Linux) to start your server cd into the location you want to start it, then run the command.
- Backups: Keep backups by running a copy of your world folder on a regular basis in case you crash.
Final Thoughts
Minecraft server is an entertaining task to manage on your own computer by using commands. It lets you play the game in a completely new light, whether it be building with friends, testing the capabilities of mods, or making special challenges. What is most satisfying about it is that it will only cost you your computer and internet connection.
Now that you have installed Java, downloaded the minecraft server file, used commands to start that server and configured your settings, you have the knowledge that you can run your own mine craft server. In the long run, you can expand through plug in, modification or a distinct hosting machine.
Pick up your pickaxe, call up your freinds and begin creating memories in your own Minecraft world!