How To Install Minecraft Server on Fedora 41
In this tutorial, we will show you how to install Minecraft Server on Fedora 41. Setting up your own Minecraft server gives you complete control over your gaming experience. Whether you want to create a private world for friends or host a public community, Fedora 41 provides a stable and powerful platform for your Minecraft adventures. This comprehensive guide will walk you through every step of the installation process, from preparing your system to optimizing performance for the best gameplay experience.
Understanding System Requirements
Before diving into the installation process, it’s essential to ensure your system meets the necessary requirements to run a Minecraft server smoothly. Minecraft servers can be resource-intensive, especially with multiple players and mods.
Hardware Requirements
For a basic Minecraft server on Fedora 41, you’ll need:
- CPU: At minimum, a 2 GHz 64-bit processor (Intel Core i3 or AMD equivalent)
- RAM: At least 2GB dedicated to the server (4GB recommended for 10+ players)
- Storage: Minimum 50GB of free space for the server files, world data, and backups
- Network: Stable internet connection with at least 5 Mbps upload speed
The server’s performance directly correlates with your hardware capabilities. More players, larger world sizes, and additional mods will require more resources. For a server hosting 20+ players with multiple plugins, consider:
- CPU: 3.5 GHz quad-core processor or better
- RAM: 8GB or more dedicated to Minecraft
- Storage: 100GB+ SSD storage for faster world loading and saving
Your hardware investment will significantly impact player experience, especially during complex operations like exploring new chunks or handling redstone contraptions.
Preparing Your Fedora 41 Server
The first step is setting up a clean Fedora 41 server environment. This creates a solid foundation for your Minecraft installation.
Installing Fedora 41 Server Edition
- Download the latest Fedora 41 Server edition from the official Fedora website
- Create a bootable USB drive using tools like Fedora Media Writer
- Boot from the USB and follow the installation wizard
- During setup, select minimal installation to reduce unnecessary packages
Initial System Configuration
Update your system to ensure you have the latest security patches and software:
sudo dnf upgrade --refresh
Create a dedicated user for running the Minecraft server, which improves security by isolating the server process:
sudo useradd -m mcuser
sudo passwd mcuser
Switch to the new user account:
su - mcuser
Create a directory structure for your Minecraft installation:
mkdir -p ~/minecraft/server
cd ~/minecraft/server
This organized structure will help manage server files, backups, and plugins efficiently.
Installing Java Dependencies
Minecraft is a Java-based game, so installing the correct Java version is crucial for server performance and compatibility.
Choosing the Right Java Version
Different Minecraft versions work best with specific Java releases. For the latest Minecraft server (1.20+):
sudo dnf install java-17-openjdk-devel
For older Minecraft versions (1.12-1.16):
sudo dnf install java-1.8.0-openjdk-devel
Verify the installation and check the Java version:
java -version
The output should show the installed Java version. If you have multiple Java versions installed, you can select the default version using:
sudo alternatives --config java
Java’s memory management capabilities are essential for Minecraft server performance. Later in this guide, we’ll configure Java settings to optimize server performance based on your system resources.
Downloading the Minecraft Server Software
You have several options for Minecraft server software, each with different features and performance characteristics.
Understanding Server Software Options
- Vanilla: The official Minecraft server from Mojang
- Paper: High-performance fork with additional features and optimizations
- Spigot: Customizable server with plugin support
- Forge: Allows for extensive modding
For most users, the Paper server provides the best balance of performance and features. Let’s download the vanilla server first:
cd ~/minecraft/server
wget https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar
Note: The URL will change with each Minecraft version. Always get the latest link from the official Minecraft website.
Rename the server file for clarity:
mv server.jar minecraft_server.1.20.6.jar
Set appropriate permissions:
chmod +x minecraft_server.1.20.6.jar
The server software is now ready for initial configuration.
Initial Server Configuration
After downloading the server software, you’ll need to configure it before players can connect.
First-Time Server Setup
Run the server for the first time to generate configuration files:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.20.6.jar nogui
The server will start and then stop with a message about accepting the EULA (End User License Agreement).
Open the eula.txt file:
nano eula.txt
Change eula=false
to eula=true
to accept the agreement and save the file.
Configuring server.properties
The server.properties file contains all your server settings. Edit it with:
nano server.properties
Important settings to configure:
server-name
: Set your server’s namegamemode
: Choose survival, creative, adventure, or spectatordifficulty
: Set to peaceful, easy, normal, or hardmax-players
: Maximum number of concurrent playersview-distance
: How many chunks players can see (lower for better performance)spawn-protection
: Area around spawn that only ops can modifyenable-command-block
: Set to true if you want to use command blocksmotd
: The message displayed in the server list
Save the file after making your changes. These settings can be adjusted later as needed.
Network Configuration and Port Forwarding
For players to connect to your Minecraft server from outside your local network, you need to configure network settings properly.
Configuring Fedora Firewall
Minecraft uses TCP port 25565 by default. Open this port in the Fedora firewall:
sudo firewall-cmd --permanent --zone=public --add-port=25565/tcp
sudo firewall-cmd --reload
Verify the port is open:
sudo firewall-cmd --list-all
Router Port Forwarding
- Access your router’s administration interface (typically by entering 192.168.1.1 or 192.168.0.1 in your browser)
- Find the port forwarding section (may be under “Advanced Settings”)
- Create a new rule forwarding TCP port 25565 to your server’s local IP address
- Save the settings and restart your router if required
Testing Connectivity
Check if your server is accessible from the internet:
- Find your public IP address by visiting a site like whatismyip.com
- Have a friend try connecting to your server using your public IP
- Alternatively, use a port checking tool like canyouseeme.org
If connection issues persist, verify that:
- The server is running
- The correct port is forwarded
- Your firewall isn’t blocking connections
- Your ISP isn’t blocking the port (some residential ISPs block server ports)
Creating a Startup Script
A startup script automates the server launch process and allows you to customize Java parameters for optimal performance.
Basic Startup Script
Create a file named start-minecraft.sh
:
nano ~/minecraft/server/start-minecraft.sh
Add the following content:
#!/bin/bash
cd ~/minecraft/server
java -Xms2G -Xmx2G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -jar minecraft_server.1.20.6.jar nogui
Make the script executable:
chmod +x ~/minecraft/server/start-minecraft.sh
These Java parameters optimize garbage collection and memory usage for Minecraft. You should adjust the -Xms
and -Xmx
values based on your system’s available RAM.
Using Screen for Server Management
Install Screen to keep the server running when you’re not connected:
sudo dnf install screen
Start a new Screen session for your Minecraft server:
screen -S minecraft
Run your startup script within the Screen session:
./start-minecraft.sh
To detach from the Screen session while keeping the server running:
- Press
Ctrl+A
, thenD
To reattach to the session later:
screen -r minecraft
This allows your server to run continuously without requiring you to stay logged in.
Setting Up Systemd Service
For automatic server startup on boot, create a systemd service. This ensures your server restarts automatically after system reboots.
Creating the Systemd Service File
Create a new service file:
sudo nano /etc/systemd/system/minecraft.service
Add the following content:
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=mcuser
Nice=1
KillMode=none
SuccessExitStatus=0 1
ProtectHome=true
ProtectSystem=full
PrivateDevices=true
NoNewPrivileges=true
WorkingDirectory=/home/mcuser/minecraft/server
ExecStart=/usr/bin/java -Xms2G -Xmx2G -XX:+UseG1GC -jar minecraft_server.1.20.6.jar nogui
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS!"\015'
ExecStop=/bin/sleep 10
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "save-all"\015'
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "stop"\015'
Restart=on-failure
RestartSec=20s
[Install]
WantedBy=multi-user.target
Enabling and Starting the Service
Enable the service to start at boot:
sudo systemctl enable minecraft.service
Start the service:
sudo systemctl start minecraft.service
Check the service status:
sudo systemctl status minecraft.service
To view server logs:
sudo journalctl -u minecraft.service
This systemd configuration ensures proper shutdown procedures, saving all world data before stopping, and automatically restarts the server if it crashes.
Server Administration and Maintenance
Proper administration and maintenance are crucial for a healthy Minecraft server.
Basic Server Commands
Access the server console through your Screen session or systemd journal. Here are essential commands:
op <username>
: Give a player operator privilegesdeop <username>
: Remove operator privilegeswhitelist add <username>
: Add player to whitelistwhitelist remove <username>
: Remove player from whitelistsave-all
: Save the world to diskstop
: Safely shut down the server
Backup Strategy
Regular backups prevent data loss from crashes, griefing, or corruption:
1. Create a backup script:
nano ~/minecraft/backup.sh
2. Add the following content:
#!/bin/bash
DATE=$(date +%Y-%m-%d-%H-%M)
BACKUP_DIR=~/minecraft/backups
MINECRAFT_DIR=~/minecraft/server
WORLD_NAME=world
# Send save-all command to server
screen -S minecraft -p 0 -X stuff "save-all\015"
# Wait for save to complete
sleep 10
# Create backup directory if it doesn't exist
mkdir -p $BACKUP_DIR
# Create backup
tar -czf $BACKUP_DIR/world-$DATE.tar.gz -C $MINECRAFT_DIR $WORLD_NAME
# Keep only the last 7 backups
find $BACKUP_DIR -name "world-*.tar.gz" -type f -mtime +7 -delete
3. Make the script executable:
chmod +x ~/minecraft/backup.sh
4. Set up a cron job to run backups automatically:
crontab -e
5. Add this line to run backups daily at 3 AM:
0 3 * * * /home/mcuser/minecraft/backup.sh
This backup system preserves your world data while automatically removing older backups to save space.
Performance Optimization
Optimizing your Minecraft server improves player experience and maximizes hardware utilization.
Java Virtual Machine Optimization
Fine-tune JVM arguments in your startup script based on your server’s RAM:
For servers with 4GB RAM dedicated to Minecraft:
java -Xms3G -Xmx3G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -jar minecraft_server.1.20.6.jar nogui
server.properties Optimization
Edit server.properties to balance performance and gameplay:
view-distance=8
simulation-distance=6
entity-broadcast-range-percentage=75
max-tick-time=60000
network-compression-threshold=256
World Pre-generation
Pre-generating chunks reduces lag when players explore:
- Install a pre-generation plugin (if using Paper/Spigot)
- Define world borders to limit world size
- Run the pre-generation command to create all chunks within borders
These optimizations help maintain stable TPS (ticks per second) even with multiple players exploring your world.
Installing and Configuring Plugins
Plugins extend your server’s functionality and can enhance gameplay, administration, and performance.
Installing a Plugin Manager
If using Paper or Spigot, download the server software and install it:
cd ~/minecraft/server
wget https://papermc.io/api/v2/projects/paper/versions/1.20.6/builds/latest/download -O paper.jar
mv paper.jar minecraft_server.1.20.6.jar
Create a plugins directory:
mkdir -p ~/minecraft/server/plugins
Essential Plugins for New Servers
- CoreProtect: Tracks block changes and allows rollbacks of griefing
- Essentials: Provides basic commands and features
- LuckPerms: Advanced permission management
- WorldGuard: Defines protected regions in your world
To install a plugin:
- Download the plugin JAR from a trusted source like SpigotMC
- Place the JAR file in the plugins directory
- Restart your server
- Configure the plugin using its configuration files in the plugins directory
Remember that each plugin consumes additional server resources, so only install what you need.
Troubleshooting Common Issues
Even with careful setup, issues can arise. Here are solutions to common problems.
Server Won’t Start
- Check Java installation:
java -version
- Verify file permissions:
ls -l ~/minecraft/server/ chmod +x ~/minecraft/server/minecraft_server.1.20.6.jar
- Check logs for errors:
cat ~/minecraft/server/logs/latest.log
Connection Problems
- Verify the server is running:
sudo systemctl status minecraft.service
- Check firewall settings:
sudo firewall-cmd --list-all
- Verify port forwarding on your router
- Try connecting using the local IP address first:
localhost:25565
Performance Lag
- Monitor server resources:
top -u mcuser
- Check server TPS (ticks per second) using in-game commands if plugins support it
- Reduce view-distance in server.properties
- Optimize JVM arguments for your specific hardware
Advanced Configuration Options
Once your server is running smoothly, consider these advanced options to enhance your Minecraft experience.
Custom World Generation
Customize your world during creation with special seeds or generation settings:
level-seed=12345
level-type=default
generator-settings={}
Resource Packs
Server-wide resource packs change the game’s appearance for all players:
- Host your resource pack on a file sharing service
- Get the direct download URL
- Generate the SHA-1 hash of your resource pack
- Add to server.properties:
resource-pack=YOUR_DOWNLOAD_URL resource-pack-sha1=YOUR_PACK_SHA1
Multi-Server Setup
For larger communities, consider multiple specialized servers:
- Set up separate Minecraft servers on different ports
- Install a proxy like Velocity or BungeeCord
- Configure the proxy to connect your servers
This advanced setup allows for specialized worlds (survival, creative, minigames) while maintaining a unified player experience.
Congratulations! You have successfully installed Minecraft. Thanks for using this tutorial for installing the Minecraft server on your Fedora 41 system. For additional help or useful information, we recommend you check the official Minecraft website.