How To Install Minecraft Server on AlmaLinux 10
Setting up a Minecraft server on AlmaLinux 10 opens doors to unlimited gaming possibilities. This comprehensive guide walks you through every step needed to create a stable, secure, and high-performance Minecraft server environment.
AlmaLinux 10 represents the perfect foundation for hosting game servers. Its enterprise-grade stability, robust security features, and excellent resource management make it an ideal choice for both beginners and experienced server administrators. Unlike other Linux distributions, AlmaLinux offers the reliability of Red Hat Enterprise Linux without the licensing costs.
Self-hosting your Minecraft server provides complete control over gameplay settings, player management, and server performance. You’ll eliminate monthly hosting fees while gaining valuable Linux administration experience. This tutorial requires approximately 30-45 minutes to complete, assuming basic familiarity with Linux command-line operations.
Understanding AlmaLinux 10 for Minecraft Server Hosting
Why Choose AlmaLinux 10 for Game Servers
AlmaLinux 10 delivers enterprise-grade stability that ensures your Minecraft server runs smoothly without unexpected crashes or performance degradation. The distribution maintains full compatibility with Red Hat Enterprise Linux, providing access to extensive documentation and community support resources.
The DNF package manager simplifies software installation and updates, making server maintenance significantly easier compared to other Linux distributions. Security updates arrive regularly through official repositories, ensuring your server remains protected against vulnerabilities.
Performance Advantages
AlmaLinux 10 optimizes system resources efficiently, allowing more memory allocation to your Minecraft server application. The kernel includes performance enhancements specifically designed for server workloads, resulting in better frame rates and reduced latency for players.
Long-term support guarantees compatibility with future Minecraft updates while maintaining system stability. This reliability proves crucial for servers with established player communities who expect consistent uptime.
System Requirements and Hardware Planning
Minimum Hardware Specifications
Your AlmaLinux 10 system needs adequate resources to run Minecraft server smoothly. Minimum requirements include:
- CPU: Dual-core processor running at 3.0+ GHz
- RAM: 4GB system memory (8GB recommended for optimal performance)
- Storage: 20GB available disk space (SSD strongly recommended)
- Network: Stable internet connection with 10+ Mbps upload speed
Recommended Hardware Configuration
For enhanced performance and larger player capacity, consider these specifications:
- CPU: 6-core processor for supporting 30+ concurrent players
- RAM: 16GB total system memory for smooth gameplay
- Storage: 100-200GB SSD for world data, backups, and system files
- Bandwidth: 1 Gbps connection for lag-free multiplayer experience
Scalability Planning
Player capacity directly correlates with available system resources. Each active player typically requires 50-100MB of RAM, depending on world complexity and installed plugins. Plan hardware upgrades based on expected community growth.
Storage requirements increase over time as world files expand. Minecraft worlds can grow to several gigabytes, especially with extensive player building and exploration. Regular backups multiply storage needs significantly.
Pre-Installation System Preparation
Updating AlmaLinux 10 System
Begin by updating your AlmaLinux 10 installation to ensure all packages reflect the latest security patches and features:
sudo dnf update -y
sudo dnf upgrade -y
This process may take several minutes depending on your internet connection and installed packages. Reboot your system if kernel updates were applied:
sudo reboot
Security Hardening
Configure firewall settings before installing server software. AlmaLinux 10 includes firewalld by default:
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo firewall-cmd --state
Create a dedicated user account for running the Minecraft server. This security measure prevents potential vulnerabilities from affecting system-wide operations:
sudo useradd -m -s /bin/bash minecraft
sudo passwd minecraft
Network Configuration
Configure a static IP address for your server to ensure consistent connectivity. Edit the network configuration file:
sudo nmcli connection show
sudo nmcli connection modify [connection-name] ipv4.addresses [your-static-ip]/24
sudo nmcli connection modify [connection-name] ipv4.gateway [your-gateway]
sudo nmcli connection modify [connection-name] ipv4.dns [dns-server]
sudo nmcli connection modify [connection-name] ipv4.method manual
Installing Required Dependencies
Java Installation Process
Minecraft server requires Java to run properly. Modern Minecraft versions need Java 17 or later. Install OpenJDK using DNF:
sudo dnf install java-17-openjdk java-17-openjdk-headless -y
For the latest Minecraft versions, Java 21 provides better performance:
sudo dnf install java-21-openjdk java-21-openjdk-headless -y
Verify the installation and check the Java version:
java -version
javac -version
Screen Utility Installation
The screen utility allows your Minecraft server to run in the background, continuing operation even after you disconnect from SSH:
sudo dnf install screen -y
Screen provides essential functionality for server management. Learn basic screen commands:
screen -S minecraft
– Create new session named “minecraft”Ctrl+A, D
– Detach from screen sessionscreen -r minecraft
– Reattach to sessionscreen -list
– Show all active sessions
Essential System Packages
Install additional utilities for server management and file handling:
sudo dnf install wget curl git nano vim htop -y
These tools provide:
- wget/curl: Download files from the internet
- git: Version control for configuration files
- nano/vim: Text editors for configuration
- htop: System resource monitoring
Downloading and Setting Up Minecraft Server
Creating Server Directory Structure
Switch to the minecraft user account and create a dedicated directory structure:
sudo su - minecraft
mkdir -p ~/minecraft-server
cd ~/minecraft-server
Organize files properly to maintain clean server management:
mkdir -p backups logs scripts plugins
Downloading Official Minecraft Server
Download the latest Minecraft server JAR file from the official Minecraft website. Replace the URL with the current version:
wget https://launcher.mojang.com/v1/objects/[hash]/server.jar
Alternatively, download a specific version:
wget https://launcher.mojang.com/v1/objects/[version-hash]/server.jar -O minecraft-server-[version].jar
Verify the download completed successfully:
ls -la *.jar
Initial Server Configuration
Run the server for the first time to generate configuration files:
java -Xmx2G -Xms1G -jar server.jar nogui
This command will fail because you haven’t accepted the EULA yet. Edit the generated eula.txt
file:
nano eula.txt
Change eula=false
to eula=true
and save the file.
Basic Server Properties Configuration
Edit the server.properties file to configure basic settings:
nano server.properties
Key configuration options include:
server-port=25565
difficulty=normal
gamemode=survival
max-players=20
view-distance=10
simulation-distance=10
online-mode=true
pvp=true
spawn-protection=16
white-list=false
motd=Welcome to My AlmaLinux Minecraft Server
Firewall Configuration and Security
Configuring Firewalld
Open port 25565 for Minecraft traffic through the firewall:
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --permanent --add-port=25565/udp
sudo firewall-cmd --reload
Verify the firewall rules:
sudo firewall-cmd --list-all
Network Security Measures
Install and configure fail2ban for additional security:
sudo dnf install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
Create a custom jail for SSH protection:
sudo nano /etc/fail2ban/jail.local
Add the following configuration:
[DEFAULT]
bantime = 3600
findtime = 600
maxretry = 3
[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/secure
maxretry = 3
Additional Security Hardening
Disable root login and configure SSH key authentication:
sudo nano /etc/ssh/sshd_config
Modify these settings:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
Restart SSH service:
sudo systemctl restart sshd
Server Launch and Initial Testing
Starting the Minecraft Server
Create a startup script for easy server management:
nano ~/minecraft-server/start.sh
Add the following content:
#!/bin/bash
cd ~/minecraft-server
java -Xmx4G -Xms2G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar server.jar nogui
Make the script executable:
chmod +x ~/minecraft-server/start.sh
Launching in Screen Session
Start the server using screen for background operation:
screen -S minecraft
./start.sh
Detach from the screen session using Ctrl+A, D
. The server continues running in the background.
Performance Monitoring
Monitor server performance using various tools:
htop
Check Java process resource usage:
ps aux | grep java
Monitor network connections:
ss -tulpn | grep :25565
Advanced Configuration and Optimization
JVM Performance Tuning
Optimize Java Virtual Machine settings for better performance. The startup script includes Aikar’s flags, which provide excellent performance for Minecraft servers:
-XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled
Memory Allocation Optimization
Calculate optimal memory allocation based on available system RAM:
- 4GB System RAM: -Xmx2G -Xms1G
- 8GB System RAM: -Xmx4G -Xms2G
- 16GB System RAM: -Xmx8G -Xms4G
Leave at least 2GB for the operating system and other processes.
Server Properties Advanced Settings
Fine-tune server performance through server.properties modifications:
view-distance=8
simulation-distance=6
entity-broadcast-range-percentage=80
network-compression-threshold=256
player-idle-timeout=30
These settings balance performance with gameplay experience. Lower values improve performance but may affect gameplay quality.
Plugin Support Configuration
For enhanced server functionality, consider installing Spigot or Paper instead of vanilla Minecraft server:
wget https://download.getbukkit.org/spigot/spigot-[version].jar
Or download Paper for better performance:
wget https://papermc.io/api/v2/projects/paper/versions/[version]/builds/[build]/downloads/paper-[version]-[build].jar
Troubleshooting Common Issues
Java Installation Problems
If Java installation fails, check available packages:
sudo dnf search openjdk
Remove conflicting Java versions:
sudo dnf remove java-*-openjdk
Reinstall the correct Java version:
sudo dnf install java-17-openjdk java-17-openjdk-headless -y
Port Binding Issues
Verify port availability before starting the server:
sudo netstat -tulpn | grep :25565
If the port is in use, identify the process:
sudo lsof -i :25565
Kill the conflicting process if necessary:
sudo kill -9 [PID]
Memory and Performance Issues
Monitor memory usage during server operation:
free -h
top -p $(pgrep -f minecraft)
If experiencing memory issues, adjust JVM settings:
-Xmx2G -Xms1G -XX:+UseG1GC -XX:MaxGCPauseMillis=50
Connection Timeout Problems
Test network connectivity from external networks:
telnet [your-server-ip] 25565
Check firewall rules and router port forwarding configuration. Verify the server is listening on the correct interface:
sudo ss -tulpn | grep :25565
World Generation Errors
If world generation fails, check available disk space:
df -h
Verify file permissions in the server directory:
ls -la ~/minecraft-server/
Reset file permissions if needed:
chmod -R 755 ~/minecraft-server/
chown -R minecraft:minecraft ~/minecraft-server/
Maintenance and Long-term Management
Automated Backup System
Create a backup script for regular world saves:
nano ~/minecraft-server/backup.sh
Add the following content:
#!/bin/bash
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
BACKUP_DIR="~/minecraft-server/backups"
WORLD_DIR="~/minecraft-server/world"
mkdir -p $BACKUP_DIR
tar -czf $BACKUP_DIR/world_backup_$DATE.tar.gz $WORLD_DIR
find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -delete
Schedule automatic backups using cron:
crontab -e
Add this line for daily backups at 3 AM:
0 3 * * * /home/minecraft/minecraft-server/backup.sh
Server Update Management
Create an update script for easy server maintenance:
nano ~/minecraft-server/update.sh
#!/bin/bash
echo "Stopping server..."
screen -S minecraft -X stuff "stop\n"
sleep 30
echo "Backing up current server..."
cp server.jar server.jar.backup
echo "Downloading latest server..."
wget https://launcher.mojang.com/v1/objects/[latest-hash]/server.jar -O server.jar.new
mv server.jar.new server.jar
echo "Starting server..."
screen -S minecraft -d -m ./start.sh
Performance Monitoring
Set up continuous monitoring for server health:
nano ~/minecraft-server/monitor.sh
#!/bin/bash
LOG_FILE="~/minecraft-server/logs/performance.log"
echo "$(date): CPU: $(top -bn1 | grep "Cpu(s)" | awk '{print $2}'), Memory: $(free -m | awk 'NR==2{printf "%.2f%%\n", $3*100/$2}')" >> $LOG_FILE
Schedule monitoring every 15 minutes:
*/15 * * * * /home/minecraft/minecraft-server/monitor.sh
Advanced Tips and Best Practices
Community Management
Implement whitelist functionality for better server control:
# Enable whitelist in server.properties
white-list=true
Add trusted players through the server console:
screen -r minecraft
whitelist add [playername]
Multi-Server Network Setup
For advanced configurations, consider setting up multiple server instances:
mkdir -p ~/minecraft-network/{survival,creative,minigames}
Each server requires separate configuration files and port assignments. Use different ports (25565, 25566, 25567) for each instance.
Security Best Practices
Implement regular security audits:
sudo dnf update -y
sudo fail2ban-client status
sudo firewall-cmd --list-all
Monitor system logs for suspicious activity:
sudo tail -f /var/log/secure
sudo journalctl -u sshd -f
Performance Optimization
Regular maintenance tasks improve server longevity:
# Clean temporary files
sudo dnf clean all
sudo rm -rf /tmp/*
# Optimize system performance
sudo systemctl disable unnecessary-service
sudo systemctl stop unnecessary-service
Monitor disk usage and clean old log files:
du -sh ~/minecraft-server/logs/
find ~/minecraft-server/logs/ -name "*.log" -mtime +30 -delete
Congratulations! You have successfully installed Minecraft. Thanks for using this tutorial for installing the Minecraft server on your AlmaLinux OS 10 system. For additional help or useful information, we recommend you check the official Minecraft website.