This article has 419 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 Server« | »Build A Paper Server«
Prerequisites
Before we begin, ensure you have:
Ubuntu 24.04 LTS installed and updated.
Java Development Kit (JDK) 17 installed (Fabric supports Java 17).
Basic understanding of command-line operations.
An active internet connection.
Step 1: Update, Java and Directory
First things first, let’s make sure your system is up-to-date, Java 17 is installed and a dedicated server directory is created. Just like what you have done a few moments ago.
Step 2: Download, Install and accept EULA of Fabric Server
Grab the latest Fabric Installer jar file:
wget https://maven.fabricmc.net/net/fabricmc/fabric-installer/0.11.2/fabric-installer-0.11.2.jar -O fabric-installer.jar
> Note: Check the Fabric website for the latest installer version and update the URL accordingly.- Run the installer to set up the server:
java -jar fabric-installer.jar server -mcversion 1.20.1 -downloadMinecraft
-mcversion 1.20.1 specifies the Minecraft version.
-downloadMinecraft forces the installer to download the Minecraft server jar.
After installation is done, you should be able to see output confirming the installation. After that, you can accept the EULA as usual.
Step 3: Start Up with a Script
- 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 fabric-server-launch.jar
-Xms2G: Sets the initial memory allocation to 2GB.
-Xmx4G: Sets the maximum memory allocation to 4GB.
Adjust based on your system’s RAM.
- Make this script executable by
chmod +x start.sh
.
After that, you can start your server under current directory using./start.sh
Step 4: Install Fabric API and Add Your Mods
To use most Fabric mods, you’ll need the Fabric API:
- Download Fabric API:
Navigate to the Fabric API page and grab the latest version compatible with your Minecraft version.
Alternatively, use
wget
:wget https://media.forgecdn.net/files/xxxx/xxxx/fabric-api-0.83.0+1.20.1.jar -P mods/
Replace the URL with the direct download link of the Fabric API jar file suitable for your Minecraft version. Create the Mods Folder:
If it’s not already there, use mkdir to create a mods folder:
mkdir mods
Move Fabric API to Mods Folder:mv fabric-api-*.jar mods/
- Add your mods:
Place any Fabric-compatible mod.jar
files into themods
folder. Ensure that all mods are compatible with your server’s Minecraft and Fabric versions.
v1.0.0 - Updated on 2024-11-01.