Last Updated: March 12, 2025

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
      192.168.1.5
      ) and an External/Public IP (used to identify your network on the internet, assigned by your ISP).
    • Port: Like a specific door number on your IP address. Minecraft Java typically uses port
      25565
      (TCP), and Bedrock uses
      19132
      (UDP). Different applications use different ports to avoid conflicts.
    • 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.

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.

  1. Download Server Software

    • Go to the official Minecraft website: minecraft.net/download/server
    • Download the latest
      server.jar
      file. This is the core software provided by Mojang, offering the vanilla Minecraft experience.
    • 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.,
        paper-1.xx.x-xxx.jar
        ) instead of the official
        server.jar
        if you choose this route. The setup process detailed below remains largely the same, just replace
        server.jar
        with the name of the JAR file you downloaded.
  2. 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
      Program Files
      . A dedicated folder like
      C:\Servers\Minecraft\MySurvivalServer
      or
      ~/minecraft/servers/survival
      is good practice, especially if you plan to run multiple servers eventually.
    • Move the downloaded
      server.jar
      (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.
  3. 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
        start.bat
        . Right-click inside the folder, select New -> Text Document. Rename it to
        start.bat
        (ensure file extensions like
        .txt
        are visible in Windows File Explorer so you can remove it properly). Right-click the
        start.bat
        file and select Edit. Paste the following line (adjust RAM and JAR filename):
        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
        
        Explanation:
        • java
          : Calls the Java executable. Ensure Java's
          bin
          directory is in your system's PATH environment variable, or provide the full path like
          "C:\Program Files\Java\jdk-17.0.2\bin\java.exe"
          .
        • -Xmx4G
          : Sets the maximum RAM to 4 Gigabytes. Adjust
          4G
          (e.g.,
          8G
          ,
          16G
          ) based on your available RAM and needs. Don't allocate all your system RAM; leave enough for the OS (at least 2-4GB).
        • -Xms4G
          : 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.
        • -jar paper-1.19.4.jar
          : Tells Java to run the specified JAR file. Rename this to match the exact filename of your server JAR.
        • nogui
          : 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.
        • pause
          : (Windows only) Keeps the command window open after the server stops (e.g., due to an error or typing
          stop
          ), allowing you to read any final messages or error codes. Remove this if running automatically.
        • (Advanced) Aikars Flags: The long string of
          -XX:
          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
          -Xmx
          and
          -Xms
          are set appropriately.
      • Linux/Mac: Create a text file named
        start.sh
        . Open a terminal, navigate to your server directory (
        cd ~/minecraft/servers/survival
        ), and use a text editor like
        nano
        :
        nano start.sh
        . Paste a similar line, adjusting RAM and JAR file name (the Aikar flags work here too):
        #!/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
        
        Save the file (Ctrl+O in nano, then Enter; Ctrl+X to exit). Make the script executable in the terminal:
        chmod +x start.sh
        .
    • Run the script:
      • Windows: Double-click the
        start.bat
        file. A command prompt window should appear.
      • Linux/Mac: Open a terminal, navigate to the server directory, and run
        ./start.sh
        .
    • First Run Failure (Expected): The server will attempt to start, print some messages, generate a few essential files (
      logs
      folder,
      server.properties
      ,
      eula.txt
      ), 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 or
      logs/latest.log
      for any other errors if it fails differently (e.g., incorrect Java version, port already in use).
  4. 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
      eula=false
      and a link to the Minecraft End User License Agreement. Read the terms online. If you agree to them, change the line to
      eula=true
      .
    • Save and close the
      eula.txt
      file. The server will not start unless this value is set to
      true
      .
  5. Configure Server

    • Run your start script (
      start.bat
      or
      start.sh
      ) 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 named
      world
      ), potentially download libraries (if using Paper/Spigot), and display many log messages in the console window. Wait until you see a message similar to
      [Server thread/INFO]: Done (XX.XXXs)! For help, type "help"
      or
      Timings Reset
      . This indicates the server is running and ready for connections.
    • You can stop the server gracefully at any time by typing
      stop
      into the console window and pressing Enter. Avoid just closing the console window, as this can cause improper saving or world corruption.
    • Now, locate and open the
      server.properties
      file using a text editor. This file is the heart of your server's configuration.
    • Important settings to review and customize (hovering over options in some editors might show descriptions, or consult the Minecraft Wiki for a full list):
      • server-port=25565
        : The TCP port the server listens on. Default is
        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.,
        your.ip.address:25566
        ).
      • gamemode=survival
        : Default game mode for players joining for the first time (
        survival
        ,
        creative
        ,
        adventure
        ,
        spectator
        ).
      • difficulty=easy
        : Game difficulty (
        peaceful
        ,
        easy
        ,
        normal
        ,
        hard
        ). This affects mob spawning, damage, and other mechanics.
        normal
        is a common default.
      • pvp=true
        : Enable (
        true
        ) or disable (
        false
        ) player-versus-player combat globally. Plugins can often manage PvP in specific areas.
      • max-players=20
        : 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.
      • view-distance=10
        : 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 separate
        simulation-distance
        (where entities are active) and
        view-distance
        for finer control.
      • motd=A Minecraft Server
        : 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 with
        \u00A7
        ) for colors and styles (e.g.,
        \u00A7eWelcome to \u00A7bMy Awesome Server! \u00A7cJoin Now!
        ). There are online MOTD generators that can help with formatting.
      • level-seed=
        : 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 the
        /seed
        command in-game (if you have permission).
      • online-mode=true
        : Set to
        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 to
        false
        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.
      • spawn-protection=16
        : 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 to
        0
        to disable spawn protection entirely, allowing anyone to build/break at spawn immediately.
      • enable-command-block=false
        : Set to
        true
        to allow the placement and execution of command blocks (requires operator status and Creative mode to obtain/place). Keep
        false
        unless you specifically need them, as they can be misused if not managed carefully.
      • allow-nether=true
        : Set to
        true
        (default) to allow players to build and use Nether portals to travel to the Nether dimension. Set to
        false
        to disable the Nether entirely.
      • resource-pack=
        : Provide a direct HTTP(S) download link (e.g., hosted on Dropbox or a web server) to a server-wide resource pack (
        .zip
        file). Players will be prompted to download and enable it upon joining.
      • resource-pack-sha1=
        : (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 (
        sha1sum
        on Linux,
        Get-FileHash -Algorithm SHA1
        on PowerShell) to get the hash.
    • Save the
      server.properties
      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.
  6. 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 (
        cmd
        ), type
        ipconfig
        , 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 like
        192.168.x.x
        ,
        10.x.x.x
        , or
        172.16.x.x
        . Note this address down.
      • 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
        ip addr show
        or
        ifconfig
        . Look for the
        inet
        address under your primary network interface name (e.g.,
        eth0
        ,
        enpXsY
        ,
        wlan0
        ).
    • 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
        192.168.0.1
        or
        192.168.1.1
        . You can also find this listed as "Default Gateway" in the
        ipconfig
        output (Windows) or network settings (Mac/Linux).
      • 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
        /
        admin
        , etc. - which you should absolutely change for security!). Consult your router's manual or ISP documentation if unsure.
      • 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
          25565
          (or your custom port if you changed it in
          server.properties
          ). Some routers ask for a start and end port; just enter 25565 in both.
        • Internal Port / Local Port / Private Port: Enter
          25565
          (or your custom port). This should match the external port.
        • Protocol: Select
          TCP
          . Minecraft Java Edition primarily uses the TCP protocol. If
          TCP/UDP
          or
          Both
          is the only option, that's fine too, but TCP is the essential one.
        • 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
          ipconfig
          or equivalent). Make sure this is correct!
        • 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.
    • Static Local IP (Highly Recommended): By default, routers often assign local IP addresses dynamically (using DHCP), meaning your server computer's local IP (
      192.168.1.x
      ) 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:
      • 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
        ipconfig /all
        or network settings). This tells the router to always give that computer the same local IP address.
      • 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.,
        192.168.1.150
        ) 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.
    • Firewall Configuration: Your server computer's operating system firewall (Windows Defender Firewall, macOS Firewall, Linux
      ufw
      or
      firewalld
      ) must also allow incoming connections on the server port.
      • 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
        C:\Program Files\Java\jdk-17...\bin\java.exe
        or
        javaw.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).
      • 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
        sudo ufw allow 25565/tcp
        . Check your specific distribution's firewall management tools.
      • 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.
  7. 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.,
      192.168.1.10
      ) that you used for port forwarding. From the same computer that the server is running on, you can often connect using the address
      localhost
      or
      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
        whatismyipaddress.com
        or
        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
        server.properties
        and port forwarded the custom port, provide the address like this:
        YourExternalIP:Port
        (e.g.,
        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.
    • 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.,
        mycoolserver.ddns.net
        ) 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.

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.

  1. 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
      .zip
      file containing an
      .exe
      ) and Linux (usually Ubuntu - a
      .zip
      file containing a binary executable). Make sure you download the Bedrock Dedicated Server (BDS), not the Java server JAR.
  2. Extract Files

    • Similar to Java, create a dedicated folder for your Bedrock server files (e.g.,
      C:\Servers\Bedrock\MyBedrockWorld
      or
      ~/minecraft/servers/bedrock
      ).
    • Extract the entire contents of the downloaded
      .zip
      file directly into this folder. You should see files like
      bedrock_server.exe
      (on Windows) or
      bedrock_server
      (on Linux), along with important configuration files like
      server.properties
      ,
      permissions.json
      ,
      whitelist.json
      , and default folders for
      worlds
      ,
      behavior_packs
      , and
      resource_packs
      .
  3. Configure Server

    • Open the
      server.properties
      file in your Bedrock server directory using a text editor. Note that the available settings and their names/values differ significantly from the Java Edition
      server.properties
      file.
    • Key settings you'll likely want to configure include:
      • server-name=Dedicated Server
        : Sets the name displayed for your server in the server list within the Bedrock client (Friends/Servers tab). Choose something descriptive.
      • gamemode=survival
        : Sets the default game mode (
        survival
        ,
        creative
        ,
        adventure
        ).
      • difficulty=easy
        : Sets the game difficulty (
        peaceful
        ,
        easy
        ,
        normal
        ,
        hard
        ).
      • max-players=10
        : 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.
      • level-name=Bedrock level
        : Specifies the name of the folder inside the
        worlds
        directory that contains your world data. If this folder doesn't exist, a new world with this name will be generated on first start.
      • level-seed=
        : Enter a specific world seed before the first world generation if desired. Leave blank for a random seed.
      • online-mode=true
        : Requires players connecting to be signed into a valid Xbox Live account (
        true
        ). This is the standard and recommended setting for security and player identification. Setting to
        false
        is generally not recommended or useful for most scenarios.
      • allow-cheats=false
        : Enable (
        true
        ) or disable (
        false
        ) the use of cheat commands (like
        /gamemode
        ,
        /give
        ,
        /teleport
        ) for players who have operator permissions.
      • server-port=19132
        : The UDP port used for IPv4 connections. This is the standard default for Bedrock.
      • server-portv6=19133
        : The UDP port used for IPv6 connections. Default is 19133.
      • view-distance=32
        : 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.
      • tick-distance=4
        : 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.
    • Review other settings like
      player-idle-timeout
      ,
      compression-threshold
      , etc., based on your needs. Consult the Bedrock Dedicated Server documentation for details on all options.
    • Save your changes to
      server.properties
      .
  4. Start the Server

    • Windows: Simply double-click the
      bedrock_server.exe
      file located in your server directory. A console window will appear, displaying log messages as the server starts up and generates/loads the world.
    • Linux: Open a terminal, navigate to your Bedrock server directory (
      cd ~/minecraft/servers/bedrock
      ), and execute the server binary by typing
      ./bedrock_server
      .
    • The server will initialize, load the world specified in
      level-name
      , and eventually indicate it's ready for connections. You can manage the server directly through this console window. Type
      help
      to see available server commands (which differ from Java Edition commands). Use the
      stop
      command to safely shut down the server before closing the window.
  5. 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:
        19132
        (the default IPv4 port from
        server.properties
        ).
      • Internal Port / Local Port:
        19132
        .
      • Protocol: Select
        UDP
        . This is critical. If you forward TCP instead of UDP, connections will fail. If your router only has a
        TCP/UDP
        or
        Both
        option, select that.
      • 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
      19133
      to the same server IP address. However, most home connections and initial setups will primarily use IPv4.
    • 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
      bedrock_server.exe
      application.
  6. 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:
        19132
        (or your custom port).
    • 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:
        19132
        (or your custom port).
      • 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.

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
      stop
      command in the console. This ensures all data is saved to disk and files aren't locked. Then, copy the entire
      world
      folder (and any other dimension folders like
      world_nether
      ,
      world_the_end
      for Java, or the folder specified in
      level-name
      for Bedrock). It's also highly recommended to back up your server configuration files (
      server.properties
      ,
      bukkit.yml
      ,
      spigot.yml
      ,
      paper.yml
      ,
      permissions.json
      ,
      whitelist.json
      , etc.) and your
      plugins
      or
      behavior_packs
      /
      resource_packs
      folders. Compress the copied files (e.g., into a
      .zip
      or
      .tar.gz
      archive) with a timestamp in the filename (e.g.,
      MyServerBackup-2023-10-27-1500.zip
      ) for organization.
    • 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
      server.jar
      (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.,
      paper-1.19.4.jar.old
      , just in case). Start the server using your start script. The server might perform update processes or indicate if configuration changes are needed.
    • Process (Bedrock): Download the new Bedrock server
      .zip
      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
      server.properties
      or world data unless intended!). Restart the server.
    • 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.
  • 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
      ,
      bukkit.yml
      for Paper/Spigot) which contain many settings to fine-tune mob spawning, chunk loading, ticking, entity activation ranges, and more, beyond what
      server.properties
      offers.
    • 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
      /
      paper.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.
    • 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
      view-distance
      (and
      simulation-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.
    • Check Timings Reports (Java - Paper/Spigot): Use the
      /timings paste
      command (after running
      /timings on
      for a period of gameplay, then
      /timings report
      ) 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.
  • 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
      logs
      folder (especially
      latest.log
      ). Error messages (often marked
      [Server thread/ERROR]
      ) 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.
    • Performance Metrics (Java): Use commands provided by Paper/Spigot:
      • /tps
        : Shows the server's Ticks Per Second. Ideally, this should be consistently close to 20. Values below 18-19 indicate lag.
      • /mspt
        : 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).
      • Spark (
        /spark profiler
        /
        /spark healthreport
        ): 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.
    • Player Count & Resource Usage: Monitor how many players are online versus your configured
      max-players
      . Use your operating system's Task Manager (Windows) or
      htop
      /
      top
      (Linux) to check the server process's actual CPU and RAM usage. If it's constantly hitting the allocated RAM limit (
      -Xmx
      ) or maxing out CPU cores, you need to optimize further, upgrade hardware, or reduce the player load/view distance.
    • Whitelist: For private servers intended only for friends or a specific community, enable the whitelist. Set
      enforce-whitelist=true
      (Java) or
      white-list=true
      (Bedrock) in
      server.properties
      . Then, use the
      /whitelist add <playername>
      command in the server console (or as an op in-game) for every player who should be allowed access. Use
      /whitelist reload
      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.json
      file (ensure correct JSON formatting). This is a fundamental security measure for non-public servers.

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
        server.jar
        from Mojang cannot run plugins.
      • Finding Plugins: Download plugin
        .jar
        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).
      • Installation: Simply place the downloaded plugin
        .jar
        file(s) into the
        plugins
        folder that was automatically generated inside your server directory.
      • Loading: Restart your server completely. During startup, the server will detect and load the plugins in the
        plugins
        folder. Watch the console for any errors related to plugin loading. Some servers/plugins support a
        /reload
        command, but this is often discouraged as it can cause memory leaks or break certain plugins; a full
        /restart
        is usually safer for applying changes or adding/removing plugins.
      • Configuration: After a plugin runs for the first time, it will typically generate its own folder inside the
        plugins
        directory (e.g.,
        plugins/Essentials/
        ,
        plugins/LuckPerms/
        ). Inside these folders, you'll find configuration files (often
        .yml
        files like
        config.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 like
        /pluginname reload
        ) or restart the server for changes to take effect.
      • 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
          ,
          /warp
          , kits, economy basics).
        • 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).
    • 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
        mods
        folder.
      • 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
        -installServer
        argument pointing to your server directory, and then placing mod JARs into the generated
        mods
        folder before starting the server with its specific launch script. This process is more involved than setting up a Paper/Spigot server.
  • 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
        .mcpack
        (single pack) or
        .mcaddon
        (multiple packs bundled) files.
    • 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:
      1. Download the Add-On file(s) (often
        .mcpack
        ). You might need to rename
        .mcpack
        to
        .zip
        and extract the contents if it's a behavior or resource pack folder directly.
      2. Place the extracted behavior pack folder(s) into the
        behavior_packs
        directory within your Bedrock server folder.
      3. Place the extracted resource pack folder(s) into the
        resource_packs
        directory.
      4. Activation: Add-Ons must be explicitly activated for a specific world. Stop your server. Go into the
        worlds/<your_level_name>
        folder (e.g.,
        worlds/Bedrock level/
        ). You need to edit two files (create them if they don't exist):
        • world_behavior_packs.json
          : Edit this JSON file to list the behavior packs you want active. You'll need the pack's UUID and version from its
          manifest.json
          file (located inside the behavior pack folder). The format looks something like:
          [
            {
              "pack_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
              "version": [ 1, 0, 0 ]
            }
          ]
          
        • world_resource_packs.json
          : Similarly, edit this file to list the resource packs to activate, using their UUID and version from their
          manifest.json
          .
      5. 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
        texturepack-required
        is set or the pack mandates it). Managing Add-Ons often involves careful editing of these JSON files.

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.

Last Updated
MinecraftFAQ

Have More Questions?

View All FAQs