Get 30% discount on Hosting Packages + Free Domain & SSL!
Learn More

How to Set Up a Minecraft Server? Step by Step Setup Guide

How to Set Up a Minecraft Server?

How to Set Up a Minecraft Server?

Introduction

Running your own Minecraft server allows you to play with friends or build a community. This comprehensive guide will walk you through setting up a Minecraft server on both Windows and Linux systems.

System Requirements

Hardware:

  • Minimum: 2GB RAM, 2 CPU cores, 10GB storage

  • Recommended: 4GB+ RAM, 4 CPU cores, SSD storage

  • Internet: 10 Mbps+ upload speed (~100KB/s per player)

Software:

  • Java JDK 17+ (latest version)

  • OS: Windows 10/11 or Linux (Ubuntu recommended)

Step-by-Step Setup

1. Install Java

  1. Download Oracle JDK or OpenJDK

  2. Run the installer with default settings

  3. Verify installation by running java -version in command prompt/terminal

2. Prepare Server Files

  1. Create a new folder (e.g., mcserver)

  2. Download server.jar from Minecraft's official site

  3. Place the .jar file in your created folder

3. First Server Launch

  1. Open command line (cmd on Windows, terminal on Linux)

  2. Navigate to your server folder:

    bash
     
    cd /path/to/mcserver
  3. Start the server:

    bash
     
    java -Xmx4G -Xms4G -jar server.jar nogui

    (For 4GB RAM - use -Xmx8G -Xms8G for 8GB)

4. Accept the EULA

  1. After first run, locate eula.txt

  2. Open with a text editor

  3. Change eula=false to eula=true and save

5. Configure Server

  1. Edit server.properties:

    • server-port=25565 (Default port)

    • max-players=20 (Player limit)

    • online-mode=true (Requires official Minecraft accounts)

    • view-distance=10 (Recommended 6-10 for performance)

6. Restart the Server

bash
 
java -Xmx4G -Xms4G -jar server.jar nogui

VPS Setup (Linux - Ubuntu)

1. Install Dependencies

bash
 
sudo apt update && sudo apt upgrade -y
sudo apt install openjdk-17-jdk screen -y

2. Create Server Directory

bash
 
mkdir mcserver && cd mcserver
wget https://launcher.mojang.com/v1/objects/.../server.jar

3. Run Server in Screen Session

bash
 
screen -S minecraft
java -Xmx4G -Xms4G -jar server.jar nogui

(Use Ctrl+A+D to detach)

Security & Optimization

Security Measures:

  1. Set enable-command-block=false in server.properties

  2. Only add trusted admins to ops.json

  3. Maintain regular backups

Performance Tips:

  1. Use optimized server software like PaperMC or Purpur

  2. Tweak entity and chunk settings in spigot.yml

  3. Clean world files monthly

Troubleshooting Common Issues

1. "Can't bind to port" error

  • Another application may be using port 25565

  • Check with netstat -tulnp | grep 25565

  • Change port in server.properties

2. Memory errors

  • Reduce -Xmx value or upgrade your VPS RAM

3. Connection issues

  • Check firewall settings:

    bash
     
    sudo ufw allow 25565/tcp
  • Configure port forwarding on your router

Final Thoughts

Setting up a Minecraft server might seem complex at first, but by following these steps you'll have your own server running in no time. Remember to monitor performance regularly and listen to player feedback.

Leave your questions in the comments or check out our more advanced guides. Happy crafting!

0850 308 15 09 908503081509