How to Set Up a Minecraft Bedrock Server with Hostman

How to Set Up a Minecraft Bedrock Server with Hostman
Mohammad Waqas Shahid
Technical writer
Minecraft
26.04.2024
Reading time: 8 min

In this tutorial, we will describe how to set up a Minecraft Bedrock server on a Hostman cloud server.

Choosing a Hostman Server for Hosting

When it comes to deploying a Minecraft Bedrock server, Hostman emerges as an outstanding choice for a plethora of reasons.

  • User-Friendly Interface: Hostman offers an intuitive and user-friendly dashboard, simplifying the setup process without requiring extensive technical knowledge.
  • Streamlined Deployment: With pre-configured server templates and automated setup procedures, Hostman enables users to launch their Minecraft Bedrock server swiftly and effortlessly.
  • High Performance: Hostman's infrastructure boasts optimized hardware and network resources, ensuring low-latency and lag-free gameplay experiences even during peak usage periods.
  • Scalability: Whether it's a small private server or a large public one, Hostman's flexible hosting plans can easily scale to meet varying requirements.
  • Security Measures: Hostman prioritizes data security with encrypted connections, regular updates, and proactive monitoring to safeguard servers against cyber threats.
  • 24/7 Support: Users have access to dedicated technical support round-the-clock via live chat for prompt assistance whenever needed.
  • Cost-Effective Solutions: With transparent pricing plans and no hidden fees, Hostman offers excellent value for money, accommodating different budgets and preferences.

Creating an Account on Hostman

To kick off the process, visit the official Hostman website. Sign up for a new account by providing essential details and create a strong password. Following this, check your email for a verification link, click on it, and swiftly log in to your Hostman account.

Setting Up a Server

First, you need to create your own cloud server where Minecraft will be hosted.

Upon opening the Hostman control panel, click on Cloud servers and then click on Create

Choose Ubuntu as the operating system, ensuring to select the latest LTS (Long Term Support) version for enhanced stability.

Choose the package according to the server needs. Criteria for setting up server is share in table below.

Criteria for setting up the server

 

Game panel 1

Game panel 2 

Game panel 4

RAM 

4GB 

8 GB

16 GB

vCPU

1

2

4

Player Slots

Up to 25

Up to 90

150+

World Size

Up to 15 GB 

Up to 60 GB 

150+ GB

Mods 

40

50+ 

50+

Once selections are finaled, click on Order for [amount in $/mo]. (Note: the amount will be different for different selected plans).

Accessing Your server

Step 1: Accessing Your Ubuntu Server

  1. Navigate to the new server created and select the Ubuntu server where the Minecraft server will be hosted.

  2. After clicking the server, start the server by the play button and scroll down and note the SSH command and root password for the Ubuntu server.

Caeff644 7037 4a5b Bff9 5883a607cee5

  1. Access the server through the web-based terminal provided by Hostman named as ‘console’ on dashboard or use preferred SSH client. For this tutorial accessing through SSH client is used

Image4

Step 2: Update System Packages

Use the following command to update system packages of Ubuntu:

sudo apt-get update
sudo apt-get upgrade

Type y and hit Enter.

After upgrade, a pop up screen will appear:

Image8

Leave the settings as default and press Enter.

Installing and Configuring the Server

Now, install and configure the Minecraft Bedrock server on your HostMan Server instance.

  1. Download the latest version of the Minecraft Bedrock server software. 
    • Go to the Downloads page.
    • Scroll down and move cursor to the download for Linux section.
    • Click on the check box to agree to terms and conditions.
    • Right click the download button and copy path. This path will be used in wget command.
    • Go to your Terminal, enter the wget command  and paste the link. Press Enter.
wget https://minecraft.azureedge.net/bin-linux/bedrock-server-1.20.73.01.zip
  1. Unzip the downloaded file using:
unzip bedrock-server-1.20.73.01.zip

In your case, the name of the file to unzip can be different. Insert your filename carefully.

  1. Customize server settings such as world name, server port, and player capacity in the server.properties file.

To access the servers.properties files use the following command:

nano server.properties
  1. Install Plugins: 
    • Visit a reputable Minecraft plugin repository or website to find the plugin you wish to install.

    • To download the plugin directly in your server use the following command. 

