Guides
How to Set Up a Minecraft Server: The Complete Walkthrough
Running your own Minecraft server lets you and your friends play on your own world, on your own rules, without paying for a Realm. This walkthrough covers downloading the official server software for both Java and Bedrock, configuring it,
Running your own Minecraft server lets you and your friends play on your own world, on your own rules, without paying for a Realm. This walkthrough covers downloading the official server software for both Java and Bedrock, configuring it, opening it to the internet, and keeping it running smoothly.
Choosing Your Edition: Java vs. Bedrock
The two editions use completely different server software, so decide which one your group plays before you start.
Java Edition
- Runs on Windows, macOS, and Linux.
- The official server JAR is free from minecraft.net.
- Supports plugins (Spigot, Paper, Purpur) and mods (Fabric, Forge).
- Every player must run the same game version as the server (for example, 1.21.4).
Bedrock Edition
- The Bedrock Dedicated Server (BDS) is free but runs only on Windows 10/11 and Linux.
- Consoles and phones can join a Bedrock server but cannot host one.
- No plugin ecosystem; you use behavior packs and add-ons instead.
- Realms is the official paid alternative if you don't want to self-host.
Checking Your Hardware
- RAM: 2 GB absolute minimum; 4 GB is comfortable for 2–5 players; 8 GB or more for 10+ players.
- CPU: A modern dual-core works, but a quad-core is recommended since Minecraft is single-thread heavy.
- Storage: An SSD is strongly preferred; budget roughly 1 GB per world plus space for backups.
- Upload speed: At least 5 Mbps for a small group; more if you plan to run 10+ players.
- OS: 64-bit Windows, Linux, or macOS for Java servers.
Setting Up a Java Server
Installing the Correct Java Version
The required Java version depends on your Minecraft version:
- 1.16.5 and older: Java 8
- 1.17.x: Java 16
- 1.18 through 1.20.4: Java 17
- 1.20.5 and newer, including all 1.21.x releases: Java 21
Eclipse Temurin (adoptium.net) is the standard choice. Installing the wrong major version is the single most common cause of a server failing to start.
Downloading the Server JAR
- Go to the official server download page at minecraft.net and grab
server.jarfor your target version. - Create a dedicated folder, such as
minecraft-server, and move the JAR into it. Everything the server generates will live in this folder.
Running the Server for the First Time
- Open a terminal in your server folder and run
java -jar server.jar nogui. Thenoguiflag skips the resource-hungry graphical window. - The server will immediately stop and create its config files — this is normal.
- Open
eula.txtand changeeula=falsetoeula=true. - Relaunch with RAM flags:
java -Xms2G -Xmx4G -jar server.jar nogui.-Xmsis starting memory,-Xmxis the maximum; never allocate more than about 75% of your total RAM. - Wait for the console to print
Done!, then typeop YourUsernameto make yourself an administrator.
Configuring server.properties
Open server.properties in a text editor. Key settings include:
gamemode=survivalandforcegamemode=falsedifficulty=easy(options: easy, normal, hard)max-players=20view-distance=10— lower to 8 if players report lagsimulation-distance=10— added in 1.18online-mode=true— keep this unless every player owns a legitimate account; setting it false invites piracy and security riskswhite-list=false— set to true once you've added playersspawn-protection=16— radius of the protected spawn area in blocksenable-command-block=false— set to true if you want command blocksserver-port=25565motd=— the message players see in the server list
Managing Players
op <name>grants full admin rights and writes toops.json.whitelist add <name>adds players towhitelist.json.ban <name>andpardon <name>handle troublemakers.
Opening Your Server to the Internet
Port Forwarding (Java)
- Find your local IPv4 address with
ipconfig(look for192.168.x.x). - Log into your router at
192.168.1.1or192.168.0.1. - Create a port forwarding rule: TCP port 25565 to your IPv4 address.
- Allow
java.exethrough Windows Firewall. - Find your public IP at whatismyip.com and share it with friends; they connect with
your.ip.address:25565.
Bedrock Ports
Bedrock uses UDP 19132 for IPv4 and UDP 19133 for IPv6. Forward those instead of TCP 25565.
Setting Up a Bedrock Dedicated Server
- Download the Bedrock Dedicated Server for Windows or Linux from minecraft.net.
- Extract the archive into its own folder.
- Edit
server.properties: setserver-name,gamemode,difficulty,max-players,allow-cheats, and confirmserver-port=19132. - Launch
bedrock_server.exe(Windows) or./bedrock_server(Linux). Accept any firewall prompts. - To add behavior packs, drop them into the
behavior_packsfolder and link them to your world viaworld_behavior_packs.json.
Note that Bedrock server updates typically trail Java releases by days or weeks, and console players connect through the Servers tab using your IP and port rather than the Friends tab.
Adding Plugins, Mods, and Datapacks (Java Only)
- Plugins: Install Paper or Purpur instead of the vanilla JAR, then drop plugin JARs into the
pluginsfolder. EssentialsX, LuckPerms, WorldEdit, and CoreProtect cover basics, permissions, building, and rollback. - Mods: Fabric and Forge servers require every player to install the exact same mods, and vanilla clients cannot join modded servers. Keep a small, curated mod list.
- Datapacks: These work on vanilla servers — place them in
world/datapacksand no player needs to install anything.
Updating and Backing Up
Before any update, stop the server and copy the entire world folder somewhere safe. Worlds from 1.18 onward span Y=-64 to Y=320, so newer versions can rewrite enormous amounts of terrain; if an update changes world generation, unexplored chunks will generate with the new rules, creating harsh cliffs at old borders. Pre-generate your chunks with a plugin like Chunky on Paper, and never downgrade a world to an older version — it can corrupt the save.
Troubleshooting Common Problems
- "Connection refused" / players can't connect: Your port forward or firewall rule is wrong. Verify TCP 25565 points at the correct local IPv4.
- "Outdated server!" / "Outdated client!": Version mismatch. The server JAR and every player's game must match.
- Players time out on join: Lower
view-distanceto 8 and check your upload bandwidth. - Lag spikes: Restart the server daily, and on Paper run
/tpsto check ticks per second; anything below 19–20 means the server is struggling. - Bedrock friends can't see the server: They must enter the IP with the port, e.g.,
12.34.56.78:19132.
Bottom line
A basic Java server takes about 15 minutes: install the right Java version, run the JAR, accept the EULA, and forward port 25565. Bedrock is similar with UDP 19132 but no plugin support. Allocate 4 GB of RAM for a small group, back up your world folder before every update, and you'll have a reliable server that costs nothing but a little electricity.
Questions
How do I set up a Minecraft server for the first time?
Download the official server software from minecraft.net, run the JAR file to generate the configuration files, and accept the EULA by editing eula.txt. Then configure server.properties with your desired settings and launch the server using a Java command with appropriate RAM allocation. You can connect locally or share your public IP address with friends for remote access.
What are the minimum system requirements to host a Minecraft server?
A Minecraft server requires at least 2GB of RAM for a small vanilla server with a few players, though 4GB or more is recommended for modded servers or larger player counts. You need a stable CPU, preferably with a clock speed of at least 2GHz, and a reliable internet connection with at least 5 Mbps upload speed for multiplayer. The server software itself runs on Windows, macOS, and Linux.
How much does it cost to run a Minecraft server?
Running a server on your own hardware costs only electricity and your existing internet connection. Third-party hosting services typically charge between $5 and $50 per month depending on the number of player slots, RAM allocation, and whether the server is vanilla or modded. Free hosting options exist but usually come with limitations on uptime, performance, and customization.
How do I let friends join my Minecraft server over the internet?
You need to set up port forwarding on your router, directing traffic on port 25565 to the local IP address of the machine running the server. Share your public IP address with friends, who can then add it in the multiplayer server list. Alternatively, you can use a VPN service like Hamachi or a tunneling service to avoid port forwarding altogether.
Start the discussion.