How to Set Up Your Own Minecraft Server
How to Set Up Your Own Minecraft Server
Running your own Minecraft server gives you complete control over your multiplayer experience. Whether you want a private world for just a few friends or a larger community hub, managing your own server provides flexibility and customization options unavailable on Realms or third-party hosting (without direct server access). Setting up your own server means you dictate the rules, the world generation, the performance settings, and who gets to play. It can be a learning experience, but the payoff is a uniquely tailored Minecraft world. Here's how to get started:
Requirements
Setting up a server requires a bit more than just running the Minecraft client. Ensure your chosen machine meets these baseline requirements:
- A computer: This machine will host the server. It can be the same computer you play on, but for better performance, especially with more players, a dedicated machine is strongly recommended. Running the server and client on the same machine splits resources, potentially leading to lag for both you and other players.
- Processor (CPU): While Minecraft server isn't heavily multi-threaded for core gameplay simulation (meaning one core often does the bulk of the work for the main world simulation), a CPU with strong single-core performance is highly beneficial. Newer Minecraft versions are getting better at utilizing multiple cores for tasks like chunk loading, but the main game loop often relies heavily on one core's speed. Therefore, a higher clock speed (GHz) on at least one core can be more impactful than simply having many cores. A modern multi-core processor (like an Intel Core i5/i7/i9 or AMD Ryzen 5/7/9, ideally from recent generations) is ideal to handle background tasks and potential plugins/mods.
- RAM: At least 4GB of RAM dedicated solely to the server is the absolute minimum for a couple of players on a completely vanilla world with a low view distance. For larger groups (5+ players), modded servers (which can significantly increase RAM usage per player), or servers running numerous plugins, 8GB, 16GB, or even 32GB+ of dedicated RAM is highly recommended for a smooth, lag-free experience. Insufficient RAM is one of the most common culprits behind server slowdowns ("rubber banding," block lag). Ensure the host machine has enough RAM overall to support both the operating system and the allocated server RAM.
- A good internet connection: Your server needs to constantly send and receive data from all connected players. This is arguably as important as the server hardware itself.
- Upload Speed: This is crucial and often the bottleneck for home-hosted servers. Players download world data, mob positions, and player actions from your server. Your upload speed limits how quickly and smoothly they experience the world loading and updating around them. A minimum of 5 Mbps upload might handle 2-3 players with low settings, but 10-20 Mbps upload is better for 5-10 players. For larger servers or higher view distances, aiming for 25 Mbps+ upload is advisable. You can test your speed using services like Speedtest.net.
- Download Speed: While less critical than upload, decent download speed (e.g., 20 Mbps+) is still needed for downloading server software updates, assets, and efficiently receiving player input data. Most home internet plans have much higher download than upload speeds.
- Latency (Ping): A low-latency (low ping time) connection ensures responsiveness between player actions and server responses. Wired connections (Ethernet cable directly from the computer to the router) are strongly preferred over Wi-Fi for hosting. Wi-Fi is prone to interference, packet loss, and higher latency fluctuations, which can cause frustrating lag spikes for players, even with high bandwidth.
- Java installed (for Java Edition servers): Minecraft: Java Edition servers are applications written in the Java programming language. You'll need the Java Runtime Environment (JRE) installed on the server machine to execute the server software.
- It's strongly recommended to use the latest 64-bit version of Java (often referred to as Java Development Kit - JDK, which includes the JRE) for the best performance and compatibility, particularly if allocating more than 2GB of RAM (32-bit Java cannot handle large RAM allocations).
- Download reliable builds from sources like Adoptium (Eclipse Temurin) which provide free, open-source OpenJDK builds. Oracle Java is another option, but be mindful of potential licensing changes for commercial use.
- Crucially, ensure the installed Java version matches the requirements of the Minecraft server version you intend to run. Newer Minecraft versions (e.g., 1.17+) often require newer Java versions (e.g., Java 16 or 17+), while older Minecraft versions might need older Java (like Java 8). Check the documentation for your chosen Minecraft server version or server software (Paper/Spigot). Having the wrong Java version installed is a common reason for the server failing to start. You may need to specifically install an older or newer version depending on your Minecraft target version.
- Basic understanding of networking concepts: You don't need to be a network engineer, but familiarity with these terms is essential for making your server accessible:
- IP Address: A unique address identifying a device on a network. You have a Local IP (used only within your home network, like
) and an External/Public IP (used to identify your network on the internet, assigned by your ISP).192.168.1.5
- Port: Like a specific door number on your IP address. Minecraft Java typically uses port
(TCP), and Bedrock uses25565
(UDP). Different applications use different ports to avoid conflicts.19132
- Port Forwarding: The process of telling your home router to send incoming traffic destined for a specific port (e.g., 25565) directly to the local IP address of your server computer. This allows external players to reach your server.
- Firewall: Security software on your computer or router that blocks unwanted network traffic. You'll need to configure it to allow incoming traffic on the Minecraft server port.
- Understanding how to access your router's web-based configuration page (usually via its gateway IP address) is key to setting up port forwarding.
- IP Address: A unique address identifying a device on a network. You have a Local IP (used only within your home network, like
Setting Up a Java Edition Server
The classic Minecraft experience runs on Java. Setting up a server involves downloading the official software (or alternatives like Spigot/Paper which are highly recommended for performance and plugins) and configuring it.
-
Download Server Software
- Go to the official Minecraft website: minecraft.net/download/server
- Download the latest
file. This is the core software provided by Mojang, offering the vanilla Minecraft experience.server.jar
- Alternatively (Recommended): For significantly better performance, stability, extensive configuration options, and the ability to use plugins, consider using third-party server software:
- PaperMC: A highly optimized fork of Spigot, widely regarded as the best choice for performance and plugin support. It includes numerous bug fixes and performance enhancements not found in Vanilla or Spigot.
- SpigotMC: A fork of CraftBukkit (which itself was a modified vanilla server) that provides plugin support via the Bukkit API and includes some performance improvements over vanilla. Paper is generally preferred over Spigot nowadays.
- Download their respective JAR files (e.g.,
) instead of the officialpaper-1.xx.x-xxx.jar
if you choose this route. The setup process detailed below remains largely the same, just replaceserver.jar
with the name of the JAR file you downloaded.server.jar
-
Create a Server Directory
- Choose a specific, easily accessible location on your computer's hard drive where you want to store all server-related files. Avoid placing it directly on the Desktop or within system folders like
. A dedicated folder likeProgram Files
orC:\Servers\Minecraft\MySurvivalServer
is good practice, especially if you plan to run multiple servers eventually.~/minecraft/servers/survival
- Move the downloaded
(or Paper/Spigot JAR) file into this newly created folder. Keeping server files well-organized prevents clutter and makes managing backups and configurations much easier.server.jar
- Choose a specific, easily accessible location on your computer's hard drive where you want to store all server-related files. Avoid placing it directly on the Desktop or within system folders like
-
Start the Server First Time
- You need a script to launch the server JAR file with specific Java arguments, primarily for allocating RAM and potentially adding performance flags. Running the JAR directly by double-clicking often doesn't allocate enough RAM or apply necessary settings.
- Create a start script within your server directory:
- Windows: Create a new text file named
. Right-click inside the folder, select New -> Text Document. Rename it tostart.bat
(ensure file extensions likestart.bat
are visible in Windows File Explorer so you can remove it properly). Right-click the.txt
file and select Edit. Paste the following line (adjust RAM and JAR filename):start.bat
Explanation:java -Xmx4G -Xms4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper-1.19.4.jar nogui pause
: Calls the Java executable. Ensure Java'sjava
directory is in your system's PATH environment variable, or provide the full path likebin
."C:\Program Files\Java\jdk-17.0.2\bin\java.exe"
: Sets the maximum RAM to 4 Gigabytes. Adjust-Xmx4G
(e.g.,4G
,8G
) based on your available RAM and needs. Don't allocate all your system RAM; leave enough for the OS (at least 2-4GB).16G
: Sets the initial RAM allocated to 4 Gigabytes. Setting Xms and Xmx to the same value prevents lag spikes caused by Java resizing its memory heap during gameplay.-Xms4G
: Tells Java to run the specified JAR file. Rename this to match the exact filename of your server JAR.-jar paper-1.19.4.jar
: Starts the server without the Mojang graphical console window. This saves system resources and is standard practice. Server commands are entered directly into the command prompt/terminal window that opens when you run the script.nogui
: (Windows only) Keeps the command window open after the server stops (e.g., due to an error or typingpause
), allowing you to read any final messages or error codes. Remove this if running automatically.stop
- (Advanced) Aikars Flags: The long string of
arguments shown above are known as "Aikar's Flags," commonly recommended performance tuning options for modern Java garbage collectors (like G1GC) used with Minecraft servers (especially Paper/Spigot). They can help reduce lag spikes from garbage collection. You can generally copy/paste these, ensuring your-XX:
and-Xmx
are set appropriately.-Xms
- Linux/Mac: Create a text file named
. Open a terminal, navigate to your server directory (start.sh
), and use a text editor likecd ~/minecraft/servers/survival
:nano
. Paste a similar line, adjusting RAM and JAR file name (the Aikar flags work here too):nano start.sh
Save the file (Ctrl+O in nano, then Enter; Ctrl+X to exit). Make the script executable in the terminal:#!/bin/bash java -Xmx4G -Xms4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper-1.19.4.jar nogui
.chmod +x start.sh
- Windows: Create a new text file named
- Run the script:
- Windows: Double-click the
file. A command prompt window should appear.start.bat
- Linux/Mac: Open a terminal, navigate to the server directory, and run
../start.sh
- Windows: Double-click the
- First Run Failure (Expected): The server will attempt to start, print some messages, generate a few essential files (
folder,logs
,server.properties
), and then stop almost immediately. You'll likely see a message in the console saying you need to agree to the EULA. This is normal behavior for the very first launch. Check the console oreula.txt
for any other errors if it fails differently (e.g., incorrect Java version, port already in use).logs/latest.log
-
Accept EULA
- Inside your server directory, you will now find a file named
.eula.txt
- Open this file with any standard text editor (like Notepad, Notepad++, VS Code, nano).
- You will see a line
and a link to the Minecraft End User License Agreement. Read the terms online. If you agree to them, change the line toeula=false
.eula=true
- Save and close the
file. The server will not start unless this value is set toeula.txt
.true
- Inside your server directory, you will now find a file named
-
Configure Server
- Run your start script (
orstart.bat
) again. This time, assuming the EULA is accepted and there are no other critical errors, the server should initialize fully. It will generate the world files (inside a folder usually namedstart.sh
), potentially download libraries (if using Paper/Spigot), and display many log messages in the console window. Wait until you see a message similar toworld
or[Server thread/INFO]: Done (XX.XXXs)! For help, type "help"
. This indicates the server is running and ready for connections.Timings Reset
- You can stop the server gracefully at any time by typing
into the console window and pressing Enter. Avoid just closing the console window, as this can cause improper saving or world corruption.stop
- Now, locate and open the
file using a text editor. This file is the heart of your server's configuration.server.properties
- Important settings to review and customize (hovering over options in some editors might show descriptions, or consult the Minecraft Wiki for a full list):
: The TCP port the server listens on. Default isserver-port=25565
. Only change this if the default port is genuinely already in use by another application on the server machine or for specific advanced networking reasons. If changed, players must specify the port when connecting (e.g.,25565
).your.ip.address:25566
: Default game mode for players joining for the first time (gamemode=survival
,survival
,creative
,adventure
).spectator
: Game difficulty (difficulty=easy
,peaceful
,easy
,normal
). This affects mob spawning, damage, and other mechanics.hard
is a common default.normal
: Enable (pvp=true
) or disable (true
) player-versus-player combat globally. Plugins can often manage PvP in specific areas.false
: Maximum number of players allowed online simultaneously. Set this realistically based on your server hardware (CPU, RAM) and internet upload speed. Too high a number can lead to severe lag.max-players=20
: How many chunks (16x16x384 block areas) are loaded and sent to each player's client around them. Default is 10. Higher values dramatically increase CPU, RAM, and network usage but allow players to see further. Lowering this (e.g., to 6, 7, or 8) is one of the most effective ways to improve server performance, especially with many players online. PaperMC allows setting separateview-distance=10
(where entities are active) andsimulation-distance
for finer control.view-distance
: Message of the Day. This text appears below the server name in the multiplayer server list screen in the Minecraft client. Use Minecraft formatting codes (prefixed withmotd=A Minecraft Server
) for colors and styles (e.g.,\u00A7
). There are online MOTD generators that can help with formatting.\u00A7eWelcome to \u00A7bMy Awesome Server! \u00A7cJoin Now!
: Leave blank to generate a random world seed upon first world creation. Enter a specific seed value (numbers or text) here before the first launch if you want to generate a known world layout (e.g., one found online). You can find the seed of an existing world using thelevel-seed=
command in-game (if you have permission)./seed
: Set toonline-mode=true
(default and highly recommended) to force the server to verify player accounts with Mojang's authentication servers upon login. This prevents players using cracked or pirated accounts from joining. Set totrue
only if you are running a closed LAN server where all players own the game but cannot reach Mojang servers, or if using a specific proxy setup like BungeeCord with IP forwarding enabled. Disabling online mode on a public internet server is a major security risk.false
: Defines a radius (in blocks) around the world's initial spawn point where only server operators (ops) can break or place blocks. Default is 16 blocks. Set tospawn-protection=16
to disable spawn protection entirely, allowing anyone to build/break at spawn immediately.0
: Set toenable-command-block=false
to allow the placement and execution of command blocks (requires operator status and Creative mode to obtain/place). Keeptrue
unless you specifically need them, as they can be misused if not managed carefully.false
: Set toallow-nether=true
(default) to allow players to build and use Nether portals to travel to the Nether dimension. Set totrue
to disable the Nether entirely.false
: Provide a direct HTTP(S) download link (e.g., hosted on Dropbox or a web server) to a server-wide resource pack (resource-pack=
file). Players will be prompted to download and enable it upon joining..zip
: (Optional) Enter the SHA-1 hash of the resource pack file. This allows clients to cache the pack and avoid re-downloading if it hasn't changed. Use an online SHA-1 generator or command-line tools (resource-pack-sha1=
on Linux,sha1sum
on PowerShell) to get the hash.Get-FileHash -Algorithm SHA1
- Save the
file after making your desired changes. These settings will only take effect the next time you fully start or restart the server. Some plugins might allow reloading certain settings without a full restart.server.properties
- Run your start script (
-
Port Forwarding
- This is the crucial step that makes your server accessible to players outside your local home network (i.e., connecting over the internet). You're essentially telling your router which computer on your network is running the Minecraft server.
- Find your Server Computer's Local IP Address: This is the private IP address assigned by your router to the machine hosting the server.
- Windows: Open Command Prompt (
), typecmd
, and press Enter. Look for the "IPv4 Address" listed under your active network adapter (usually "Ethernet adapter Ethernet" for wired, or "Wireless LAN adapter Wi-Fi" for wireless). It typically looks likeipconfig
,192.168.x.x
, or10.x.x.x
. Note this address down.172.16.x.x
- Mac: Go to System Preferences -> Network. Select your active connection (Ethernet/Wi-Fi) in the left pane. The IP address will be displayed on the right.
- Linux: Open a terminal and type
orip addr show
. Look for theifconfig
address under your primary network interface name (e.g.,inet
,eth0
,enpXsY
).wlan0
- Windows: Open Command Prompt (
- Configure Your Router:
- Access your router's administration web interface. Open a web browser (like Chrome, Firefox) and type your router's Gateway address into the address bar. Common gateway addresses are
or192.168.0.1
. You can also find this listed as "Default Gateway" in the192.168.1.1
output (Windows) or network settings (Mac/Linux).ipconfig
- You will be prompted for the router's username and password. These might be printed on a label on the router itself, or they could be default credentials (like
/admin
,password
/admin
, etc. - which you should absolutely change for security!). Consult your router's manual or ISP documentation if unsure.admin
- Once logged in, navigate through the router's menus to find the Port Forwarding section. This might be located under "Advanced Settings," "NAT," "Firewall," "Virtual Server," or "Applications & Gaming." The exact location and terminology vary greatly between router brands and models (Netgear, TP-Link, Linksys, ASUS, ISP-provided routers, etc.).
- Create a new port forwarding rule with the following details:
- Service Name / Application Name: Enter something descriptive, like "Minecraft Java Server" or "MC Server".
- Port Range / External Port / Public Port: Enter
(or your custom port if you changed it in25565
). Some routers ask for a start and end port; just enter 25565 in both.server.properties
- Internal Port / Local Port / Private Port: Enter
(or your custom port). This should match the external port.25565
- Protocol: Select
. Minecraft Java Edition primarily uses the TCP protocol. IfTCP
orTCP/UDP
is the only option, that's fine too, but TCP is the essential one.Both
- Device IP / Internal IP Address / Server IP Address: Enter the Local IPv4 address of the computer running the Minecraft server (the one you found using
or equivalent). Make sure this is correct!ipconfig
- Enable / Activate: Ensure the rule is enabled or checked to be active.
- Save or Apply the changes in your router settings. The router might reboot or apply settings momentarily.
- Access your router's administration web interface. Open a web browser (like Chrome, Firefox) and type your router's Gateway address into the address bar. Common gateway addresses are
- Static Local IP (Highly Recommended): By default, routers often assign local IP addresses dynamically (using DHCP), meaning your server computer's local IP (
) might change after a reboot. If this happens, your port forward rule will point to the wrong internal device, and external connections will fail. To prevent this:192.168.1.x
- DHCP Reservation: The best method. In your router's settings (often near DHCP settings), you can usually reserve a specific IP address for your server computer based on its unique MAC address (also found via
or network settings). This tells the router to always give that computer the same local IP address.ipconfig /all
- Static IP Configuration (OS): Alternatively, you can manually configure a static local IP address within the operating system's network settings on the server computer itself. Make sure to choose an IP address within your router's subnet (e.g.,
) but outside the range the router uses for automatic DHCP assignment to avoid conflicts. You'll also need to manually enter the subnet mask and default gateway address. DHCP reservation is generally easier and less error-prone.192.168.1.150
- DHCP Reservation: The best method. In your router's settings (often near DHCP settings), you can usually reserve a specific IP address for your server computer based on its unique MAC address (also found via
- Firewall Configuration: Your server computer's operating system firewall (Windows Defender Firewall, macOS Firewall, Linux
orufw
) must also allow incoming connections on the server port.firewalld
- Windows: Go to Windows Security -> Firewall & network protection -> Allow an app through firewall -> Change settings -> Allow another app... -> Browse to your Java executable (e.g., within
orC:\Program Files\Java\jdk-17...\bin\java.exe
) OR create a specific rule for TCP Port 25565. Ensure the rule applies to the correct network profile (Private/Public - typically you want it enabled for Private networks, and possibly Public if you need access from less trusted networks, though be cautious).javaw.exe
- macOS: Go to System Preferences -> Security & Privacy -> Firewall -> Firewall Options... -> Click '+' -> Add the Java application or specify to allow incoming connections on port 25565 (TCP).
- Linux (ufw): Use commands like
. Check your specific distribution's firewall management tools.sudo ufw allow 25565/tcp
- Router Firewall: Some routers also have their own separate firewall settings. Usually, creating a port forward rule implicitly allows traffic through the router's firewall for that port, but double-check if connections still fail.
- Windows: Go to Windows Security -> Firewall & network protection -> Allow an app through firewall -> Change settings -> Allow another app... -> Browse to your Java executable (e.g., within
-
Find Your IP & Connect
- For players on your Local Network (LAN): Anyone connected to the same router as the server computer (e.g., via Wi-Fi or Ethernet in the same house) can usually connect using the server computer's local IPv4 address (e.g.,
) that you used for port forwarding. From the same computer that the server is running on, you can often connect using the address192.168.1.10
orlocalhost
.127.0.0.1
- For players over the Internet: They need your network's external (public) IP address. This is the address your ISP assigns to your router.
- Find it easily by opening a web browser on any computer connected to your network and searching Google for "what is my IP address". Google will display your public IPv4 address. You can also use dedicated websites like
orwhatismyipaddress.com
.icanhazip.com
- Give this external IP address to your friends who want to connect remotely. If you used the default port 25565, they just enter this IP into the "Server Address" field in Minecraft's Multiplayer menu. If you changed the port in
and port forwarded the custom port, provide the address like this:server.properties
(e.g.,YourExternalIP:Port
).123.45.67.89:25566
- Port Check Tool: You can verify if your port forwarding is working correctly from the outside using an online port checker tool (search for "port forward checker"). Enter your external IP address and the Minecraft port (25565). It should report the port as "Open" if your server is running and port forwarding/firewall rules are set up correctly. If it shows "Closed," double-check your router settings, firewall rules, and ensure the server is actually running.
- Find it easily by opening a web browser on any computer connected to your network and searching Google for "what is my IP address". Google will display your public IPv4 address. You can also use dedicated websites like
- Dynamic IP Address Issue: Most residential internet service plans provide a dynamic external IP address. This means your public IP address can change automatically from time to time, especially when your router restarts or your ISP performs maintenance. If your IP changes, friends using the old IP won't be able to connect anymore. You'll need to find your new external IP and give it to them again.
- Dynamic DNS (DDNS): The solution to dynamic IPs. Services like No-IP (www.noip.com) or DuckDNS (www.duckdns.org) provide a free or paid hostname (e.g.,
) that points to your external IP address. You run a small client application on your server computer (or configure it directly in many modern routers) that automatically updates the DDNS service whenever your external IP address changes. Players can then connect using the stable hostname (e.g.,mycoolserver.ddns.net
) instead of the constantly changing IP address. This is highly recommended for any server intended for ongoing use.mycoolserver.ddns.net
- Dynamic DNS (DDNS): The solution to dynamic IPs. Services like No-IP (www.noip.com) or DuckDNS (www.duckdns.org) provide a free or paid hostname (e.g.,
- For players on your Local Network (LAN): Anyone connected to the same router as the server computer (e.g., via Wi-Fi or Ethernet in the same house) can usually connect using the server computer's local IPv4 address (e.g.,
Setting Up a Bedrock Edition Server
Minecraft Bedrock Edition (available on Windows 10/11, Xbox, PlayStation, Nintendo Switch, iOS, and Android) uses different server software and networking protocols compared to Java Edition.
-
Download Bedrock Server
- Go to the official Bedrock server download page on the Minecraft website: minecraft.net/download/server/bedrock
- Download the software package specifically designed for your server's host operating system. There are typically downloads for Windows (a
file containing an.zip
) and Linux (usually Ubuntu - a.exe
file containing a binary executable). Make sure you download the Bedrock Dedicated Server (BDS), not the Java server JAR..zip
-
Extract Files
- Similar to Java, create a dedicated folder for your Bedrock server files (e.g.,
orC:\Servers\Bedrock\MyBedrockWorld
).~/minecraft/servers/bedrock
- Extract the entire contents of the downloaded
file directly into this folder. You should see files like.zip
(on Windows) orbedrock_server.exe
(on Linux), along with important configuration files likebedrock_server
,server.properties
,permissions.json
, and default folders forwhitelist.json
,worlds
, andbehavior_packs
.resource_packs
- Similar to Java, create a dedicated folder for your Bedrock server files (e.g.,
-
Configure Server
- Open the
file in your Bedrock server directory using a text editor. Note that the available settings and their names/values differ significantly from the Java Editionserver.properties
file.server.properties
- Key settings you'll likely want to configure include:
: Sets the name displayed for your server in the server list within the Bedrock client (Friends/Servers tab). Choose something descriptive.server-name=Dedicated Server
: Sets the default game mode (gamemode=survival
,survival
,creative
).adventure
: Sets the game difficulty (difficulty=easy
,peaceful
,easy
,normal
).hard
: Maximum number of players allowed online concurrently. Adjust based on your server hardware and network capabilities. Bedrock servers generally tend to handle more players slightly better on equivalent hardware than vanilla Java, but performance still depends heavily on the machine.max-players=10
: Specifies the name of the folder inside thelevel-name=Bedrock level
directory that contains your world data. If this folder doesn't exist, a new world with this name will be generated on first start.worlds
: Enter a specific world seed before the first world generation if desired. Leave blank for a random seed.level-seed=
: Requires players connecting to be signed into a valid Xbox Live account (online-mode=true
). This is the standard and recommended setting for security and player identification. Setting totrue
is generally not recommended or useful for most scenarios.false
: Enable (allow-cheats=false
) or disable (true
) the use of cheat commands (likefalse
,/gamemode
,/give
) for players who have operator permissions./teleport
: The UDP port used for IPv4 connections. This is the standard default for Bedrock.server-port=19132
: The UDP port used for IPv6 connections. Default is 19133.server-portv6=19133
: Sets the view distance in chunks. Bedrock often handles higher view distances more efficiently than Java Edition, but extremely high values can still impact performance. Adjust as needed.view-distance=32
: The distance in chunks around players where the game actively ticks entities and blocks (e.g., crops grow, redstone activates). Can be between 4 and 12. Lower values can improve performance but might break farms or machines that rely on activity further away.tick-distance=4
- Review other settings like
,player-idle-timeout
, etc., based on your needs. Consult the Bedrock Dedicated Server documentation for details on all options.compression-threshold
- Save your changes to
.server.properties
- Open the
-
Start the Server
- Windows: Simply double-click the
file located in your server directory. A console window will appear, displaying log messages as the server starts up and generates/loads the world.bedrock_server.exe
- Linux: Open a terminal, navigate to your Bedrock server directory (
), and execute the server binary by typingcd ~/minecraft/servers/bedrock
../bedrock_server
- The server will initialize, load the world specified in
, and eventually indicate it's ready for connections. You can manage the server directly through this console window. Typelevel-name
to see available server commands (which differ from Java Edition commands). Use thehelp
command to safely shut down the server before closing the window.stop
- Windows: Simply double-click the
-
Port Forwarding (UDP!)
- Similar to Java Edition, you need to configure port forwarding on your router to allow external players to connect, but with a key difference: Bedrock uses UDP, not TCP.
- Access your router's administration page as described in the Java section.
- Create a new port forwarding rule:
- Service Name: "Minecraft Bedrock" or similar.
- External Port / Port Range:
(the default IPv4 port from19132
).server.properties
- Internal Port / Local Port:
.19132
- Protocol: Select
. This is critical. If you forward TCP instead of UDP, connections will fail. If your router only has aUDP
orTCP/UDP
option, select that.Both
- Device IP / Internal IP Address: Enter the Local IPv4 address of the computer running the Bedrock server.
- Enable the rule and save/apply changes.
- If you anticipate IPv6 connections and haven't changed the default IPv6 port, you might also need a separate rule forwarding UDP Port
to the same server IP address. However, most home connections and initial setups will primarily use IPv4.19133
- Firewall: Ensure your computer's firewall (Windows Defender Firewall, etc.) is configured to allow incoming traffic on UDP Port 19132. Add a rule specifically for this UDP port or potentially for the
application.bedrock_server.exe
-
Connecting
- Local Network: Players on the same Wi-Fi or wired network as the server should often see the server appear automatically under the "Friends" tab in their Minecraft Bedrock Edition game after a short time. LAN games use automatic discovery. If it doesn't appear automatically, players can go to the "Servers" tab, scroll down, click "Add Server," and manually enter:
- Server Name: (Anything they like)
- Server Address: The local IPv4 address of the server computer.
- Port:
(or your custom port).19132
- Internet: Players connecting from outside your local network need your network's external (public) IP address (find it by searching "what is my IP"). They go to the "Servers" tab -> "Add Server" and enter:
- Server Name: (Anything they like)
- Server Address: Your external IP address.
- Port:
(or your custom port).19132
- They should then be able to save the server and connect, provided port forwarding (UDP 19132) and firewalls are configured correctly, and the server is running. Remember the potential need for DDNS if your external IP is dynamic.
- Local Network: Players on the same Wi-Fi or wired network as the server should often see the server appear automatically under the "Friends" tab in their Minecraft Bedrock Edition game after a short time. LAN games use automatic discovery. If it doesn't appear automatically, players can go to the "Servers" tab, scroll down, click "Add Server," and manually enter:
Server Maintenance Tips
Running a server isn't a one-time setup; it requires ongoing attention to keep it performing well, securely, and preserving your world data.
- Regular Backups: This is arguably the most important maintenance task. Hardware failure, software bugs, world corruption, griefing incidents, or simple administrative mistakes can lead to catastrophic data loss if you don't have backups.
- Frequency: Back up at least once daily during periods of activity. For very active servers, backing up every few hours might be wise. Back up before performing major changes like server updates, adding new plugins/mods, or making significant configuration changes.
- Method: The safest way is to first stop the server completely using the
command in the console. This ensures all data is saved to disk and files aren't locked. Then, copy the entirestop
folder (and any other dimension folders likeworld
,world_nether
for Java, or the folder specified inworld_the_end
for Bedrock). It's also highly recommended to back up your server configuration files (level-name
,server.properties
,bukkit.yml
,spigot.yml
,paper.yml
,permissions.json
, etc.) and yourwhitelist.json
orplugins
/behavior_packs
folders. Compress the copied files (e.g., into aresource_packs
or.zip
archive) with a timestamp in the filename (e.g.,.tar.gz
) for organization.MyServerBackup-2023-10-27-1500.zip
- Automation: Manually stopping and copying can be tedious. Consider using backup scripts (batch files on Windows, shell scripts on Linux) or specialized backup plugins (like EasyBackup, Backup Remapper for Java) that can automate the process, sometimes even without fully stopping the server (though stopping is always safest).
- Storage: Store your backups in multiple locations. Keep recent backups on the server machine (on a different physical drive if possible), but crucially, also copy backups regularly to an off-site location. This could be another computer, an external hard drive stored separately, or a cloud storage service (Google Drive, Dropbox, OneDrive, dedicated backup services like Backblaze). Off-site backups protect against physical disasters like fire, flood, or theft affecting the server machine. Regularly test your backups by trying to restore them to ensure they are viable.
- Keep Software Updated: Mojang (for vanilla), PaperMC, Spigot, Forge/Fabric, and plugin/mod developers frequently release updates. These updates often contain crucial bug fixes, performance improvements, security patches against newly discovered vulnerabilities, and compatibility with new Minecraft game versions.
- Process (Java JAR): Download the new
(or Paper/Spigot JAR) for the desired version. Always back up your server first! Stop the current server. Replace the old JAR file in your server directory with the new one (you might want to rename the old one, e.g.,server.jar
, just in case). Start the server using your start script. The server might perform update processes or indicate if configuration changes are needed.paper-1.19.4.jar.old
- Process (Bedrock): Download the new Bedrock server
file. Back up first! Stop the server. Extract the contents of the new zip file, potentially overwriting the existing executables and default configuration files (be careful not to overwrite your modified.zip
or world data unless intended!). Restart the server.server.properties
- Compatibility Checks: When updating the main server software (especially across major Minecraft versions like 1.19.x to 1.20.x), be aware that plugins (Java) or behavior packs (Bedrock) may become incompatible. Always check the download pages for your specific plugins/add-ons to see if they support the new server version. You will likely need to update your plugins/add-ons separately after updating the main server JAR/executable. Running incompatible plugins is a common cause of errors or server instability after an update. Read update changelogs carefully.
- Process (Java JAR): Download the new
- Optimize Performance: Especially for Java Edition servers with plugins or many players, proactive optimization is key to preventing lag.
- Use Paper/Spigot/Fabric: As mentioned, PaperMC offers significant performance gains over vanilla/Spigot due to its numerous patches and optimizations. Fabric servers with performance-enhancing mods like Lithium, Starlight, and FerriteCore can also provide excellent performance. Explore their specific configuration files (
,paper.yml
,spigot.yml
for Paper/Spigot) which contain many settings to fine-tune mob spawning, chunk loading, ticking, entity activation ranges, and more, beyond whatbukkit.yml
offers.server.properties
- Pre-generate Chunks: Players exploring new terrain forces the server to generate chunks in real-time, which is very CPU-intensive and a common cause of lag spikes. Use a plugin like Chunky (Java) or built-in commands (sometimes available) to pre-generate the world map within a defined radius (e.g., 5000-10000 blocks around spawn) before players start exploring extensively. This does the heavy lifting upfront when the server is less busy.
- Limit Entities: Excessive numbers of entities (mobs, item drops on the ground, item frames, armor stands, minecarts, etc.) in loaded chunks can severely impact server performance (TPS). Use plugins like ClearLagg (Java) to periodically remove ground items or limit mob spawns. Configure settings in
/bukkit.yml
/spigot.yml
to control mob spawn rates and caps per chunk. Encourage players to build efficient farms that don't leave thousands of items lying around or hundreds of mobs crammed into small spaces. Be mindful of large-scale villager trading halls.paper.yml
- Redstone Limitations: Very complex or rapidly firing redstone contraptions can cause significant server load. Some servers implement limits or use plugins to optimize or disable overly laggy redstone clocks.
- View Distance / Simulation Distance: As emphasized before, lowering
(andview-distance
if using Paper) in server configurations is one of the most impactful ways to reduce CPU load and improve TPS (Ticks Per Second). Find a balance between visibility and performance.simulation-distance
- Check Timings Reports (Java - Paper/Spigot): Use the
command (after running/timings paste
for a period of gameplay, then/timings on
) on Paper/Spigot servers. This generates a detailed web report showing exactly where the server is spending its processing time – highlighting laggy chunks, entities, or specific plugins that are causing performance issues. This is an invaluable tool for diagnosing lag./timings report
- Use Paper/Spigot/Fabric: As mentioned, PaperMC offers significant performance gains over vanilla/Spigot due to its numerous patches and optimizations. Fabric servers with performance-enhancing mods like Lithium, Starlight, and FerriteCore can also provide excellent performance. Explore their specific configuration files (
- Monitoring: Regularly check on your server's health and status.
- Console/Logs: Keep an eye on the live server console window for immediate errors or warnings. Periodically check the log files stored in the
folder (especiallylogs
). Error messages (often markedlatest.log
) can pinpoint problems with plugins, world corruption, or configuration issues. Stack traces can seem intimidating but often contain clues about the source of a problem.[Server thread/ERROR]
- Performance Metrics (Java): Use commands provided by Paper/Spigot:
: Shows the server's Ticks Per Second. Ideally, this should be consistently close to 20. Values below 18-19 indicate lag./tps
: Shows Milliseconds Per Tick. Lower values are better. If MSPT exceeds 50ms, the server cannot keep up (20 TPS * 50 ms/Tick = 1000ms = 1 second)./mspt
- Spark (
//spark profiler
): A powerful diagnostic plugin (Java) that provides detailed reports on CPU usage, memory allocation, TPS, MSPT, and can profile specific threads or events to pinpoint lag sources even more effectively than timings./spark healthreport
- Player Count & Resource Usage: Monitor how many players are online versus your configured
. Use your operating system's Task Manager (Windows) ormax-players
/htop
(Linux) to check the server process's actual CPU and RAM usage. If it's constantly hitting the allocated RAM limit (top
) or maxing out CPU cores, you need to optimize further, upgrade hardware, or reduce the player load/view distance.-Xmx
- Whitelist: For private servers intended only for friends or a specific community, enable the whitelist. Set
(Java) orenforce-whitelist=true
(Bedrock) inwhite-list=true
. Then, use theserver.properties
command in the server console (or as an op in-game) for every player who should be allowed access. Use/whitelist add <playername>
to apply changes. This prevents unauthorized random players who might find your IP address from joining. Manage the whitelist using commands or by directly editing the/whitelist reload
file (ensure correct JSON formatting). This is a fundamental security measure for non-public servers.whitelist.json
- Console/Logs: Keep an eye on the live server console window for immediate errors or warnings. Periodically check the log files stored in the
Adding Plugins/Mods (Customization)
This is where self-hosting truly shines, allowing you to drastically alter or enhance the vanilla Minecraft experience. The methods differ significantly between Java and Bedrock Editions.
-
Java Edition: Customization primarily comes through Plugins or Mods.
- Plugins (Bukkit/Spigot/Paper): These are server-side modifications written against the Bukkit API (or its derivatives Spigot and Paper). They add new features, commands, game mechanics, administrative tools, or alter existing ones. The key advantage is that players do not need to install anything on their own computers to join a plugin-based server; they just need the standard vanilla Minecraft client.
- Requirement: You must be running a server software that supports plugins, such as Paper, Spigot, or CraftBukkit (though Paper is highly recommended). The official vanilla
from Mojang cannot run plugins.server.jar
- Finding Plugins: Download plugin
files from reputable sources. The primary hubs are SpigotMC Resources and CurseForge (Bukkit Plugins). Hangar is PaperMC's official platform (hangar.papermc.io). Always download plugins directly from the original author's page or trusted repositories. Avoid downloading from random websites, as JAR files can contain malicious code. Check that the plugin version is compatible with your server version (e.g., a 1.19.4 plugin for a 1.19.4 server)..jar
- Installation: Simply place the downloaded plugin
file(s) into the.jar
folder that was automatically generated inside your server directory.plugins
- Loading: Restart your server completely. During startup, the server will detect and load the plugins in the
folder. Watch the console for any errors related to plugin loading. Some servers/plugins support aplugins
command, but this is often discouraged as it can cause memory leaks or break certain plugins; a full/reload
is usually safer for applying changes or adding/removing plugins./restart
- Configuration: After a plugin runs for the first time, it will typically generate its own folder inside the
directory (e.g.,plugins
,plugins/Essentials/
). Inside these folders, you'll find configuration files (oftenplugins/LuckPerms/
files like.yml
). Edit these text files to customize the plugin's settings, messages, and behavior according to your preferences. Reload the plugin's config (often via a command likeconfig.yml
) or restart the server for changes to take effect./pluginname reload
- Plugin Dependencies: Some plugins require other plugins (libraries or APIs) to function. For example, many economy or chat plugins might require Vault. Permissions plugins often need a database connector plugin if using MySQL. Read the plugin's description page carefully for any dependencies and install them as well.
- Examples of Popular Plugin Types:
- Essentials: EssentialsX (provides dozens of basic commands like
,/home
,/spawn
, kits, economy basics)./warp
- Permissions: LuckPerms (powerful and widely used system for controlling which players/groups can use which commands or features).
- Land Protection: WorldGuard (define regions to protect against griefing), GriefPrevention (claim-based protection), CoreProtect (logs block changes/interactions and allows rollbacks).
- Economy: EssentialsX Economy, The New Economy (TNE), or dedicated economy plugins often used with shop plugins (like ChestShop).
- Admin Tools: Vanish plugins, inventory inspection tools, world editing (WorldEdit).
- Minigames: Plugins to run Spleef, BedWars, SkyWars, etc.
- Anti-Cheat: Various plugins attempt to detect and prevent cheating/hacking (though effectiveness varies).
- Essentials: EssentialsX (provides dozens of basic commands like
- Requirement: You must be running a server software that supports plugins, such as Paper, Spigot, or CraftBukkit (though Paper is highly recommended). The official vanilla
- Mods (Forge/Fabric): Mods typically offer much deeper, game-altering changes compared to plugins. They can add entirely new dimensions, complex machinery, magic systems, new mobs, blocks, items, and significantly change core game mechanics.
- Requirement: Running a modded server requires using a specific Mod Loader's server software, typically Forge or Fabric. You install the Forge/Fabric server installer first, run it to generate the modded server files and libraries, and then place mods into the
folder.mods
- Client Requirement: Crucially, every player connecting to a Forge or Fabric server must also have the exact same Mod Loader (Forge or Fabric) and the exact same set of mods (including versions) installed on their own Minecraft client. This makes modded servers less accessible for casual public play compared to plugin servers, as players need to set up their clients correctly.
- Finding Mods: Download mods from reputable sources like CurseForge or Modrinth. Ensure compatibility between mods, the mod loader version, and the Minecraft version. Mod compatibility can be complex.
- Setup: The setup involves downloading the Forge/Fabric installer, running it with an
argument pointing to your server directory, and then placing mod JARs into the generated-installServer
folder before starting the server with its specific launch script. This process is more involved than setting up a Paper/Spigot server.mods
- Requirement: Running a modded server requires using a specific Mod Loader's server software, typically Forge or Fabric. You install the Forge/Fabric server installer first, run it to generate the modded server files and libraries, and then place mods into the
- Plugins (Bukkit/Spigot/Paper): These are server-side modifications written against the Bukkit API (or its derivatives Spigot and Paper). They add new features, commands, game mechanics, administrative tools, or alter existing ones. The key advantage is that players do not need to install anything on their own computers to join a plugin-based server; they just need the standard vanilla Minecraft client.
-
Bedrock Edition: Customization uses a system called Add-Ons.
- Behavior Packs & Resource Packs: Add-Ons are typically composed of two parts:
- Behavior Packs: Modify entity behaviors (AI, health, damage), add new entities/items/blocks, change loot tables, add functions/scripting (using JavaScript APIs in newer versions). They control how things work.
- Resource Packs: Change textures, models, sounds, UI elements, and other visual/audio aspects of the game. They control how things look and sound.
- These are often distributed together in
(single pack) or.mcpack
(multiple packs bundled) files..mcaddon
- Finding Add-Ons: You can obtain Add-Ons from the official Minecraft Marketplace within the game client (often paid content, sometimes applied per-world) or download them from third-party websites like mcpedl.com. Be cautious when downloading from unofficial sources.
- Server Installation:
- Download the Add-On file(s) (often
). You might need to rename.mcpack
to.mcpack
and extract the contents if it's a behavior or resource pack folder directly..zip
- Place the extracted behavior pack folder(s) into the
directory within your Bedrock server folder.behavior_packs
- Place the extracted resource pack folder(s) into the
directory.resource_packs
- Activation: Add-Ons must be explicitly activated for a specific world. Stop your server. Go into the
folder (e.g.,worlds/<your_level_name>
). You need to edit two files (create them if they don't exist):worlds/Bedrock level/
: Edit this JSON file to list the behavior packs you want active. You'll need the pack's UUID and version from itsworld_behavior_packs.json
file (located inside the behavior pack folder). The format looks something like:manifest.json
[ { "pack_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "version": [ 1, 0, 0 ] } ]
: Similarly, edit this file to list the resource packs to activate, using their UUID and version from theirworld_resource_packs.json
.manifest.json
- Start the server again. The activated Add-Ons should now be functional in that specific world. Players joining will automatically download the required resource packs (if
is set or the pack mandates it). Managing Add-Ons often involves careful editing of these JSON files.texturepack-required
- Download the Add-On file(s) (often
- Behavior Packs & Resource Packs: Add-Ons are typically composed of two parts:
Now you're equipped with the knowledge to set up, configure, maintain, and customize your own Minecraft server. Invite your friends, build amazing creations, foster a community, and enjoy the unparalleled freedom and control that comes with hosting your own unique corner of the Minecraft universe! Running a server can be a deeply rewarding technical and social experience.