wget -O /root/minecraft_server/mods/plugin-name.jar "https://example.com/path/to/your/plugin/plugin-name.jar"

The plugin must be downloaded in the /mods folder withing the /minecraft_server folder.

Explanation:

  • wget -O /root/minecraft_server/mods/plugin-name.jar: This is the location where file has to be downloaded and wget command is used to download.
  • https://example.com/path/to/your/plugin-name.jar: This is a placeholder for the link. Replace it with the link where the plugin is available for download.

Starting the Server and Connecting Players

Once the server is set up and configured, start it and invite players to join your Minecraft Bedrock world.

  1. Execute the following command to launch the Minecraft Bedrock server:
./bedrock_server
  1. Share the server's IP address and port number with friends or community members who wish to join.
  2. Instruct players to open Minecraft Bedrock Edition, navigate to the "Play" menu, and select "Servers."
  3. Click on "Add Server" and input the server details, including IP address and port.
  4. Players can now join the server by selecting it from the server list in Minecraft Bedrock Edition.

Server Management and Maintenance

Regular maintenance ensures smooth gameplay experiences and prevents issues on your Minecraft Bedrock server.

Update Server Software

Regularly updating your Minecraft Bedrock server software is crucial to staying current with the latest features, performance enhancements, and bug fixes. Keeping your server software up-to-date ensures compatibility with the latest client versions and provides a better gaming experience for players. To update the server software:

  • Download the latest version of the Minecraft Bedrock server software from the official website or through your hosting provider.

  • Download updated version of bedrock server, following the Steps 1 and 2 from the Installing and Configuring section.

  • Restart the server to apply the changes and ensure that players can connect with the latest client versions. You can restart from your Hostman dashboard or use the command:

sudo systemctl reboot

Monitor Performance

Monitoring server performance metrics is essential for identifying potential issues and optimizing resource allocation. Regularly monitoring CPU usage, memory consumption, network traffic, and disk space utilization helps ensure that your server can handle the demands of player activity. Use server monitoring tools or built-in server metrics to track performance metrics and:

  • Identify any bottlenecks or resource constraints that may impact server performance.

  • Adjust server settings or upgrade hardware resources as needed to optimize performance.

  • Keep an eye on player activity and server load to anticipate peak usage periods and scale resources accordingly.

Commands like top, htop, or free can be used to monitor server performance metrics. For example, this command displays real-time information about CPU and memory usage:

top

This command shows memory usage in megabytes:

free -hm

Backup Data

Regularly backing up world files and server configurations is essential for protecting against data loss and ensuring continuity in case of unexpected events such as hardware failures or software issues. Implement a backup strategy that includes:

  • Scheduled backups of world files, player data, and server configurations to a secure location.

  • Testing backups regularly to ensure data integrity and the ability to restore data when needed.

  • Storing backups offsite or in a cloud-based storage solution for added redundancy and disaster recovery capability.

To perform backups of world files and server configurations, you can use commands like cp or rsync. For example, this command copies the world directory to a backup location:

cp -r /path/to/world /path/to/backup

This command synchronizes the world directory with a backup location, deleting any files in the backup that are not present in the original directory.

rsync -avz --delete /path/to/world /path/to/backup

Automating the Backup Using Cron

To automate the backup process, create a cron job to execute the backup commands at specified intervals. Here's how you can do it step by step:

  1. Open the cron table using the following command:
crontab -e

This will open the default text editor with the current user's cron table.

  1. Add cron jobs for scheduled backups. In the cron table editor, add lines for each backup command you want to automate. For example:
# Backup world files using cp command
0 0 * * * cp -r /path/to/world /path/to/backup

# Backup world files using rsync command
0 1 * * * rsync -avz --delete /path/to/world /path/to/backup

These lines schedule the cp and rsync commands to run daily at midnight and 1 AM, respectively. Adjust the timing to fit your backup schedule.

Image3

  1. Save the changes to the cron table and exit the editor. The cron daemon will automatically reload the cron table to apply the changes.
  2. Verify that the cron jobs have been added correctly by listing the cron jobs using the following command:
crontab -l

