How to Set Up a Minecraft Server: A Complete Step-by-Step Guide

Minecraft has outlived nearly every gaming trend. In 2026, it is still one of the most-played games in the world, with over 170 million monthly players across Java and Bedrock versions. Joining a friend’s world is fine, but running your own server is a completely different experience. You control the rules, the mods, who gets to join, and how the world behaves. This guide walks you through the entire process — from choosing your server software to getting your first friend connected.

Step 1: Choose How You Want to Host
Before downloading anything, decide where your server will actually run. There are three main routes: LAN play for a quick same-network session, a dedicated server running on your own hardware, or a hosted server through a third-party provider.
- LAN Play is the simplest option. Every device must be on the same Wi-Fi or wired network. Open Minecraft Java Edition, load a singleplayer world, press Esc, and click Open to LAN. Other players on the same network launch Minecraft, click Multiplayer, and your world appears automatically in the server list. This works well for a quick session with friends in the same house, but no one outside your local network can join.
- Self-Hosted means running the server software on your own PC or a VPS. This gives you full control but requires some technical setup, which this guide covers in detail.
- Managed Hosting (services like Hostinger, Contabo, or DigitalOcean, VPS Malaysia) handles the infrastructure for you. Using a virtual private server is the easiest way to set up a Minecraft server if you want something always online. These services typically offer one-click installs and game panels, making them ideal for beginners who don’t want to deal with command lines.
Step 2: Choose Your Server Software
Not all Minecraft server software is equal. Your choice determines performance, plugin compatibility, and how many players you can host comfortably.
- Vanilla is the official Mojang server JAR — no plugin or mod support, but the purest Minecraft experience. Best for small groups who want an unmodified game.
- Paper is a high-performance fork of Spigot with significant optimizations and bug fixes, and it is the most popular choice for server hosting because it supports Bukkit/Spigot plugins while delivering much better tick performance.
- Fabric is a lightweight, modular mod loader focused on client and server-side mods — ideal for modded survival servers.
- Forge is the original modding platform with the largest mod ecosystem; Forge servers are resource-intensive but give you access to thousands of content mods and modpacks.
For most people, Paper is the right starting point. It is fast, stable, and compatible with the vast majority of popular plugins.
Step 3: Check System Requirements
You need a server with at least 2 GB of RAM and a dual-core CPU to run a basic Minecraft world. For smoother performance with multiple players or mods, 4 GB of RAM or more is recommended.
Java is also required. Minecraft 1.20 and later require Java 21. Mismatched versions cause immediate crashes on startup, so verifying your Java version before proceeding saves a lot of frustration.
Step 4: Install Java
On Ubuntu/Debian Linux, run:
| sudo apt update sudo apt install openjdk-21-jre-headless |
Verify the installation with:
| java -version |
You should see output confirming Java 21 or newer. On Windows, download the Java 21 installer from the official Oracle website, run it, and confirm the installation by opening Command Prompt and typing java -version.
Step 5: Download the Server Software
- For Vanilla: Go to minecraft.net/en-us/download/server and download the latest server.jar file.
- For Paper: Visit papermc.io, select your Minecraft version, and download the latest build.
Create a dedicated folder for your server — something like minecraft-server on your desktop or home directory — and move the JAR file into it.
Step 6: Run the Server for the First Time
Open a terminal (or Command Prompt on Windows), navigate to your server folder, and run:
| java -Xms2G -Xmx4G -jar server.jar –nogui |
The -Xms flag sets the minimum RAM allocated to the server, and -Xmx sets the maximum. Adjust these values based on how much RAM your machine has. The server will generate a few files and then stop, because you have not yet accepted Mojang’s End User License Agreement.
Open the newly created eula.txt file and change:
| eula=false |
to:
| eula=true |
Save the file and run the same startup command again. This time the server will fully initialize, generate your world, and begin listening for connections.
Step 7: Configure server.properties
Your server folder now contains a file called server.properties. This is where you configure the core behavior of your server. Open it in any text editor. Key settings to know:
- max-players — Sets the player cap (default is 20).
- difficulty — Options are peaceful, easy, normal, or hard.
- gamemode — Set to survival, creative, adventure, or spectator.
- white-list — Set to true to restrict the server to approved players only.
- level-seed — Enter a specific seed here if you want a particular world generation.
- view-distance — How many chunks are loaded around each player. Lowering this (e.g., to 8) significantly reduces lag on modest hardware.
- server-port — Default is 25565. Only change this if you have a specific reason.
Save the file and restart the server for changes to take effect.
Step 8: Open Your Port (For Self-Hosted Servers)
If you are running the server on your home PC and want players outside your local network to connect, you need to forward port 25565 TCP through your router. Log into your router’s admin panel (usually at 192.168.1.1 or 192.168.0.1), find the Port Forwarding section, and create a rule pointing port 25565 TCP to your PC’s local IP address.
Players connect using your public IP address, which you can find by searching “what is my IP” in a browser. If you are self-hosting on a cloud VPS, the public IP is already exposed — no port forwarding is needed, but you should open port 25565 in your Minecraft VPS firewall using:
| sudo ufw allow 25565/tcp |
Step 9: Connect and Invite Friends
Open Minecraft Java Edition, click Multiplayer, then Add Server. Enter your server’s IP address (or localhost if you are connecting from the same machine). Click Join Server and you are in.
Share your public IP address with friends and have them add it the same way. If you want a cleaner address than a raw IP, you can point a domain name to your server’s IP and share that instead.
Step 10: Add Plugins (Paper Servers)
If you chose Paper, you can now extend your server with plugins. Must-have plugins include EssentialsX — an all-in-one toolkit providing home, warp, and teleport commands, kits, and economy basics that almost every server runs. LuckPerms is the industry-standard permissions plugin for creating groups like admin, moderator, and member. WorldEdit is a powerful in-game building and editing tool essential for builders and setting up spawn areas.
To install a plugin, download its .jar file from a trusted source like Hangar (the official Paper plugin repository) or SpigotMC, then drop it into your server’s plugins folder and restart the server.
Step 11: Keep Your Server Running 24/7
If you want your server online even when you are not at your computer, you have two options. On Linux, create a systemd service so the server restarts automatically on reboot:
| [Unit]Description=Minecraft Server After=network.target [Service]User=your-username WorkingDirectory=/home/your-username/minecraft ExecStart=/usr/bin/java -Xmx4G -Xms4G -jar server.jar nogui Restart=always [Install]WantedBy=multi-user.target |
Your server will now run in the background and restart automatically after any reboot. Alternatively, use the screen utility to keep the server process alive in a detached terminal session.
Common Errors and How to Fix Them
Server crashes on startup: Check your Java version with java -version. Minecraft 1.20 and later require Java 21. Mismatched versions cause immediate crashes.
High lag or low TPS: Reduce view-distance in server.properties, switch to Paper if you are on Vanilla, and increase allocated RAM. Use /tps in-game on Paper servers to check your current tick rate — 20 TPS is ideal.
EULA error: You must set eula=true in eula.txt before the server will start.
Can’t connect from the same PC: Use localhost or 127.0.0.1 as the server address in Minecraft. Your public IP won’t work on the same machine due to NAT loopback.
Final Thoughts
Setting up a Minecraft server is more accessible than most people expect. LAN play takes under two minutes. A Java Edition dedicated server goes from download to your first connection in about 20 minutes. The most important decisions are choosing between Paper and Vanilla based on whether you want plugins, and allocating enough RAM to keep things smooth as more players join. Once it is running, the server is yours — the world, the rules, and the community are entirely under your control.



