banner
「The Nanami」

「The Nanami」

游戏宅的自我介绍
github
bilibili
steam

Setting up your Minecraft server on Linux

Preface · Linux Server is not that difficult#

Windows Server, as the most mature GUI server system, is loved by many Minecraft server owners. However, it has a high system occupancy rate and complex functions, and is not very suitable for long-term use as a server system. Linux system has a low occupancy rate and does not require server restart for upgrades and maintenance, which is very convenient. New server owners may be discouraged by the Linux CLI, and this guide aims to help you use Linux Server to build a Minecraft server.

Preparations#

System Selection

If there are no special environmental requirements, mainstream distributions can meet the requirements. This guide uses Ubuntu Server 22.04 LTS as the system version.

Software Preparation

SSH connection tool for communicating with the server, FTP tool (optional).

Text Formatting

~$ will be added before Bash commands to indicate that this line is a Bash command. If not added, it is command line output. Adding # indicates that this line is a comment for the previous line.

Installation Environment#

Install Java1#

Verify Java installation

Install LNMP Environment (optional)#

Because my server requires plugins that use MySQL, and I'm too lazy to manually configure phpMyAdmin, I use the LNMP environment to solve it all at once. If you have similar requirements, you can also install MySQL and configure it manually. This article does not go into detail.

Configure the Server#

Create a new directory in the home directory2 to serve as the server's root directory.

You can choose to configure it on your personal PC and then upload it to the server to run, or you can choose to configure it on the server. This article does not go into detail.

Run the Server#

Create a new file in the server's root directory and rename it3 as start.sh to serve as the startup script.

Here, we use the JVM parameters provided by Aikar.co.

Press Ctrl + O and Enter to save, and press Ctrl + X to exit nano4.

Run the script

At this point, the Minecraft server is successfully running. After disconnecting the SSH connection, enter

to return to the server terminal5.

Article References and Footnotes#

fabric

Aikar: Adjusting JVM - Very Effective Server Startup Parameters6

Footnotes#

  1. Choose the correct Java version based on the Minecraft version.

  2. The directory you return to with the cd command, you can also choose other directories based on the actual situation.

  3. Pay attention to modifying the file extension as well.

  4. If your personal computer system is macOS, please use the key mapping of the SSH tool instead of Ctrl.

  5. The command does not include ~$.

  6. This link is a reposted link. The original page is in English and is not easy to read. The reposting and translation are not done by me and have nothing to do with me.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.