Image1

  1. Once the cron jobs are set up, cron will automatically execute the backup commands at the scheduled times. You can monitor the execution of the cron jobs and check the backup logs (if any) to ensure that the backups are performed successfully.

By setting up cron jobs to run the backup commands at regular intervals, you can automate the backup process and ensure that your world files and server configurations are regularly backed up to a secure location. This helps protect against data loss and ensures continuity in case of unexpected events.

Conclusion

By following these step-by-step instructions, users can effortlessly set up and manage their own Minecraft Bedrock server using a Hostman server. Enjoy endless multiplayer adventures with friends and community members in the vast world of Minecraft Bedrock Edition.

Minecraft
26.04.2024
Reading time: 8 min

Similar

Minecraft

How to Create Your Own Minecraft Gaming Server

Minecraft is a popular game that allows players to create and control their gaming worlds. Setting up a server enables you to customize the environment, manage player limits, and configure gameplay settings to suit your preferences. This guide covers setting up a Minecraft Java server on a Linux system. Requirements The official wiki page recommends the following specs for running a Minecraft server. Minimum Specifications: Supported OS: Windows 7 or newer, macOS Mojave (version 10.14.5 or later), or any Linux distribution. Processor: Intel Core i3-3210, AMD A8-7600, Apple M1 chip, or an equivalent processor (may function on older first-gen i3 processors but isn't officially recommended). Graphics Card: Intel HD Graphics, AMD Radeon R5, or comparable integrated GPUs. Memory: At least 2 GB of RAM. Recommended Specifications: Supported OS: Windows 10 or newer, macOS Mojave (version 10.14.5 or later), or Linux. Processor: Intel Core i5-4690, AMD A10-7800, Apple M1 chip, or a similar CPU. Graphics Card: Dedicated GPUs like NVIDIA GeForce 700 series or AMD Radeon RX 200 series. Memory: 4 GB of RAM or more for better performance. For this guide, we’ll use a Hostman Ubuntu cloud machine configured with the following specifications: a dual-core 3 GHz CPU, 4 GB of RAM, 80 GB of NVMe storage, and a 200 Mbps bandwidth connection. Preparing the Server First, we’ll install tools like screen to run the executable in the background, allowing us to continue using the terminal. We’ll also set up a non-root user to run the server securely. Additional security measures will be covered later. Let’s proceed to the setup.  Updating and Installing Tools Let’s begin by updating the server and installing essential tools. Update the package list and upgrade existing packages: sudo apt update && sudo apt upgrade -y Next, we install essential tools like net-tools and screen: sudo apt install net-tools screen -y net-tools, including netstat, manages network connections, while screen enables background Minecraft server operation. Install the latest Java Development Kit to proceed:  sudo apt install openjdk-21-jdk With these steps done, we can move to the setup. Create a User First, add a new user called minecraft (feel free to name whatever you want).  sudo useradd -r -U -d /usr/local/minecraft/server/ -s /sbin/nologin minecraft The -s option in the useradd command specifies the login shell for the new user. By setting it to /sbin/nologin, we effectively prevent the user from being able to log in interactively to the server. This will ensure that this user is only used to run the Minecraft server and reduce the attack surface.  Create a Directory for the Executable Files Next, we create the directory structure to store the Minecraft server files: sudo mkdir -p /usr/local/minecraft/server/Java The -p flag ensures that any missing parent directories are created automatically. This prepares a dedicated location to house all installation related files. Assign Directory Ownership We assign ownership of the directory to the minecraft user and group: sudo chown -R minecraft: /usr/local/minecraft/server/ The -R flag ensures permissions are applied recursively to all files and subdirectories. This allows the minecraft user to manage all server-related files without access issues. Download and Prepare the Minecraft Server We start by switching to the minecraft user with an interactive shell to perform the setup tasks securely: sudo su - minecraft -s /bin/bash Next, we navigate to the server directory where all the Minecraft files will be stored: cd /usr/local/minecraft/server/Java Finally, we download the Minecraft server .jar file from Mojang’s official servers: wget https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar This ensures the Minecraft executable is in the correct location and ready for further configuration. We recommend updating the URL if a newer server file version is available. Run the Minecraft Server We start the Minecraft server using the following command: java -Xmx1024M -Xms1024M -jar server.jar nogui This command allocates 1GB of memory to the server (-Xmx for the maximum and -Xms for the initial allocation). The nogui option disables the graphical interface, making it more efficient for a server environment by reducing resource usage. You might first encounter an error due to the EULA similar to this:  When the server is started for the first time, it exits with a message requiring acceptance of the Minecraft End-user License Agreement (EULA). During this process, several files are created in the server directory: ls eula.txt  libraries  logs  server.jar  server.properties To accept the EULA, we update the eula.txt file by replacing false with TRUE using the following command: sed -i 's/\bfalse\b/TRUE/' eula.txt This command edits the file, eliminating the need to open an editor like Vim or Nano. With the EULA accepted, the server can now be launched. Use the screen command to run the server in the background: screen -S mc_Java_server -dm java -Xmx1024M -Xms1024M -jar server.jar nogui Create a session named mc_Java_server, which allows detaching from the terminal while keeping the server active. Great! The Minecraft service is now running and accessible at your IP address on port 25565.  Testing the Server To connect in multiplayer mode, open Minecraft and add a new address. Once done, you can join the server after your client has established a connection.  Use online tools like mcsrvstat.us to check if the server is online. It also displays details such as player count, Minecraft version, and debug information. Now that the Minecraft server is set up, let’s improve security and resource management. Best Tips for Securing and Optimizing Your Installation With the Minecraft server set up, focusing on securing the server and optimizing resource management is essential. Implementing these tips will help ensure smooth performance while protecting against potential vulnerabilities. Secure with Firewall Set up a firewall to control traffic and block unauthorized access: Allow only necessary ports, such as 25565 for Minecraft, using tools like ufw or iptables: sudo ufw allow sshsudo ufw allow 25565sudo ufw enable Block all other incoming traffic unless explicitly required for different services. A firewall protects the server from external threats by ensuring that only expected traffic can reach it. Limit Access with a Whitelist Activate the server whitelist to restrict access to specific players: # In the Minecraft console or server.properties file:whitelist=true Add trusted players to the whitelist: whitelist add <player_username> This ensures that only approved players can access your machine, reducing the risk of griefing or malicious activities. Use a Dedicated User Always run the Minecraft server under a non-root user account, like the minecraft user we created earlier. This limits the machine’s permissions, ensuring it cannot harm the underlying system even if the server is compromised. Specify and Monitor RAM Usage Optimize memory usage to match the server’s workload. Allocate a specific amount of RAM to the server using the -Xmx and -Xms flags in the Java command. For example, allocate 2GB of RAM: java -Xmx2048M -Xms2048M -jar server.jar nogui You can monitor RAM usage using tools like htop to ensure the server runs smoothly without exhausting system resources. Limit Player Slots and Connections You can restrict the maximum number of players in server.properties to match your server’s capacity: max-players=10 Add Plugins Plugins are a great way to expand your Minecraft server's functionality with features like anti-griefing tools, economy systems, or mini-games. Here are some recommended plugins: WorldGuard: Protect specific areas from unwanted changes. CoreProtect: Log and roll back player actions. NoCheatPlus: Detect and prevent cheats or exploits. Refer to our tutorial for plugin installation, from downloading to placing them in the correct directory. These enhancements will improve security and user experience. Conclusion This article covered the steps to install a Minecraft gaming server on a remote Ubuntu machine and best practices for maintenance and providing a fantastic player experience. Consider our ready-to-run Minecraft servers available at Hostman Marketplace for a hassle-free setup.
23 December 2024 · 7 min to read
Minecraft

How to Install Plugins on Your Minecraft Server

Plugins are essential for enhancing your Minecraft server by introducing new features, commands, and customization options. Bukkit and Spigot are popular platforms that support plugins, allowing server administrators to transform their vanilla Minecraft server into a feature-rich environment. This guide will walk you through the steps for installing and managing plugins, along with explaining how to set up custom server scripts for starting and restarting your server on Linux. Choosing the Right Plugins for Your Server Before installing plugins, it’s crucial to select the right ones that match your server's needs. Here are some steps to guide you: Define the focus of your server: Whether it's survival, creative, minigames, or roleplay, your plugins should match the gameplay style. Find reliable plugins: Visit well-known repositories like SpigotMC and Bukkit’s plugin directories to find safe and well-maintained plugins. Consider performance: Be cautious with performance-heavy plugins, especially if you have limited server resources. Prerequisites for Installing Plugins Before installing plugins on your Minecraft 1.21 server, make sure the following prerequisites are met: Bukkit or Spigot server: Ensure your server is running a compatible Bukkit or Spigot version for Minecraft 1.21, as plugins are not supported on a vanilla server. Server access: You will need SSH access to remotely connect to your Linux server, and SFTP for uploading plugin files. Java 21 installed: Minecraft 1.21 requires Java 21 to run. Ensure that your server has Java 21 installed and properly configured. You can check your Java version with: java -version If you need to install or update Java, use the following command on Ubuntu: sudo apt install openjdk-21-jre Installing Plugins on a Bukkit/Spigot Server After selecting the right plugins, follow these steps to install them on your server: Connect to your server using SSH: ssh username@your_server_ip Navigate to the plugins directory: Move to the plugins directory in your Minecraft server’s root folder. cd /path/to/your/minecraft/server/plugins Download or upload the plugin .jar: You can upload the plugin .jar file via SFTP or use wget to download it directly to the server. For example, to install EssentialsX: wget https://path-to-plugin/EssentialsX.jar Create a start.sh script (if you don't have one already): The start.sh script will handle starting your server. Here’s a basic version: #!/bin/bashcd /path/to/your/minecraft/serverjava -Xms2G -Xmx4G -jar spigot.jar nogui -Xms2G allocates 2 GB of minimum RAM. -Xmx4G allocates 4 GB of maximum RAM. nogui runs the server without the graphical interface. After saving the script, make it executable: chmod +x start.sh Start your server using the script: ./start.sh Restart нour Server with a restart.sh script. To make it easier to restart your server after plugin installation or updates, you can create a restart.sh script. Here’s a version that stops and restarts the server: #!/bin/bash cd /path/to/your/minecraft/server # Stop the server if it's running in a screen session screen -S minecraft -X stuff "stop$(echo -ne '\r')" # Wait a few seconds for the server to shut down sleep 10 # Start the server again java -Xms2G -Xmx4G -jar spigot.jar nogui This script sends the stop command to the server, waits for 10 seconds, and then starts the server again. Ensure the script has the necessary execute permissions: chmod +x restart.sh You can now restart your server with: ./restart.sh Verifying Plugin Compatibility and Version Before installing any plugin, always verify that it is compatible with your version of Bukkit or Spigot: Check plugin version: Ensure the plugin supports your Minecraft version. Verify the plugin’s .jar or plugin.yml file for supported versions. Unzip the plugin and inspect: unzip plugin.jarcat plugin.yml Review the plugin's documentation: Some plugins may have dependencies or specific configurations needed to function correctly. You can check your server version with the following command: /version Managing and Configuring Installed Plugins Once your plugins are installed, many will require configuration to suit your server's needs: Edit configuration files: Most plugins create a folder in the plugins directory with a config.yml or plugin.yml file. You can modify this file using a text editor like nano: nano /path/to/your/minecraft/server/plugins/pluginname/plugin.yml Reload the server or the plugin: After editing the configuration, restart your server using restart.sh or reload the plugin in-game using: /reload Check plugin status: To see which plugins are installed and running, use: /plugins This will display a list of active plugins in-game or via the server console. Common Plugin-Related Issues and Solutions Here are a few common problems and solutions related to plugins: Plugin not loading: Ensure the plugin is placed in the correct plugins folder and is compatible with your Minecraft version. Server crashes: Review the server.log for errors, as a plugin mismatch or missing dependency could be the cause. Incompatible plugins: Some plugins may conflict with others, especially those with overlapping functionalities (e.g., multiple permissions managers). Best Practices for Managing Plugins To keep your server running smoothly, follow these best practices: Limit the number of plugins: Only install plugins that are necessary. Too many plugins can slow down your server and cause lag. Regular backups: Always back up your server before adding or updating plugins to prevent data loss. cp -r /path/to/your/minecraft/server /path/to/backup/location Update plugins regularly: Keep your plugins up to date to maintain compatibility with newer Minecraft versions. Test new plugins locally: Before adding a plugin to your live server, test it on a local server to avoid disruptions. Popular Plugins to Enhance Your Server Here are some highly recommended plugins that can enhance your server: EssentialsX: A comprehensive plugin providing essential server commands. LuckPerms: A flexible and powerful permissions management plugin. WorldEdit: A tool for quickly building and editing large areas of blocks. Vault: A permissions and economy manager, often required by other plugins. Dynmap: Generates a live web map of your Minecraft world. Conclusion With this guide, you now have all the knowledge needed to install, manage, and configure plugins for your Minecraft server. By choosing the right plugins, verifying compatibility, and using custom scripts like start.sh and restart.sh, you can efficiently manage your server and provide an engaging experience for your players.
18 October 2024 · 6 min to read
Minecraft

Minecraft Server Optimization

Running your own Minecraft servers can be challenging as the methods for creation and optimization frequently change. The game continually evolves, increasing the demands on the server infrastructure. Given Minecraft's enormous fan base, it's worth exploring this guide to ensure both tech enthusiasts are satisfied and there's no reason for critics to pounce on the server organizer.. What started as a simple concept—a world made of basic blocks—has gradually evolved into an environment for communication and creating complex structures that mimic the real world. This complexity imposes certain limitations. The more detailed a player's creations are, the greater the strain on the server's CPU and RAM which can result in Minecraft lagging. This situation is further complicated by multiple users connecting to a single host. Let's examine typical problems using the Java Edition as an example. Types of Servers Let's look at some popular Minecraft server types: Game Client The simplest version of a Minecraft server is the one integrated within the game client. All you need to do is create a new world, click confirm, and the virtual universe becomes accessible over a local network. However, you can only play with users on the same network, limiting this option to a few accounts, making it rarely used. Vanilla One of the popular types of Minecraft servers is Vanilla, the original server module developed by Mojang Studios. It offers basic functionality for creating a server with a personal virtual world, accessible from anywhere with an internet connection. It's relatively easy to set up, and beginners can find detailed instructions on the Minecraft Wiki. This option is suitable only for beginners. As you delve deeper, you'll discover you cannot add plugins to extend the official Minecraft server's functionality. This limitation leads to higher RAM usage due to the lack of server-side optimization features. Bukkit Another Minecraft server option is Bukkit, which was created by enthusiasts who built upon the Vanilla version. They expanded it by adding support for mods and plugins. Bukkit attracts users with its less demanding memory requirements and the ability to add new types of blocks to the game. This allows for more cost-effective hosting compared to a Vanilla server. However, the main drawback is that the Bukkit repository has been abandoned since 2014 because Mojang Studios recruited its developers, and now they work on official services. SpigotMC A common drawback of the previous Minecraft server options is the lack of automation. The game has evolved from a simple block world into a complex and engaging experience, so the introduction of API support in SpigotMC was timely. SpigotMC was developed by refining the abandoned Bukkit project, enhancing performance and reliability. The only drawback of SpigotMC is its official blocking in Git repositories. To download the source code, you must use a special utility called BuildTools, which compiles the code yourself, rendering DMCA restrictions meaningless. PaperMC Another active Minecraft server project is PaperMC. Like SpigotMC, its key feature is API support, providing extensive options for creating or modifying existing plugins. Technically, it is a fork of SpigotMC, but PaperMC is more like a "new take" on optimizing Minecraft. It is supported by a well-developed community, which helps quickly address any issues. Plugins developed for SpigotMC work on PaperMC without modification in 99% of cases. This backward compatibility makes it easy to experiment with both platforms without worrying about plugin availability. However, official support is limited to developments within the project. Problems and Solutions When creating a new Minecraft server, it's crucial to understand the application's architecture. For example, a significant portion of the resources will use only one CPU core, regardless of the number of processors allocated. The other cores will remain idle. You should consider this when renting cloud resources; clock speed may be more important than the number of cores, which doesn't necessarily impact performance. Another important factor is the amount of RAM. Consider: The number of worlds opened simultaneously. The size of each generated virtual space. The total number of players who will have access. Additionally, remember that Java applications always require a certain amount of reserved memory to run smoothly. For example, if you estimate that 8 GB of RAM is needed, allocating up to 12 GB is better. These figures are approximate but effectively illustrate the point. Cloud hosting rates typically allow for resource reservation with a decent margin. To avoid problems when launching a Minecraft server, follow these rules: Monitor memory usage with tools like LagMeter for real-time insights into Minecraft lagging. Regularly check for and install plugin updates. Developers are continually working on performance improvements and bug fixes. Limit generated maps, for instance, using the WorldBorder plugin, to reduce server load. Experiment with new plugins, replacing heavy modules with lighter ones with lower CPU and memory requirements. Utilize drop cleanup plugins like NoLagg and McClean. These plugins help manage system resources by clearing up unused or "saved for later" drops, which accumulate and strain resources making Minecraft laggy. Check performance metrics before and after using these plugins to find the optimal server configuration. Block Map Generation Now, let's discuss gameplay. When players connect to the server for the first time, their character automatically appears at a common spawn point. This is the only location whose coordinates are pre-generated by the server based on configuration file settings. The key parameter here is the rendering distance, measured in chunks. A chunk is a 16x16 area with a height of 256 blocks. The number of chunks allocated depends on the server settings and the owner's preferences. Generating the spawn point requires significant resources since it happens dynamically, storing data in RAM and continuously increasing the map file size. The more users log into the server, the more crucial it becomes to understand how to optimize Minecraft and make it run faster. Beginners often base their server's capacity on the load from a single player, perhaps a couple of dozen at most. However, with a thousand players logging in, the server will likely crash under the strain. At best, they'll experience significant Minecraft lag during mass respawns, which frustrates players. Minecraft default tick speed, or tick rate, is 20 TPS (Ticks Per Second). The server will timeout and eject players if it drops below 20. Ideally, one TPS equals 50 ms, with 1 second in the real world equaling 20 game ticks. Much depends on the server owner. For instance, the well-known 2b2t server comfortably handles a world border of 30 million blocks, with the map now at 8 TB and still growing. However, not everyone can access such vast resources to support nearly infinite worlds. The solution is to limit your world to specific coordinates and pre-generate the map. This approach avoids server overload from dynamic block generation, allowing the CPU to focus on rendering the existing landscape. It also helps forecast memory usage. The optimal approach is to use the WorldBorder plugin. Beginners should create a circular world centered on the spawn point using the command: /wb set <radius in blocks> spawn Players attempting to cross the boundary will be pushed back a few blocks. If a persistent player tries to cross the map's edge, they'll be automatically teleported back to the spawn point. To pre-generate the world according to the selected shape, use the command: /wb fill And confirm with: /wb confirm An Intel Xeon Gold 6240 processor can generate a world with a 5,000-block radius in about two hours, creating approximately 40 billion blocks. As the radius increases, so does the time required for generation. TPS will drop significantly during map creation, so it's essential to account for this if active players are online. Also, allocate enough disk space in advance. A 5,000-block radius map requires nearly 2 GB of disk space. These factors directly impact the choice of hosting plan when renting cloud resources. The plugin version is not critical; it was developed for Minecraft 1.14, and no compatibility issues have been reported, allowing for unrestricted experimentation. The full list of WorldBorder commands is available on the plugin's official forum. Problematic Blocks Dynamic block generation within the active map is another consideration when optimizing a Minecraft server. While dropped items add little load, massive explosions from TNT blocks can be resource-intensive. The issue lies in the physics engine, where gravity affects neighboring blocks blown up by TNT. The explosion triggers the generation of items from destroyed blocks, a highly resource-intensive process. If your server's current configuration struggles with this load, disabling TNT blocks or end crystals may be wise to reduce lag in Minecraft. These can overload a weak server. You can easily avoid this by using the WorldGuard plugin, which works with WorldEdit and should be installed afterward. Conclusion This brief overview of Minecraft server optimization covers some of the "pain points" of resource management. Optimization isn't particularly complex, but planning for the maximum number of players per host is essential. Pre-generating maps can fit well into a promotion strategy. However, disabling popular blocks like TNT should be avoided, as their absence could impact the server's appeal, especially for new MC servers and newer communities.
14 August 2024 · 8 min to read

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support