How Set Up A Minecraft Java Edition Server (2025)
A full guide on how to download and install a Minecraft Java Edition server.

A full guide on how to set up a Minecraft Java Edition server on both Windows and Linux (Debian 12)! This includes installing Java, basic server configuration, and launching the server via startup scripts or using tools like screen
on Linux.
Whether you're looking to host a small survival server for your friends or create a public modded world, this guide will walk you through what you need to start out!
Table Of Contents
- Requirements
- Download Minecraft Server JAR
- Setting Up On Windows
- Setting Up On Debian Linux (Debian 12)
- Basic Configuration
- Conclusion
- See Also
Requirements
Before setting up your server, here's what you'll need:
- A PC with 4GB or more RAM
- A Minecraft Java Edition account
- Java 17 or newer (depending on Minecraft version)
- If you want other players to be able to join the server, you will need to ensure you have a stable Internet connection and TCP port
25565
port forwarded on your network. Here's a guide on how to port forward!
Additionally here's a list of nice haves.
- A basic understanding of how to run scripts and commands (Batch for Windows, Bash/Shell for Linux).
- Familiarity with your terminal or command prompt.
Download Minecraft Server JAR
You'll need the official Minecraft Server .jar
file:
- Go to: https://minecraft.net/en-us/download/server
- Download the latest
.jar
file and place it in a new folder. We recommend something like:
C:\MinecraftServer
or on Linux:
~/minecraft/server
Setting Up On Windows
Install Java On Windows
- Download Java 17+ from Adoptium
- Run the installer
- (Optional) Add Java to your system
PATH
:setx PATH "%PATH%;C:\Program Files\Eclipse Adoptium\jdk-17\bin"
Create A Startup Script (Windows)
Inside the folder where your server.jar
is located:
-
Right-click → New → Text Document
-
Rename it to
start.bat
-
Edit it and paste the following:
@echo off java -Xmx4G -Xms2G -jar server.jar nogui pause
-
Save the file and double-click
start.bat
to launch your server.
If it's your first run, a eula.txt
file will appear. Open it and change:
eula=false
to:
eula=true
Then re-run start.bat
.
Setting Up On Linux (Debian 12)
Install Java On Linux
Open a terminal and type:
sudo apt update
sudo apt install -y openjdk-17-jdk
Verify it installed:
java -version
Create A Startup Script (Linux)
Create a new folder and move into it:
mkdir -p ~/minecraft/server
cd ~/minecraft/server
Move your server.jar
here, then create start.sh
:
nano start.sh
Paste this:
#!/bin/bash
cd "$(dirname "$0")"
java -Xmx4G -Xms2G -jar server.jar nogui
Save and make it executable:
chmod +x start.sh
Run it with:
./start.sh
Just like Windows, the first time you run it you'll need to accept the EULA:
nano eula.txt
Change eula=false
to eula=true
, then save and re-run.
Using screen
On Linux
If you want your server to keep running after you close the terminal:
- Install screen:
sudo apt install screen
- Start a new session:
screen -S minecraft
- Run your server:
./start.sh
-
Detach from screen:
PressCTRL + A
, thenD
-
Reattach later:
screen -r minecraft
This is a great way to keep your server online 24/7 even when you're not SSH'd in.
Basic Configuration
After running your server once, it will generate a server.properties
file.
To edit the configuration:
nano server.properties # Linux
notepad server.properties # Windows
Some options you may want to change:
motd=Welcome to My Server!
max-players=10
difficulty=normal
pvp=true
enable-command-block=false
allow-nether=true
online-mode=true
You can whitelist users by adding them via the server console or editing whitelist.json
:
whitelist on
whitelist add <username>
Conclusion
You now have a basic, but functioning Minecraft Java Edition server running on either Windows or Linux! Whether you're hosting a private world for friends or planning to go public, you should be off to a great start.
See Also
- Minecraft Java Server Download
- OpenJDK Downloads (Linux)
- Adoptium Java Downloads (Windows)
- How To Port Forward Minecraft
- Screen Manual
This guide is a work-in-progress and may be updated over time. If you have suggestions or improvements, we'd love your feedback!