This article has 307 words in total, and the estimated reading time is around 2 minutes.
Want to know how long your article takes to read? Why not »Click Here« to try it out!
Prerequisites you may want to read: »Build A Vanilla Minecraft Server!«
Prerequisites
Before we get started, make sure you have:
Ubuntu 24.04 LTS (or simillar) installed and running.
Java Development Kit (JDK) 17 installed (Paper requires Java 17).
Basic command-line knowledge.
An active internet connection.
Step 1: Update Your System
First, let’s ensure your system is up-to-date: Use sudo apt update && sudo apt upgrade -y
to start software update and confirm all updates. Paper Spigot requires Java 17, you can install it using sudo apt install openjdk-17-jdk -y
(why are we using JDKs instead of JREs?) After the installation, verify using java -version
, and you should get an output similar like openjdk version "17.0.x" xxxx-xx-xx
Step 2: Downolad and Build
- Create a dedicated directory for your Paper server using
mkdir
, thencd
to the directory. - Download the BuildTools. Paper Spigot uses BuildTools to compile the server.jar, you can use
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
to download this file. - Run BuildTools to generate the Paper Spigot Jar file:
java -jar BuildTools.jar --rev
. This process fetches the latest version of Paper and compiles it. It might take several minutes, so sit tight.
Step 3: Launch and Configure
- Rename the Compiled: Once the build is complete, you should see a
paperclip-x.x.x.jar
file. You can use “mv” command to rename it for simplicity:mv paperclip-*.jar paper.jar
- Accept the EULA before starting the server.
- Create a Startup Script: Let’s make it starting the server easier with a script:
nano start.sh
In the editor, add the following lines:#!/bin/bash
java -Xms2G -Xmx4G -jar paper.jar - At last, make this script executable by
chmod +x start.sh
.
After that, you can start your server under current directory using./start.sh
Step 4: Optimize Your Server
Optimize the Spigot.yml
Entity Activation Range:
- What it does: Controls how close a player needs to be before entities become active.
- Optimization Tip: Lowering these values reduces the number of active entities, decreasing CPU usage.
- Suggested Values:
animals: 32
→ Reduce to24
or16
monsters: 32
→ Reduce to24
- Note: Be cautious; too low can affect gameplay, like mob farms.
Entity Tracking Range:
What it does: Determines how far away entities are visible to players.
Optimization Tip: Reducing these ranges decreases network load.
Suggested Adjustments:
animals: 48
→ Reduce to32
monsters: 48
→ Reduce to32
Mob Spawn Range:
What it does: Sets the radius around players in which mobs can spawn.
Optimization Tip: Lowering this can reduce the number of mobs spawned.
Recommended Value:
4
Tick Settings:
What it does: Controls how often the server attempts to spawn mobs.
Optimization Tip: Increasing
animal-spawns
value reduces spawn frequency, easing server load.Suggested Change:
animal-spawns: 400
→ Increase to600
or800
View Distance:
What it does: Controls how many chunks are loaded and sent to clients.
Optimization Tip: Lowering these values can significantly reduce server strain.
Recommended Values:
view-distance: 6
simulation-distance: 6
Async Chunk Loading:
What it does: Enables asynchronous chunk loading to reduce lag spikes.
Optimization Tip: Keep this enabled for smoother performance.
Optimize the Bukkit.yml
Spawn Limits:
What it does: Sets the maximum number of mobs that can spawn.
Optimization Tip: Adjusting these limits can control mob population.
Suggested Values:
monsters: 70
→ Reduce to50
animals: 15
→ Reduce to10
Chunk Garbage Collector:
What it does: Determines how often the server attempts to unload unused chunks.
Optimization Tip: Lowering the period can help free memory but may cause lag if too frequent.
Recommended Value: Keep at
600
unless noticing issues.
Ticks Per:
What it does: Controls intervals for various server tasks.
Optimization Tip: Increasing
autosave
interval reduces save-related lag.Suggested Change:
autosave: 6000
→ Increase to12000
or18000
v1.0.0 - Updated on 2024-11-01.