Introduction

Back when I first started playing Minecraft, I only played in single-player worlds. Later, I learned to play with classmates in multiplayer mode, but every time we had to be on the same local network.

Later, I came across an app called “Minecraft Multiplayer Box,” which allowed me to join a server for the first time.

After that, I had an idea: to set up my own server to play on.

Note: This tutorial is only applicable to Mojang's official version of Minecraft. NetEase version cannot join this server.

Official Server

The purest and fastest-updated server, offering an authentic gaming experience without mods or plugins.

Server Configuration Guide

Windows

  1. Ensure Java Runtime Environment (JRE) is installed on your computer or server. Follow the specific tutorial below:

It is highly recommended to install Java 17 or later for the latest server version. If your Java version is too low, it may fail to start properly.

  1. Search for minecraft on Baidu and visit the Official Website | Minecraft. Do not enter the Chinese version of the website.

image-20221104180510952

  1. Scroll down to the bottom of the page and find Support — Download.

image-20221104180726354

  1. Scroll down to find Experience Different Versions of MINECRAFT — Server Software — Java Edition Server.

image-20221104181027147

  1. On this page, the official provides the download link and usage instructions. Click the blue text to download. The official command is just a reference, so you need to modify it flexibly.
1
java -Xmx1024M -Xms1024M -jar minecraft_server.1.19.2.jar nogui

image-20221104181415803

  1. After downloading, you will get a .jar file. It is highly recommended to place this file in an empty folder, as the server program will release configuration files, making it easier to find them.

image-20221104181654172

  1. Open the command prompt by typing cmd in the directory and pressing Enter.

image-20221104181747494

image-20221104181843945

  1. The official command name is fixed. You need to modify it to match the corresponding file name in the command. Here, my file is named server.jar.

image-20221104182309743

  1. Key Point: The server will exit here, but this is not due to an issue with your operation. You need to agree to a license agreement first.

image-20221104183142907

Return to the folder, and you will find that the server program has created many new files. Find eula.txt, double-click to open it, and change false to true.

image-20221104183319148

We run the server software again, and this is considered successful.

image-20221104183639910

Linux

  1. Ensure Java is installed on the Linux server. Some Linux systems may come with Java pre-installed. If you want to use the latest server version, it is highly recommended to install Java 17 or later, as a lower Java version may fail to start properly.

  2. Download the server package file. You can download it on Windows first and then upload it to the Linux server, or use the wget command to download. It is highly recommended to place this file in an empty folder, as the server program will release configuration files, making it easier to find them.

    image-20221106190440103

  3. Run the server using the command. The official command name is fixed, so you need to modify it to match the corresponding file name in the command. Here, my file is named server.jar.

    image-20221106190646488

  4. Modify the eula.txt file. If the server does not have a graphical interface, it is recommended to use vim to edit. Enter the following command to edit:

    1
    vim eula.txt

    image-20221106191014313

    After entering, it will not be possible to input text by default. Press i on the keyboard to activate input.

    Change false to true.

    image-20221106190802643

    Press ESC to exit the editing mode, then press :wq to save and exit.

    image-20221106190848245

    Installing vim

    If vim is not installed on the server, use the following commands to install it.

    Ubuntu

    1
    apt-get install vim

    CentOS

    1
    yum install vim
  5. Run the server again.

  6. If you are using an SSH connection to the Linux server, the SSH connection window cannot be closed. Once closed, the session ends, and the Minecraft server will also shut down.

    1. First, enter stop to stop the server.

    2. Installing screen

      Ubuntu

      1
      apt-get install screen

      CentOS

      1
      yum install screen
    3. After installation, enter clear to clear the screen. This step is very important and must be executed.

    4. Enter screen -R MC (Note: MC can be replaced with any word, pay attention to the case of R). After entering, it may take a while to display blank, and then it will automatically return to the original interface.

    5. Start the server by entering the start command. After starting the server, you can close SSH.

    6. Next time, enter screen -R MC to restore.

Connecting to the Server

  1. Open the game and go to Multiplayer.

    image-20221104202631755

  2. Both Direct Connection and Add Server can be used. Here, we will demonstrate adding a server. Since I am running the server locally, I enter the local address here. For cloud servers, please enter the server’s IP. If you modified the port, just add an English colon and then enter the port number.

    image-20221104202832401

  3. Click Join on the created server.

    image-20221104203236536

About Configuration Files

Find the server.properties file in the directory and open it with Notepad. For specific configuration methods, you can refer to online resources.

image-20221104203826277

image-20221104203946836