What is Fabric?
Fabric is a lightweight, modern modding framework for Minecraft Java Edition. Compared to Forge, Fabric loads faster, uses less memory, and updates to new Minecraft versions more quickly. It is popular for performance mods, quality-of-life improvements, and technical modding.
Installation
mkdir -p /opt/minecraft-fabric && cd /opt/minecraft-fabric
# Download Fabric installer
wget https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.jar
# Install server
java -jar fabric-installer-1.0.1.jar server -mcversion 1.20.4 -downloadMinecraft
# Accept EULA
echo "eula=true" > eula.txt
Essential Mods
# Fabric API (required by most mods)
# Download from modrinth.com/mod/fabric-api
# Place in mods/ directory
# Performance mods:
# - Lithium (general server optimization)
# - Starlight (lighting engine rewrite)
# - FerriteCore (memory reduction)
# - C2ME (chunk loading optimization)
# - Krypton (network optimization)
# Management mods:
# - Spark (profiling and monitoring)
# - FabricProxy-Lite (BungeeCord/Velocity support)
Start Script
cat > start.sh << EOF
#!/bin/bash
java -Xms2G -Xmx4G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+AlwaysPreTouch \
-jar fabric-server-launch.jar nogui
EOF
chmod +x start.sh
Systemd Service and Firewall
cat > /etc/systemd/system/minecraft-fabric.service << EOF
[Unit]
Description=Minecraft Fabric Server
After=network.target
[Service]
WorkingDirectory=/opt/minecraft-fabric
ExecStart=/opt/minecraft-fabric/start.sh
User=minecraft
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now minecraft-fabric
ufw allow 25565/tcp
Configuration and Backups
# server.properties - same as vanilla Minecraft
# Configure view-distance, max-players, motd, etc.
# Backup world data regularly
tar czf /backup/fabric-world-$(date +%Y%m%d).tar.gz /opt/minecraft-fabric/world/
Fabric vs Forge
- Fabric is lighter and faster to start
- Fabric updates to new Minecraft versions faster
- Forge has more mods available overall
- Some popular mods are Fabric-only (Sodium, Lithium, Iris)
- Mods are NOT compatible between Fabric and Forge