My kids have a Minecraft server sitting in a closet somewhere. They connect to it from any machine in the house, but only when they’re at home. It isn’t opened to the outside world. The server has a Ryzen 7 5800H and ~~12GB~ 64GB of RAM, and runs very well when allowing Paper-MC to run with limitations. Paper-MC is “The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies.”
To get started on your new Minecraft adventure, install TLauncher (link). TLauncher is a third party Minecraft launcher that incorporates mods, skins, plugins, and multiple server instances. You’ll need to confirm server.properties has online-mode=false, or else TLauncher won’t connect to your shiny, new server. That’s because Microsoft performs an authentication check on launchers when connecting. This modification is already taken care of in the script below, but it’s good to know that it’s there.
One more incredibly frustrating thing, is that (Java) Minecraft on PC isn’t the same version that you run on your tablet, phone, or Chromebook. These will not connect to each other, and it’s not worth trying to get the workarounds going. Trust me. If you’re going to run this server, you’ll need to have only PCs connect to it. It sucks and is stupid, but that’s the way things are. We have a support group available at the local Y and meet on Tuesday evenings.
Note: You only need to run the below bash script once to get the server running. After the first time, run the newly created start.sh. Don’t forget to change server.properties for your style of gameplay. You can review the details of the file here.
setup_minecraft.sh
#!/bin/bash
# Check here for the newest Minecraft version supported by Paper: https://papermc.io/downloads/paper
MINECRAFT_VERSION="1.21.4"# Update your system
sudo apt update && sudo apt upgrade -y
# Install dependencies
sudo apt install -y openjdk-17-jre-headless wget jq screen
mkdir -p ~/minecraft_server && cd ~/minecraft_server
# Look up the latest stable Paper build for this Minecraft version and download it
USER_AGENT="mcwain-minecraft-setup/1.0 (mcwain.net)"
PAPER_URL=$(curl -s -H "User-Agent: $USER_AGENT"\
"https://fill.papermc.io/v3/projects/paper/versions/${MINECRAFT_VERSION}/builds"\
| jq -r 'map(select(.channel == "STABLE")) | sort_by(.id) | last | .downloads."server:default".url')
wget -O paper.jar "$PAPER_URL"# Accept the EULA
echo "eula=true" > eula.txt
# Disable first-party launcher check - Paper fills in every other default# the first time it launches, so this is all server.properties needs up front
echo "online-mode=false" > server.properties
# Create a startup script - high performance graphical settings included
cat << EOF > start.sh
#!/bin/bash
java -Xms512M -Xmx1024M -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AlwaysPreTouch -jar paper.jar nogui
EOF
chmod +x start.sh
You’ll need to change the script permissions to allow for execution, then run it.
When you’re looking to start the server, run the following. This will put the server in a screen session, where you could normally hit CTRL+A+D to detach from the screen and close the session without closing the server. However, the -d -m below does that for you.
Upgraded the RAM in the machine a while back and didn't update this page.
Fixed the script: PaperMC's old download API was shut down, the downloaded jar filename didn't match what start.sh tried to run, and server.properties was being edited before it existed. Switched to PaperMC's current v3 API, made the jar filename consistent, and write server.properties directly instead of relying on a first run to generate it.
20250329
Updated PaperMC version number in script above - don't forget to update TLauncher!
Added plugins to links at bottom
20240731
Made the version number a variable so it can be updated in one spot.