Back to Setup Guides
    Windows

    Minecraft Server Setup on Windows

    Complete guide to installing and running a Minecraft Java Edition dedicated server on Windows.

    1Install Java

    Minecraft requires Java 21 or newer. Download and install the latest Java JDK.

    1. Download Java from Adoptium (Eclipse Temurin)
    2. Run the installer and follow the prompts
    3. Verify installation by opening Command Prompt and running:
    java -version

    You should see Java version 21 or higher.

    2Download the Minecraft Server

    Download the official Minecraft server JAR file from Mojang.

    1. Create a folder for your server, e.g., C:\MinecraftServer
    2. Download the latest server.jar from the official Minecraft website
    3. Save the file to your server folder

    Latest Version

    Always download the latest version from the official Minecraft website for security and compatibility.

    3Accept the EULA and First Run

    Run the server once to generate configuration files, then accept the EULA.

    cd C:\MinecraftServer
    java -Xmx2G -Xms1G -jar server.jar nogui

    The server will stop and create an eula.txt file. Edit it:

    eula.txt
    eula=true

    4Configure the Server

    Edit the server.properties file to customize your server settings.

    server.properties (example)
    server-port=25565
    max-players=20
    motd=My Minecraft Server
    difficulty=normal
    gamemode=survival
    online-mode=true
    white-list=false

    Use our Config Builder to generate a customized configuration file.

    5Configure Windows Firewall

    Open the required ports in Windows Firewall to allow connections to your server.

    # Run these commands in PowerShell as Administrator
    
    # Allow Game Port (TCP 25565)
    New-NetFirewallRule -DisplayName "Minecraft Server" -Direction Inbound -Protocol TCP -LocalPort 25565 -Action Allow

    Port Forwarding Required

    If hosting from home, you'll also need to forward port 25565 on your router. Access your router's admin panel and add a port forwarding rule for TCP 25565.

    6Start the Server

    Navigate to your server folder and run the server with optimized memory settings.

    cd C:\MinecraftServer
    java -Xmx4G -Xms2G -jar server.jar nogui

    Memory Settings

    Adjust -Xmx (max memory) and -Xms (initial memory) based on your system. Use 2-4GB for small servers, 4-8GB for larger ones.

    7(Optional) Create a Start Script

    Create a batch file to easily start your server with proper settings.

    start.bat
    @echo off
    title Minecraft Server
    cd /d "%~dp0"
    
    :start
    echo Starting Minecraft Server...
    java -Xmx4G -Xms2G -jar server.jar nogui
    
    echo Server stopped. Restarting in 5 seconds...
    timeout /t 5
    goto start

    Connecting to Your Server

    Once your server is running, players can connect using:

    • Direct Connect: Use your public IP address (e.g., 123.45.67.89)
    • Local Network: Use localhost or your local IP
    • Find your IP: Visit whatismyip.com to find your public IP