Category: Linux

Linux is often used as the OS for Minecraft Server software. Here are all the blog posts about it!

  • Minecraft Server Networking: Port Forwarding & Tunnels Guide

    Minecraft Server Networking: Port Forwarding & Tunnels Guide

    You’ve built the perfect Minecraft server on a powerful machine at home. The plugins are tuned, the world is pre-generated, and you’re ready to invite the world. You send your public IP address to a friend, but they can’t connect. The console shows a connection attempt, then nothing. You’ve just hit the most common wall for server admins: the home network firewall. This single hurdle stops countless aspiring server owners dead in their tracks.

    Understanding basic networking isn’t just for IT professionals—it’s a core survival skill for any Minecraft admin. Whether you’re trying to start a Minecraft server for friends on your home connection, securely access a remote server’s console, or connect a BungeeCord network across different data centers, you need to grasp ports, forwarding, and tunnels.

    I’ve configured networks for servers with thousands of players and walked countless friends through opening their first port. The confusion is universal, but the solutions are straightforward. This guide will demystify the concepts, provide clear, step-by-step instructions, and introduce you to powerful tools like SSH tunnels that can solve problems when traditional methods fail. Let’s open the gates.

    The Foundation: What is a Network Port?

    Think of your server’s IP address as a street address for an apartment building. The port number is the specific apartment number. Data intended for different services (web, email, Minecraft) arrives at the same building (IP) but needs to be delivered to the correct apartment (port).

    • Minecraft Java Edition uses, by default, TCP port 25565.
    • A web server uses port 80 (HTTP) or 443 (HTTPS).
    • SSH uses port 22.

    Your home router acts as a security guard for this building. By default, it blocks all incoming connection attempts to all apartments (ports) unless it has explicit instructions to allow them. This is a good security practice, but it means your Minecraft server is invisible to the internet.

    Method 1: Port Forwarding – The Direct Approach

    Port Forwarding (or DNAT) is you, the admin, giving your router a permanent rule: “Any incoming traffic destined for port 25565 on my public IP should be sent directly to the computer with local IP 192.168.1.100 on that same port.”

    Step-by-Step: How to Port Forward for Minecraft

    Step 1: Prepare Your Server Machine

    1. Set a Static Local IP (Reservation): This is critical. You cannot forward to a computer whose IP changes. Do this in your router’s DHCP settings by reserving an IP for your server’s MAC address (e.g., 192.168.1.100).
    2. Know Your Default Gateway: Usually 192.168.1.1 or 192.168.0.1. This is your router’s address.
    3. Disable Firewalls (Temporarily for Testing): Turn off Windows Defender Firewall or ufw on Linux to rule it out. Re-enable and configure it later once it’s working.

    Step 2: Access Your Router

    1. Open a web browser and go to your router’s IP (e.g., http://192.168.1.1).
    2. Log in (check the router’s label for default credentials; you may have changed them).

    Step 3: Create the Forwarding Rule
    The menu label varies: “Port Forwarding,” “Virtual Servers,” “NAT,” or “Applications & Gaming.”
    You will need to fill in:

    • Service Name: Minecraft Server
    • External Port: 25565
    • Internal Port: 25565
    • Protocol: TCP (sometimes TCP/UDP; choose TCP for Minecraft).
    • Internal IP Address: Your server’s static IP (e.g., 192.168.1.100).

    Step 4: Test It

    1. Find your public IP: Visit https://icanhazip.com from your server machine.
    2. Give this IP (and port, if not 25565) to a friend. Have them connect.
    3. Use an online port checker tool (like https://www.yougetsignal.com/tools/open-ports/) to verify port 25565 is open.

    The Pros and Cons of Port Forwarding

    ProsCons
    Best Performance: Direct connection, lowest latency.Security Risk: Exposes a port directly to the internet.
    Simple for Players: Just an IP/domain to connect to.ISP Dependent: Some ISPs block ports or use CGNAT (more on this later).
    No Third-Party Needed: You control everything.Requires Router Access: Impossible on restricted networks (dorms, offices).

    Method 2: Tunnels – The Clever Workaround

    What if you can’t port forward? Your ISP uses CGNAT, you’re at a university, or your router is locked down. This is where tunneling comes in. You “tunnel” your Minecraft traffic through an allowed connection (usually outbound HTTPS on port 443) to a middleman server on the internet, which then forwards traffic to your players.

    Option A: SSH Tunneling (The Sysadmin’s Swiss Army Knife)

    If you have a VPS or any Linux server with a public IP, you can use SSH to create a secure tunnel. This is incredibly useful for more than just Minecraft.

    The Scenario: Your home server cannot be port forwarded. You have a cheap VPS at vps.yourserver.com.

    The Command (On Your Home Server):

    bash

    ssh -N -R 25565:localhost:25565 [email protected]
    • -N: Don’t execute a remote command; just forward ports.
    • -R: Remote port forwarding. It means: “On the VPS, listen on port 25565 and forward all traffic back through this SSH connection to my local machine’s port 25565.”

    Result: Players connect to vps.yourserver.com:25565. The traffic is tunneled through the SSH connection to your home server.

    Making it Permanent: Use systemd or autossh to keep the connection alive. Our guide on [Mastering the Linux Command Line: 10 Commands Every Minecraft Admin Must Know] covers managing services.

    Option B: Cloudflare Tunnel (Modern & Secure)

    Cloudflare Tunnel (formerly Argo Tunnel) is a powerful, free* tool that creates a secure outbound connection from your server to Cloudflare’s edge network.

    1. Install the cloudflared daemon on your server.
    2. Authenticate it with your Cloudflare account (which manages your domain).
    3. Create a tunnel that maps mc.yourdomain.com to localhost:25565.

    Benefits:

    • No open ports on your router. The connection is outbound only.
    • Your home IP is hidden. Players see only Cloudflare’s IPs.
    • Includes basic DDoS protection from Cloudflare’s network.

    Consideration: It adds a tiny bit of latency and is against Cloudflare’s ToS for pure proxy of non-web traffic, though it’s widely used for small Minecraft servers. For a large public Minecraft server, a proper VPS is recommended.

    Option C: Ngrok & PlayIt.gg (The Quickest Fix)

    Services like Ngrok and PlayIt.gg are designed for instant tunneling.

    • How it works: Run a small client on your server. It connects to their service and gives you a temporary public URL (e.g., abc123.ngrok.io).
    • Pros: Dead simple, works in seconds, no router config.
    • Cons: Free tiers are slow, have session limits, and URLs change. Not suitable for a permanent Minecraft server hosting solution, but perfect for temporary testing or sharing a world with a friend.

    The Dreaded CGNAT: Why Port Forwarding Sometimes Can’t Work

    Many ISPs (especially mobile/cable) use Carrier-Grade NAT (CGNAT). Your router gets a private IP from the ISP (e.g., 100.64.x.x), not a true public IP. You’re behind two routers: yours and the ISP’s. You can forward on your router, but the ISP’s router blocks it.

    How to check: Compare your router’s WAN/IP address to your public IP from icanhazip.com. If they differ, you’re likely behind CGNAT.

    Solutions:

    1. Call your ISP: Request a public, static IP. They may offer this for a fee.
    2. Use a Tunnel: All tunnel methods (SSH, Cloudflare, PlayIt.gg) bypass CGNAT perfectly, as they initiate an outbound connection.
    3. Use a VPS: The most professional solution. Run the server directly on a VPS. Our guide on [Self-Hosting vs. VPS: Which is Better for Your Minecraft Community?] breaks down this decision.

    Common Mistakes & Pro-Tips

    Mistakes:

    • Forgetting the Local Firewall: You forwarded the port but your OS firewall (Windows Defender, ufw) is still blocking it. Check it!
    • Dynamic IP on Server: Your server’s local IP changed, breaking the forward.
    • Wrong Protocol: Forwarding UDP instead of TCP.
    • Testing from Inside the Network: Some routers don’t support “hairpinning” – you can’t use your public IP to connect from inside the same network. Test from an external connection (phone on cellular data) or use the local IP internally.

    Pro-Tips:

    • Use a Dynamic DNS (DDNS): Your home IP changes. Use a free DDNS service (like DuckDNS or No-IP) to get a domain like myserver.duckdns.org that automatically updates. Point players here.
    • Change Your Default Port: Forward a non-standard external port (e.g., 55555) to internal 25565. This reduces random scan noise. Players connect using your.ip:55555. An SRV record in your DNS can hide the port for a domain.
    • Combine with a Reverse Proxy: For networks, tools like Traefik or NGINX can manage multiple services (website, server, panel) on one IP/port using hostnames.
    • Secure Your Open Port: Once it works, re-enable your OS firewall, allowing only port 25565. Implement connection-limiting plugins like [AntiBot] to mitigate brute-force connection floods.

    FAQ: People Also Ask

    Q: Is port forwarding safe for my home network?
    A: It introduces risk by exposing a service. The risk is managed by: 1) Keeping your server software (Paper/Purpur) and Java updated. 2) Using strong passwords and SSH keys (see [Hardening Your Linux Server]). 3) Running the server under a non-root user. 4) Using a firewall on the server itself. For a low-risk home server with friends, it’s generally acceptable.

    Q: What’s the difference between TCP and UDP? Minecraft uses TCP, right?
    A: Correct, the main Minecraft Java server uses TCP for its reliable, ordered connection. The Query protocol (for server lists) uses UDP. Bedrock Edition uses UDP. For basic forwarding, you only need TCP. If you want your server to show up in LAN lists or have a full status on listing sites, you may also need to forward UDP port 19132 (Bedrock) and enable query in server.properties.

    Q: Can I host a server without port forwarding?
    A: Yes, absolutely. This is the entire purpose of tunneling services (PlayIt.gg, Ngrok) or using a reverse SSH tunnel with a VPS. These methods create an outbound connection that bypasses the need for an open incoming port.

    Q: My server works locally but not publicly. What’s wrong?
    A: Follow this checklist:

    1. Test from outside (cellular data).
    2. Verify static IP for server.
    3. Verify router port forward rule is correct and enabled.
    4. Disable OS firewall temporarily to test.
    5. Check for CGNAT.
    6. Ensure your Minecraft server is actually running and bound to 0.0.0.0 (all interfaces), not 127.0.0.1.

    Q: What is an SRV record and do I need one?
    A: An SRV record is a DNS record that allows you to point a domain (e.g., mc.yourserver.com) to a specific IP and port. So players can just type mc.yourserver.com without adding :25565. Essential for a professional-looking server if you don’t use the default port.

    Conclusion: Choose Your Path and Connect Your World

    Networking is the bridge between your private server and your public community. Port forwarding is the sturdy, direct bridge you control. Tunnels are the ingenious rope bridges you deploy when the terrain (CGNAT, restricted networks) doesn’t allow for the first.

    Your mission is clear: identify your constraints and apply the right solution. For a permanent, performance-focused Minecraft server hosting setup, pursue a true public IP and port forward with security in mind. For quick testing, temporary access, or to bypass ISP restrictions, master the use of a simple tunnel.

    Don’t let networking be the reason your amazing server remains empty. Take 30 minutes tonight to walk through the steps for your setup. The moment you see that first successful external connection, a whole new dimension of server ownership opens up.

    Call to Action: Start by diagnosing your situation. Get your public IP and compare it to your router’s WAN IP. If they match, dive into your router settings and set a static IP for your server. If they differ, sign up for a free DuckDNS account and test the PlayIt.gg client to experience tunneling firsthand. The path to a connected server is right in front of you.

  • Minecraft Server DDoS Protection: Keep Your Server Online

    Minecraft Server DDoS Protection: Keep Your Server Online

    Your server is finally thriving. You’ve cracked the code on performance with our guide on [The CPU Tier List 2026], and your community is growing. Then, it happens. Your TPS plummets to zero. The console floods with disconnected players. Your SSH session freezes. You’ve just joined the ranks of server owners facing a Distributed Denial of Service (DDoS) attack. It’s not a matter of if  but when for any successful public Minecraft server.

    In my years of managing large networks, I’ve weathered attacks ranging from petty griefers with booter services to coordinated strikes from competing servers. The feeling of helplessness is universal, but it’s also preventable. Relying solely on your host’s basic protection is a recipe for disaster when you run a dedicated server. True resilience requires a layered defense you control.

    This deep dive moves beyond scare tactics and into actionable strategy. We’ll dissect the types of DDoS attacks that target Minecraft, build a multi-layered defense from the server level up to the network edge, and create an incident response plan. Your goal isn’t just to survive an attack—it’s to make your server such a hardened target that attackers move on to easier prey.

    Understanding the Enemy: How DDoS Attacks Target Minecraft Servers

    A DDoS attack aims to overwhelm your server’s resources with malicious traffic, making it unavailable to legitimate players. For Minecraft, this typically manifests in a few key vectors:

    1. Volumetric Attacks: The most common. The attacker’s botnet floods your server’s IP address with more data (Gbps) than your network port can handle. This saturates your bandwidth, causing packet loss and timeouts.
    2. Protocol/State-Exhaustion Attacks: These target server resources. A classic is the Minecraft connection flood, where thousands of bogus connection requests (SYN packets in TCP, or even partial Minecraft handshakes) are sent, exhausting your server’s available connection states and memory.
    3. Application-Layer Attacks: More sophisticated. These attack the Minecraft server application itself. They might send malformed packets that cause high CPU usage, exploit plugin vulnerabilities, or simulate thousands of player logins. These are harder to filter as they use “legitimate” protocols.

    The Reality: Most attacks against mid-sized Minecraft server hosting setups are volumetric or simple connection floods, often purchased for as little as $20 from a “booter” or “stresser” site.

    Building Your Layered Defense: The Onion Strategy

    Effective DDoS protection is like an onion—multiple layers that an attack must penetrate. If one layer fails, the next holds the line.

    Layer 1: The Host & Network Edge (Your First Line of Defense)

    This is the most critical layer. You must choose a host that provides robust infrastructure.

    • Dedicated Server with DDoS Protection: Your provider should offer always-on, network-level DDoS mitigation. Look for providers like OVH (which has its own robust network and VAC), Hetzner, or ReliableSite that advertise “Tbps-scale” scrubbing centers.
    • What to Ask Your Host:
      • “What is the mitigation capacity (in Gbps/Tbps)?”
      • “Is mitigation always-on or on-demand (manual activation)?” Always-on is vastly superior.
      • “Does protection cover all attack vectors (L3/L4 Volumetric, L7 Application)?”
      • “What is the process and time-to-mitigate during an attack?”

    ⚠️ Warning: Cheap, unshielded dedicated servers or poorly configured VPS plans offer zero protection. An attack on your IP will result in your host null-routing you (dropping all traffic to your IP) to protect their network, taking you offline for hours or days.

    Layer 2: The Operating System & Firewall (Filtering the Noise)

    Once traffic passes your host’s scrubbers, your server’s own firewall can drop junk packets. This is where the skills from our guide on [Hardening Your Linux Server: A Guide to SSH Keys and UFW Firewalls] become critical.

    • Linux Firewall (iptables/nftables) Advanced Rules: UFW is simple, but for DDoS filtering, we go deeper. Consider implementing rate-limiting rules on your Minecraft port. # Example iptables rule to limit connections per IP (adjust as needed) iptables -A INPUT -p tcp --dport 25565 -m state --state NEW -m recent --set --name MC iptables -A INPUT -p tcp --dport 25565 -m state --state NEW -m recent --update --seconds 30 --hitcount 5 --name MC -j DROP This allows a maximum of 5 new connections per 30 seconds from a single IP to port 25565.
    • TCP Tuning: Harden your system against SYN floods
      # Edit /etc/sysctl.conf net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_syn_backlog = 2048 net.ipv4.tcp_synack_retries = 2

    Layer 3: The Proxy & Software Layer (Intelligent Filtering)

    This is your most powerful and flexible line of defense for application-layer attacks.

    1. Use a Proxy (Non-Negotiable): Never expose your main game server directly. Route all traffic through Velocity or Waterfall.
      • Why it helps: The proxy acts as a buffer. It can handle connection handshakes and filtering, passing only legitimate, established connections to your backend game servers. If the proxy is overwhelmed, your game worlds remain safe and you can restart the proxy independently.
    2. Install DDoS Protection Plugins: These are essential for Minecraft servers.
      • AntiBot: The industry standard for fighting connection floods. It intelligently challenges new connections, blocking bots while letting real players through.
      • ExploitFixer: Patches network-level exploits and malformed packets that can crash servers or cause high CPU.
      • ProtocolLib (with custom filters): Advanced admins can use ProtocolLib to detect and drop abnormal packet rates.
    3. Configure server.properties for Resilience:
      • network-compression-threshold=512 (Higher values reduce CPU load during floods).
      • Set a conservative max-players limit.

    Layer 4: The Architectural Layer (Redundancy & Obfuscation)

    • Use a Reverse Proxy/DDoS Protected Host for DNS: Don’t point your A record (mc.yourserver.com) directly to your game server IP. Use a service like Cloudflare (proxied, orange cloud). While Cloudflare doesn’t proxy Minecraft TCP traffic (only HTTP/HTTPS), it protects your website and Discord bridge, and obscures your real server IP from public DNS records.
    • Have a Fallback IP/Port Ready: Some attacks target a specific IP and port. Having a secondary port configured on your proxy and the ability to quickly update DNS can bypass simple attacks. Use SRV records to seamlessly redirect players.

    Step-by-Step: What to Do When You Are Under Attack

    Stay calm. Follow this checklist.

    1. Diagnose: Is it a DDoS? Use iftop or nethogs to see inbound traffic. Check your host’s control panel for traffic graphs. If bandwidth is maxed, it’s volumetric.
    2. Activate Host Mitigation (if not auto): Log into your host’s panel and trigger their DDoS mitigation.
    3. Divert Traffic: If you use Cloudflare for a web panel, activate “Under Attack Mode.” Change your Minecraft server’s DNS SRV record to point to a backup proxy IP/port if you have one.
    4. Enable Software Protections: Ensure AntiBot is enabled and set to a aggressive mode. Restart your proxy to clear connection states.
    5. Communicate: Inform your staff and players via Discord, Twitter, or your website. Transparency builds trust. “We are experiencing a DDoS attack. Mitigation is in progress. We expect downtime of ~30 mins.”
    6. Collect Evidence: Take screenshots of traffic graphs, firewall logs, and any attacker threats. Report the attack to your hosting provider and, if you have threats, to relevant authorities.
    7. Post-Attack Analysis: Once mitigated, analyze logs. Identify the source IPs (often spoofed) and attack patterns. Update your firewall rules and plugin configurations accordingly.

    Common Mistakes & Pro-Tips

    Mistakes:

    • Exposing Your True IP: Sharing your direct IP in Discord, videos, or logs. Always use a domain name.
    • Using Default Ports: Running on 25565 makes you an easy target. Use a non-standard port and an SRV record.
    • Ignoring Plugins Until It’s Too Late: AntiBot should be installed on day one.
    • Thinking a VPS is “Safe Enough”: Unshielded VPS are the easiest targets. Their limited bandwidth caps are instantly saturated.

    Pro-Tips:

    • Relationship with Your Host: Have a direct support line. Knowing how to quickly open a ticket for mitigation is key.
    • Test Your Defenses: Consider a controlled stress test (from a legitimate service) to see how your setup holds up before a real attack.
    • Keep Offsite Backups: An attacker might follow a DDoS with an attempt to compromise your server. Ensure your world and plugin configs are backed up off-site, as detailed in our [Minecraft Server Security: Anti-Cheat, Backups, and DDoS Protection] guide.

    FAQ: People Also Ask

    Q: Can a plugin really stop a DDoS attack?
    A: No. A plugin cannot stop a volumetric network flood. It can only stop application-layer attacks (like connection floods or exploit packets). True DDoS protection happens at the network level, provided by your host. Plugins are a critical complementary layer.

    Q: Is Cloudflare a good solution for Minecraft DDoS protection?
    A: For the Minecraft TCP traffic itself, no. Cloudflare’s proxy only works for HTTP/HTTPS traffic (your website). However, using Cloudflare to hide your server’s real IP in DNS records is a very good practice. It protects auxiliary services and adds obfuscation.

    Q: How can I find out my server’s real IP if it’s hidden behind Cloudflare?
    A: Don’t. And prevent leaks. Ensure your server does not expose its IP in MOTDs, plugin messages, or through mods like ViaVersion. If you must know, it’s in your hosting panel—not in public DNS.

    Q: My host null-routed me. What does that mean and what do I do?
    A: Null-routing (or blackholing) means your host has configured their routers to drop all traffic to your IP to protect their network. You are offline. You must contact support, wait for the attack to subside, and request the null route be lifted. This can take hours. This is why choosing a host with proper scrubbing instead of null-routing is crucial.

    Q: Are free DDoS protection services any good?
    A: For anything beyond a tiny private server, no. Free services lack the capacity, support, and granular control needed for a public Minecraft server under sustained attack. This is a critical budget item.

    Conclusion: Resilience is a Choice

    A DDoS attack is a test of your preparedness. In the competitive world of Minecraft server hosting, downtime is lost players and a damaged reputation. By investing in a shielded host, architecting your network with proxies, deploying intelligent plugins, and having a clear response plan, you transform from a victim into a resilient operator.

    Don’t wait for the flood to start building the ark. Review your current host’s DDoS policy today. Install AntiBot and ExploitFixer this week. Document your incident response plan. The cost of prevention is always less than the cost of recovery.

    Call to Action: Start with Layer 3—the easiest to control. If you haven’t already, download AntiBot and ExploitFixer and configure them now. Then, review your hosting plan. If it lacks always-on DDoS mitigation, begin researching a migration to a provider that makes security a priority. Your community’s stability depends on it.

  • Secure Your Minecraft Server: SSH Keys & UFW Firewall Guide

    Secure Your Minecraft Server: SSH Keys & UFW Firewall Guide

    Imagine logging into your Minecraft server console one morning to find your world replaced with obsidian, your donor ranks deleted, and a ransom note in the chat logs. This isn’t just scare tactics; it’s the daily reality for thousands of unprotected servers. As a server owner, your primary duty isn’t just to provide fun—it’s to provide a secure, stable home for your community. The bedrock of that security isn’t a fancy plugin; it’s your Linux server itself.

    Most guides on how to start a Minecraft server skip the most critical chapter: locking the front door. If you’ve followed our tutorials on performance, like [Aikar’s Flags Explained: The Secret to Perfect Garbage Collection], you’ve built a powerful machine. Now, we must fortify it. Two of the most effective, yet overlooked, security measures are SSH Key Authentication and the UFW firewall. Together, they stop over 99% of automated attacks cold.

    This guide is written from the trenches. I’ve managed servers that weathered sustained DDoS attacks and forensic-traced brute force attempts. I’ll walk you through, step-by-step, how to replace vulnerable password logins with uncrackable SSH keys and how to build a firewall that only lets in the traffic you want. This isn’t just theory; it’s the essential practice that separates an amateur setup from a professional, resilient Minecraft server hosting environment.

    Why Your Server is a Target (It’s Not Personal)

    Before we dive into commands, understand the threat. Your public Minecraft server has an IP address. Automated bots constantly scan the entire internet for open ports, especially SSH (port 22) and Minecraft (port 25565).

    • SSH Brute Force: Bots try thousands of common username/password combinations (like root/admin123) to gain shell access. If they succeed, they own your server.
    • DDoS & Exploitation: Open, unused ports can be probed for vulnerabilities or used in amplification attacks.

    Your goal is “minimal attack surface.” Only expose what’s necessary, and make that exposure as secure as possible.

    Part 1: Banishing Passwords – The Complete Guide to SSH Keys

    SSH (Secure Shell) is how you connect to your server’s command line. By default, it uses a username and password. We’re going to replace that with a cryptographic key pair—something you have (a private key file) instead of something you know (a password). It’s far more secure and, frankly, more convenient.

    Step-by-Step: Generating and Installing SSH Keys

    On Your Local Computer (Windows, Mac, or Linux):

    1. Open a Terminal (or PowerShell on Windows).
    2. Generate the Key Pair: Run the following command. You can use the default file location by pressing Enter. ssh-keygen -t ed25519 -a 100
      • -t ed25519: Uses the modern, secure Ed25519 algorithm. (If your older server doesn’t support it, use -t rsa -b 4096).
      • -a 100: Increases the key derivation function rounds, strengthening your passphrase.
      • It will prompt you for an optional passphrase. Use one. This adds a second factor: you need the key file and the passphrase.
    3. Locate Your Keys: This creates two files in ~/.ssh/ (or C:\Users\YourName\.ssh\ on Windows):
      • id_ed25519: Your PRIVATE KEY. Never, ever share this. It’s like the master key to your house.
      • id_ed25519.pub: Your PUBLIC KEY. This is what you install on the server.
    4. Copy the Public Key to Your Server: Use this command (replace user and yourserver.com):ssh-copy-id -i ~/.ssh/id_ed25519.pub [email protected] You’ll need to enter your password one last time. This copies your public key to the server’s ~/.ssh/authorized_keys file.

    On Your Linux Server (Via SSH):

    1. Test Key-Based Login: Log out and SSH back in: ssh [email protected]. You should be logged in with your key (and passphrase, if set). No password needed.
    2. The Critical Step: Disable Password Authentication.
      • Edit the SSH server config file: sudo nano /etc/ssh/sshd_config
      • Find and change these lines:bashPasswordAuthentication no PubkeyAuthentication yes
      • Optional but Recommended: Disable root login directly: PermitRootLogin no
      • Save the file (Ctrl+XYEnter).
      • Reload SSH: sudo systemctl reload sshd

    ⚠️ WARNING: Before you close your current SSH session, open a second terminal window and test logging in with your key. If it works, you’re golden. If it fails, you still have the first session open to fix the config. This prevents locking yourself out.

    The Pros and Cons of SSH Keys

    ProsCons
    Virtually Unbreakable: Immune to brute-force password attacks.Key Management: You must safeguard your private key. Lose it without a backup, and you’re locked out.
    More Convenient: No need to type passwords after initial setup (especially with an SSH agent).Learning Curve: Slightly more complex initial setup than a simple password.
    Enables Automation: Scripts (like backups) can run without storing passwords in plain text.Physical Access Required: To access from a new machine, you must transfer your key securely.

    Part 2: Building Your Digital Moat – Configuring the UFW Firewall

    A firewall controls what network traffic can enter or leave your server. The Uncomplicated Firewall (UFW) makes this simple. Think of it as a bouncer for your server’s ports.

    Step-by-Step: Basic UFW Configuration for Minecraft

    1. Check UFW Status: sudo ufw status. It likely says inactive.
    2. Set Default Policies (The “Deny All” Baseline): This is the security-first approach. sudo ufw default deny incoming # Block all incoming connections by default sudo ufw default allow outgoing # Allow all outgoing traffic (for updates, etc.)
    3. Allow SSH (ONLY from Trusted IPs – Advanced):
      • Standard (Less Secure): sudo ufw allow ssh or sudo ufw allow 22/tcp. This allows SSH from anywhere. If you use SSH keys, this is acceptable but not ideal.
      • Recommended (More Secure): Allow SSH only from your home/office IP. First, find your IP (search “what is my ip”). Then: sudo ufw allow from 203.0.113.5 to any port 22 proto tcpReplace 203.0.113.5 with your IP. This means only you can even attempt to SSH.

    SOME NETWORKS CHANGE THEIR PUBLIC IP! You will be locked out if it changes…

    1. Allow Minecraft: sudo ufw allow 25565/tcp. This is essential for your public Minecraft server.
    2. Optional but Smart: Allow Essential Services.
      • If you use a web panel (like Pterodactyl): sudo ufw allow 80/tcp (HTTP) and sudo ufw allow 443/tcp (HTTPS).
      • For monitoring: You might need to allow specific ports for metrics.
    3. Enable UFW: sudo ufw enable. Type y to confirm. Your rules are now active.

    View Your Rules: sudo ufw status numbered gives a clean list you can reference and delete from (e.g., sudo ufw delete [rule number]).

    Expert UFW Rules for Enhanced Security

    • Rate Limiting SSH: If you must leave SSH open to the world, rate-limit it to slow down brute-force attacks: sudo ufw limit ssh.
    • Allow Pings (ICMP): Helpful for diagnostics. sudo ufw allow icmp.
    • Port Knocking (Advanced): For paranoid-level security, hide your SSH port behind a “knock” sequence. Requires a separate daemon.

    Common Pitfalls & Pro-Tips

    1. Locking Yourself Out: The #1 mistake. Always test new SSH key logins and firewall rules in a parallel session before closing your main one. If you get locked out of a VPS, most providers like DigitalOcean or Linode have a “web console” or “recovery mode” you can use to regain access.
    2. Forgetting to Reload Services: Changing sshd_config or UFW rules requires a reload (systemctl reload sshdufw enable) to take effect.
    3. Not Backing Up Your Private Key: Store your id_ed25519 file in a secure password manager (like Bitwarden or 1Password) and/or on an encrypted USB drive.
    4. Ignoring Your Host’s Firewall: Many VPS providers (Hetzner, OVH, AWS) have their own network firewall. Use it in addition to UFW for a defense-in-depth approach. Our guide on [Minecraft Server Security: Anti-Cheat, Backups, and DDoS Protection] covers this layered strategy.
    5. Setting & Forgetting: Security is ongoing. Occasionally review your UFW rules (sudo ufw status) and SSH login attempts (sudo journalctl -u ssh -g "Failed password").

    FAQ: People Also Ask

    Q: I use a dynamic IP from my ISP that changes. How can I use the IP-restricted SSH rule?
    A: This is a common hurdle. Options include: 1) Use a VPN with a static IP for server management. 2) Use a bastion host (a small, always-on VPS with a static IP that you SSH through). 3) Accept the slightly higher risk of leaving SSH open but fortified with keys + fail2ban (a tool that bans IPs after failed attempts).

    Q: Is UFW enough, or do I need a more advanced firewall like iptables?
    A: UFW is a user-friendly front-end for iptables. For 99.9% of Minecraft server hosting needs, UFW is perfectly sufficient and less error-prone. It provides all the necessary functionality for port management.

    Q: How do I give another staff member (developer, co-owner) access?
    A: They generate their own SSH key pair and send you their public key. You append it to the ~/.ssh/authorized_keys file on the server. Never share private keys. This also allows you to revoke access by simply removing their public key line—a much cleaner process than changing a shared password. This is a best practice for [Building a Staff Team: How to Recruit and Manage Moderators for Large Servers].

    Q: I’ve done this. What’s the next layer of security?
    A: Excellent work. Your next steps should be:

    1. Install and configure fail2ban to automatically block IPs that fail SSH or even Minecraft authentication.
    2. Set up unattended security updates (sudo apt install unattended-upgrades).
    3. Implement a non-root user for all server operations. 
    4. Regular, automated, off-site backups. Security isn’t just keeping bad guys out; it’s about recovering when things go wrong.

    Conclusion: Your Fortress is Now Founded

    Securing your server isn’t a one-time plugin install. It’s a mindset and a foundational practice. By implementing SSH keys and configuring the UFW firewall, you have fundamentally altered the security posture of your server. You’ve moved from being an easy, automated target to a hardened fortress that requires significant, focused effort to breach.

    This guide provides the bedrock. Now, build upon it. Review your logs. Keep systems updated. Educate your co-admins. The time you spend on security is the best investment you can make in the long-term health of your community and the Minecraft servers you work so hard to build.

    Call to Action: Don’t put this off until “later.” Later is often too late. Right now, in a new terminal, generate your SSH key pair. Then, block one hour on your calendar this week to walk through the UFW setup. Your future self—and your players—will be grateful you did.

  • A 10-Minute Guide to Installing Ubuntu Server for Minecraft

    A 10-Minute Guide to Installing Ubuntu Server for Minecraft

    If you are tired of the limitations and resource-heavy nature of Windows, it is time to join the professionals. To run one of the best Minecraft servers in 2026, you need an operating system that stays out of your way and lets your hardware do what it does best: process game ticks.

    Ubuntu Server is the industry standard for Minecraft server hosting. It is a “headless” operating system, meaning it lacks a graphical user interface (GUI), which saves gigabytes of RAM and significant CPU cycles. Whether you want to start a Minecraft server for your close friends or build a massive public Minecraft server network, this 10-minute installation guide will take you from a blank drive to a high-performance Linux environment.


    Why Ubuntu Server is the Gold Standard for Minecraft

    Before we touch the terminal, it is essential to understand why this specific distribution is the choice of top-tier admins. Unlike Windows or even the “Desktop” version of Ubuntu, the Server edition is stripped of bloatware.

    • Stability: It can run for months or even years without needing a reboot.
    • Compatibility: Almost every guide on how to run a Minecraft server or configure Minecraft server plugins is written for Ubuntu.
    • Performance: It provides the foundation for a low lag Minecraft server by prioritizing the Java Virtual Machine (JVM) over background visual effects.

    Pre-Installation Checklist

    To complete this installation in 10 minutes, have the following ready:

    1. A Machine: A spare PC, a dedicated server, or a VPS (Virtual Private Server).
    2. Installation Media: A USB drive with at least 4GB of space.
    3. The ISO: The Ubuntu Server 24.04 LTS image.
    4. A Flashing Tool: Use BalenaEtcher or Rufus to create your bootable USB.

    ! You’re going to wipe everything of your USB and hard drive !


    Step 1: Booting and Language Selection (Minutes 1-2)

    Insert your USB drive and boot the machine. You may need to press F12, F11, or Delete to enter your BIOS/Boot Menu and select the USB drive.

    • Select “Install Ubuntu Server”: Once the GRUB menu appears, hit Enter.
    • Language Selection: Choose “English” (or your preferred language).
    • Keyboard Configuration: Most users should stick with the default “English (US)”.

    Step 2: Choosing the Installation Type (Minute 3)

    The installer will ask if you want “Ubuntu Server” or “Ubuntu Server (Minimized)”.

    • Recommendation: Choose “Ubuntu Server”. While the minimized version is smaller, the standard version includes essential tools like curl and vim that you will need for managing Minecraft servers.

    Step 3: Network and Proxy Configuration (Minute 4)

    If your machine is plugged into Ethernet, it should automatically receive an IP address via DHCP.

    • Static IP (Optional but Recommended): For a public Minecraft server, you want your internal IP to stay the same. You can configure this now or handle it later in your router settings.
    • Proxy: Unless you are on a restricted school or corporate network, leave the proxy field blank and continue.

    Step 4: Storage Configuration (Minutes 5-6)

    This is where most beginners get nervous. The installer will ask how to partition your disk.

    • Use an entire disk: Select this option.
    • LVM Group: Ensure “Set up this disk as an LVM group” is checked. This allows you to easily expand your storage later if your world files grow too large.
    • Confirm: The installer will warn you that all data on the disk will be erased. Select “Continue”.

    Step 5: Profile Setup (Minute 7)

    This creates your administrative user account.

    • Your Name: Your actual name.
    • Server Name: Something catchy like mc-server-01.
    • Username: Avoid “admin” or “root” for security reasons. Use something unique.
    • Password: Use a strong, alphanumeric password.

    Step 6: SSH and Software Selection (Minutes 8-9)

    • Install OpenSSH Server: Crucial. Check this box. This allows you to manage your server from your main computer using a tool like PuTTY or a terminal, so you can unplug the monitor and keyboard from the server.
    • Featured Server Snaps: The installer will offer various pre-packaged software like Docker or Nextcloud. Do not select any of these. We want our server to be as lean as possible for Minecraft.

    Step 7: Final Installation and Reboot (Minute 10)

    The system will now copy files and install the kernel.

    • View Logs: You can watch the progress, but it usually takes less than 2 minutes on modern SSDs.
    • Reboot Now: Once the “Installation Complete” message appears, remove the USB drive and hit Enter.

    Post-Installation: Preparing for Minecraft

    Congratulations! You are no longer “Zero”; you have a professional-grade Linux environment. Before you can start a Minecraft server, there are three commands you should run immediately upon logging in.

    1. Update the System

    Ensure your security patches are current:

    sudo apt update && sudo apt upgrade -y

    2. Install Java (OpenJDK)

    Modern Minecraft (1.21+) requires Java 21. Install the “headless” version to save resources:

    sudo apt install openjdk-21-jre-headless -y

    3. Setup a Firewall

    Protect your server from unwanted connections:

    sudo ufw allow 22/tcp #(Allow SSH)
    sudo ufw allow 25565/tcp #(Allow Minecraft)
    sudo ufw enable

    Shared Hosting vs. Ubuntu Self-Hosting

    While self-hosting on Ubuntu gives you total control, it is not for everyone.

    FeatureUbuntu Self-HostingProfessional Minecraft Server Hosting
    ControlAbsolute (Root access)Limited to a game panel
    Cost“Free” (plus electricity)Monthly subscription
    Setup Time10-30 MinutesInstant
    DDoS ProtectionYou must configure itUsually included
    MaintenanceYou are the IT departmentHandled by the provider

    If you decide that managing the OS is too much work, you can always look into [The best Minecraft Hosting Providers] to find a service that handles the backend for you.


    Common Mistakes and Expert Tips

    • Forgetting to unmount the USB: If you don’t remove the USB after installation, the machine might boot back into the installer.
    • Using a GUI: Resist the urge to install a desktop environment. It will eat 1GB-2GB of RAM that your server desperately needs.
    • Running as Root: Never run your Minecraft server as the root user. If a plugin is compromised, the attacker could have access to your entire system. Create a separate user called minecraft.
    • Disk Space Monitoring: Regularly check your disk space with df -h. Large public Minecraft server networks can generate gigabytes of logs in a single week.

    FAQ: People Also Ask

    Can I install Ubuntu Server on a Raspberry Pi?

    Yes, Ubuntu provides dedicated ARM images for the Raspberry Pi 4 and 5. The installation process is slightly different (flashing the SD card), but the commands and environment are identical.

    Is Ubuntu Server better than Debian for Minecraft?

    It is a matter of preference. Ubuntu has a more predictable release cycle and slightly better “out-of-the-box” support for newer hardware, while Debian is even more minimalist. For a comparison, read [Ubuntu vs. Debian: Which Linux Distro is Best for Minecraft Servers?].

    How do I get back to the Minecraft console if I close my terminal?

    You should use a tool like screen or tmux. This keeps the Minecraft process running in the background. We cover this in detail in [The Ultimate Linux Command Cheat Sheet for Minecraft Admins].

    Does Ubuntu Server support Bedrock Edition?

    Yes. You can run the Bedrock Dedicated Server (BDS) or use GeyserMC to allow Bedrock players to join your Java server. Learn how in [A Guide to GeyserMC: Bridging the Gap Between Java and Bedrock].


    Conclusion: Your Journey Starts Now

    Installing Ubuntu Server is the first step toward building a high-performance gaming community. By choosing a dedicated, lightweight OS, you have already solved 50% of the lag issues that plague amateur servers.

    Now that your foundation is solid, your next step is to choose the right server software and optimize your startup parameters. Whether you go with Paper, Purpur, or Fabric, your Ubuntu environment is ready to handle the load.

    What would you like to do next?

  • Use Docker and Alpine Linux to containerize your Minecraft server

    Use Docker and Alpine Linux to containerize your Minecraft server

    The landscape of Minecraft server hosting has shifted. Gone are the days of manually installing Java dependencies and wrestling with conflicting system libraries on a bloated OS. In 2026, the elite tier of server administrators has moved toward containerization—specifically using Docker paired with the featherweight Alpine Linux.

    If you want to start a Minecraft server that is truly professional, scalable, and efficient, you need a setup that is as “lean” as possible. By wrapping your server in a Docker container, you ensure that it runs exactly the same way on your laptop as it does on a high-end dedicated rack. Combine that with Alpine—a distro so small it makes a standard Ubuntu install look like a dinosaur—and you have the recipe for a high-performance, low lag Minecraft server.


    Why Containerize? The Docker Advantage

    Before we touch a single line of code, we need to address the “why.” Why go through the extra step of using Docker when you could just run a .jar file?

    • Environment Isolation: Docker bundles the specific version of Java (OpenJDK) your server needs. No more “Java version mismatch” errors.
    • Instant Portability: Moving your server to a new host? Just copy your compose.yaml and your data volume. It will “just work.”
    • Resource Capping: You can strictly limit how much CPU and RAM a container can use, preventing a single runaway plugin from crashing your entire host machine.
    • Rapid Deployment: Need to spin up a creative testing world? One command and you’re online.

    Why Alpine Linux?

    Most Docker images are built on Debian or Ubuntu, which can be 100MB+. Alpine Linux is a security-oriented, lightweight distribution based on musl libc and BusyBox. The base image is only 5MB. For Minecraft servers, this means:

    • Faster boot times.
    • A smaller attack surface (less code = fewer vulnerabilities).
    • More RAM available for the actual game, not the OS.

    Prerequisites: Preparing Your Host

    To follow this guide, you will need a machine running a modern Linux distribution. While you can use Windows or macOS with Docker Desktop, a dedicated Linux environment remains the gold standard for the best Minecraft servers.

    1. Install Docker Engine: Ensure you have the latest version of Docker and Docker Compose installed.
    2. User Permissions: Add your user to the docker group so you don’t have to type sudo for every command.
    3. Storage: Ensure you have at least 10GB of SSD/NVMe space for world data and backups.

    Step 1: Crafting the Perfect Dockerfile

    While you could use pre-built images like itzg/minecraft-server, building your own from an Alpine base gives you total control. Create a file named Dockerfile in a new directory.

    Dockerfile

    # ---- Build stage: download Purpur ----
    FROM alpine:3.20 AS builder
    
    RUN apk add --no-cache curl openjdk21-jre-headless
    
    WORKDIR /server
    
    # Change this to upgrade/downgrade Purpur
    ENV PURPUR_VERSION=1.21.1
    
    RUN curl -fL -o server.jar \
        https://api.purpurmc.org/v2/purpur/${PURPUR_VERSION}/latest/download
    
    
    # ---- Runtime stage ----
    FROM alpine:3.20
    
    RUN apk add --no-cache openjdk21-jre-headless \
     && addgroup -S minecraft \
     && adduser -S minecraft -G minecraft
    
    # Server jar lives outside the data volume
    WORKDIR /server
    COPY --from=builder /server/server.jar /server/server.jar
    RUN chown minecraft:minecraft /server/server.jar
    
    # World, configs, logs, etc.
    WORKDIR /data
    
    USER minecraft
    
    EXPOSE 25565
    
    ENV MEMORY=4G
    
    ENTRYPOINT ["sh", "-c", "java -Xms$MEMORY -Xmx$MEMORY -jar /server/server.jar nogui"]
    

    Expert Tip: Notice we used openjdk21-jre-headless. The “headless” version excludes graphical libraries, saving even more space and resources.


    Step 2: Orchestrating with Docker Compose

    Running individual docker run commands is tedious. Instead, we use Docker Compose. Create a compose.yaml file in the same folder.

    YAML

    services:
      survival:
        build: .
        container_name: mc-survival
        restart: unless-stopped
    
        ports:
          - "25565:25565"
    
        environment:
          MEMORY: 4G
    
        volumes:
          - ./world_data:/data
    
        mem_limit: 6g
    

    Key Components Explained:

    • restart: unless-stopped: This ensures that if your physical server reboots or the Minecraft process crashes, Docker will automatically restart the server.
    • volumes: This is the most critical part. It maps a folder on your physical machine (./world_data) to the /data folder inside the container. This ensures your world saves are persistent even if you delete the container.
    • deploy.resources: This acts as a physical barrier, ensuring the container never consumes more than 6GB of RAM, protecting the host OS.

    Tip: you need to allow the EULA!

    mkdir -p world_data
    echo "eula=true" > world_data/eula.txt

    Step 3: Managing and Scaling Your Container

    Once your files are ready, launching your server is as simple as:

    docker compose build

    docker compose up -d

    The -d flag runs the server in “detached” mode (in the background). To see your server console and check for errors, use:

    docker logs -f mc-survival

    Scaling to a Network

    If you want to run multiple Minecraft servers (e.g., a Lobby, Survival, and Creative), you can simply add more services to your compose.yaml and assign them different ports (e.g., 25566, 25567). For the best experience, front-load them with a proxy like Velocity in its own container.


    Pros and Cons of Containerized Hosting

    FeatureDocker + AlpineTraditional Hosting
    Setup SpeedMinutes (once configured)Hours of manual installs
    OS Overhead~5MB – 50MB500MB+ (Ubuntu/Windows)
    UpdatesEdit version and restartManual file replacement
    SecurityProcess IsolationShared System Access
    Learning CurveMedium (requires CLI knowledge)Low

    Common Mistakes and Expert Troubleshooting

    • Permission Issues: If your server can’t save files, it’s likely a UID/GID mismatch. Use chown -R 1000:1000 ./world_data on your host to ensure the Docker user has write access.
    • Forgotten Volumes: Never start a server without a volume mount. If you don’t mount a volume, all your world progress will be deleted the moment the container stops.
    • DNS Resolution: Alpine uses musl libc, which handles DNS slightly differently than the standard glibc found in Ubuntu. If your plugins can’t connect to external APIs, ensure your /etc/resolv.conf is correctly configured in the container.
    • Port Conflicts: Ensure you aren’t trying to bind multiple containers to port 25565. Each public Minecraft server needs a unique external port or a dedicated IP.

    FAQ: People Also Ask

    Is Alpine Linux compatible with all Minecraft mods?

    Most mods and plugins work perfectly because they run inside the Java Virtual Machine (JVM). However, some very specific mods that rely on native C++ libraries (like some voice chat mods or custom map renderers) might require glibc. In those cases, you can add the libc6-compat package to your Alpine Dockerfile.

    How do I access the server console in Docker?

    Use the command docker attach mc-survival. To exit without stopping the server, press Ctrl + P then Ctrl + Q.

    Is Docker slower than a standard Linux install?

    The performance overhead of Docker on Linux is near-zero (typically <1%). The networking is handled by the Linux kernel, and the CPU/RAM access is direct. In many cases, an Alpine-based Docker container is faster than a standard Windows or bloated Linux install because it removes background noise.

    How do I update my server version?

    Update the version number in your Dockerfile, then run docker compose up -d --build. Docker will rebuild the image with the new version and swap the container out in seconds.


    Conclusion

    Containerization is no longer just for Silicon Valley tech companies—it is the ultimate tool for anyone serious about how to run a Minecraft server. By using Docker and Alpine, you create a modular, efficient, and bulletproof environment that allows you to focus on what matters: your community.

    Whether you are hosting one of the best Minecraft servers on a dedicated rig or just a private SMP, Alpine and Docker provide the foundation for a professional, low lag Minecraft server that can grow with your ambitions.

    Ready to master your server infrastructure?

  • The Ultimate Linux Command Cheat Sheet for Minecraft Admins

    The Ultimate Linux Command Cheat Sheet for Minecraft Admins

    If you want to start a Minecraft server that stands out for its stability and speed, you eventually have to leave the comfort of a graphical interface behind. Professional Minecraft server hosting almost exclusively runs on Linux, and for a good reason: it is lightweight, secure, and offers unparalleled control over your hardware.

    However, staring at a blinking white cursor in a black terminal window can be intimidating for beginners. To maintain a low lag minecraft server, you need to know exactly how to navigate the file system, manage Java processes, and monitor system resources in real-time. This guide provides the essential “survival kit” of Linux commands every Minecraft admin needs to master in 2026.


    Why Linux is Essential for the Best Minecraft Servers

    Before we dive into the commands, it’s important to understand why Linux is the industry standard. Unlike Windows, a “headless” Linux server doesn’t waste CPU cycles or RAM on a desktop environment. This means more resources are available for the Minecraft game loop, directly resulting in higher TPS (Ticks Per Second) and a better experience for your players.

    By mastering the command line, you gain the ability to automate backups, restart your server after a crash, and diagnose performance bottlenecks that would remain hidden on a standard dashboard.


    1. Navigating the Minecraft File System

    When you first connect to your Minecraft server hosting via SSH, you’ll be in your home directory. These commands allow you to move between folders and manage your files.

    CommandPurposeExample
    pwdPrint Working Directory – Shows exactly where you are.pwd
    ls -laList Files – Shows all files, including hidden ones and their sizes.ls -la /home/minecraft/plugins
    cdChange Directory – Moves you into a specific folder.cd ~/bedrock-server
    mkdirMake Directory – Creates a new folder.mkdir backups
    cp -rCopy Recursively – Copies files or entire folders.cp -r world world_backup
    mvMove/Rename – Moves a file or renames it.mv spigot-1.21.jar server.jar
    rm -rfRemove Forcefully – Deletes files/folders permanently. Use with caution!rm -rf logs/

    Pro Tip: Always use ls -la before running an rm command to make sure you aren’t about to delete the wrong folder. In the world of public minecraft server management, a single typo can delete months of player progress.


    2. Managing the Minecraft Process (Screen & Systemd)

    You can’t just run your server and close the terminal; the process would end immediately. Most admins use screen or systemd to keep the server running in the background.

    Using Screen

    screen creates a virtual terminal session that stays alive even after you disconnect.

    • Create a new session: screen -S minecraft
    • Detach from session: Press Ctrl + A, then D.
    • Reattach to session: screen -r minecraft
    • List all sessions: screen -ls

    3. Real-Time Performance Monitoring

    To ensure you are running a low lag Minecraft server, you must monitor how Minecraft interacts with your CPU and RAM.

    The Essential Monitoring Toolkit

    • htop: An interactive process viewer. It shows which CPU cores are being hammered by Minecraft and if you are running out of RAM.
    • df -h: Checks your disk space. Minecraft worlds and logs can grow rapidly; if your disk hits 100%, your world will corrupt.
    • du -sh *: Shows the size of every folder in your current directory. Great for finding out which plugin is creating massive log files.
    • top: The standard system monitor. Use this if htop isn’t installed.

    4. Editing Configuration Files

    You will constantly need to edit server.properties, spigot.yml, or plugin configs.

    • nano: The most beginner-friendly editor.
      • Usage: nano server.properties
      • Save/Exit: Ctrl + O (Enter), then Ctrl + X.
    • grep: Search for specific text within a file.
      • Example: grep "white-list" server.properties — Quickly see if your whitelist is enabled.
    • tail -f logs/latest.log: This is the most important command for troubleshooting. it shows your server console output in real-time.

    5. Network and Security Basics

    A public minecraft server is a target for attacks. Use these commands to keep your network secure.

    • ip a: Finds your server’s internal and external IP addresses.
    • ufw status: Checks your firewall status.
    • sudo ufw allow 25565/tcp: Opens the default Minecraft port so players can join. Be cautious when opening ports!
    • netstat -tulnp: Shows all active connections. Useful if you think your server is being hit by a bot attack.
    • ss -tlnp: Show all active services and their ports

    FAQ: People Also Ask

    How do I restart my server automatically if it crashes?

    The best way is to use a systemd service file with the line Restart=on-failure. This tells Linux to immediately re-run the start command if the Java process ends unexpectedly.

    Why do I get “Permission Denied” when running commands?

    Linux uses a strict permission system. If you aren’t the owner of a file, you can’t edit it. Use sudo before a command to run it as an administrator, or preferably use chown to change the file ownership to your a specific user like minecraft: sudo chown -R minecraft:minecraft /home/minecraft.

    NOTE: DO NOT RUN A PUBLIC MINECRAFT SERVER USING SUDO!

    Can I run Minecraft on a Raspberry Pi using these commands?

    Yes! The commands are identical. However, for a Pi, you should prioritize [The Best Linux Distros for Hosting a Minecraft Server in 2026] like Ubuntu Server or Debian to save every bit of RAM.

    How do I update Java on my Linux server?

    Most modern servers use apt. To update to the latest version for Minecraft 1.21+, you would run:

    sudo apt update && sudo apt install openjdk-21-jre-headless


    Conclusion: Take Control of Your Server

    Mastering these Linux commands is the difference between a “laggy” home-hosted world and one of the best Minecraft servers on the market. By moving away from clunky web panels and managing your minecraft server hosting directly through the terminal, you unlock the ability to optimize your hardware to its absolute limit.

    Start by practicing in a safe environment, like a local Virtual Machine, before applying these to your live public minecraft server. Once you can navigate the terminal with ease, you’ll never want to go back to a mouse and keyboard.

    Ready to level up your server administration?

  • Ubuntu vs. Debian: Which is Best for Minecraft Servers?

    Ubuntu vs. Debian: Which is Best for Minecraft Servers?

    When you decide to start a Minecraft server, the hardware is only half the battle. The true foundation of a high-performance, low lag minecraft server lies in the operating system (OS). For professional server owners and hobbyists alike, Linux is the undisputed king. Specifically, the debate almost always narrows down to two titans: Ubuntu Server and Debian.

    Both are rock-solid, but they cater to different philosophies of server development. Whether you are aiming to host one of the best Minecraft servers with hundreds of players or a private SMP for friends, choosing between these two will impact your ease of use, security, and raw performance.


    The Philosophy: Stability vs. Modernity

    To understand which is better for minecraft server hosting, we must first look at their DNA. Ubuntu is actually built on top of Debian, but they have drifted apart in how they handle software updates.

    Debian: The Rock of Stability

    Debian is often called the “Universal Operating System.” Its primary goal is absolute, unwavering stability.

    • Conservative Updates: Debian “Stable” releases use older, rigorously tested versions of software.
    • Minimalist Base: A fresh install is incredibly lean, often using less than 250MB of RAM.
    • Community-Driven: It is a pure open-source project with no corporate overloads.

    Ubuntu: The Predictable Powerhouse

    Developed by Canonical, Ubuntu Server focuses on usability and a predictable release cycle.

    • LTS (Long Term Support): Every two years, a new LTS version is released, providing 5 to 10 years of security updates.
    • Modern Kernels: Ubuntu generally ships with newer kernels and drivers, which can be beneficial for the latest high-end CPUs.
    • Vast Documentation: If you encounter an error, there is a 99% chance the fix is documented for Ubuntu.

    Performance Benchmarks: Resource Usage for Minecraft

    Minecraft is a Java-based application, meaning it thrives on single-core CPU speed and efficient RAM allocation. In a head-to-head comparison for minecraft servers, the performance gap is narrow but noticeable.

    MetricDebian 12 (Stable)Ubuntu 24.04 LTS
    Idle RAM Usage~150 MB – 250 MB~350 MB – 500 MB
    Boot TimeExtremely FastFast
    Software AgeOlder (Proven)Newer (Feature-rich)
    Package ManagerAPTAPT & Snap

    Why Debian Wins on Low-Spec Hardware

    Because Debian installs fewer background services by default, it leaves more “headroom” for your server software. If you are running on a limited VPS with only 2GB or 4GB of RAM, every megabyte counts. Debian’s minimalism allows you to squeeze a few extra chunks of render distance out of your [CPU vs RAM: What Actually Stops Minecraft Lag in 2026?] balance.

    Why Ubuntu Wins on Modern Hardware

    If you are using the latest Ryzen or Intel chips, Ubuntu’s more frequent kernel updates often include better “scheduler” optimizations. This ensures the Linux kernel knows exactly how to handle the high-intensity threads generated by Minecraft’s main game loop.


    Setting Up Your Server: A Quick Comparison

    When you are learning how to run a minecraft server, the “User Experience” (UX) of the command line matters.

    Installing Java on Debian

    On Debian, you might need to manually add repositories or use “Backports” if you want the absolute latest version of OpenJDK for a newer Minecraft version like 1.21.

    Bash

    # Typical Debian Java Install
    sudo apt update
    sudo apt install default-jre
    

    Installing Java on Ubuntu

    Ubuntu makes this process seamless with its PPA (Personal Package Archive) system and “restricted” repositories that often include newer Java builds out of the box.

    Bash

    # Typical Ubuntu Java Install
    sudo apt update
    sudo apt install openjdk-21-jre-headless
    

    Pros and Cons for Minecraft Server Owners

    Debian

    Pros:

    • Maximum Uptime: You can go months without needing a reboot.
    • Low Overhead: Best for public minecraft server setups with tight resource margins.
    • Security: A very conservative approach to new features means fewer vulnerabilities.

    Cons:

    • Steeper Learning Curve: Requires more manual configuration.
    • Outdated Packages: You may need to hunt for the latest minecraft server plugins or Java versions manually.

    Ubuntu

    Pros:

    • Ease of Use: Most Minecraft-related scripts and tutorials (like Pterodactyl Panel) are designed for Ubuntu.
    • Hardware Support: Better “out-of-the-box” support for newer SSDs and network cards.
    • Ubuntu Pro: Free for personal use, offering extended security patches.

    Cons:

    • Snap Packages: Some users find the inclusion of “Snap” to be unnecessary “bloat.”
    • Background Noise: More telemetry and background services than Debian.

    Expert Tips: Maximizing Your Choice

    Regardless of which distro you choose, performance comes down to optimization.

    1. Use a Headless Version: Never install a “Desktop” version of Linux on a server. The GUI consumes resources that should be going to your TPS (Ticks Per Second).
    2. Optimize the JVM: Use [Aikar’s Flags Explained: The Secret to Perfect Garbage Collection] to ensure your Java instance is running as efficiently as possible.
    3. Choose the Right Host: Not all minecraft server hosting providers are equal. Ensure yours allows you to choose your own ISO or provides a clean Debian/Ubuntu template. We’ve vetted the market in our post on [The best Minecraft Hosting Providers].

    FAQ: People Also Ask

    Is Ubuntu just “Easy Debian”?

    Essentially, yes. Ubuntu is built on the “Testing” branch of Debian, with added user-friendly tools and corporate support. For most beginners, Ubuntu is the logical starting point.

    Which is better for a Bedrock server?

    The official Minecraft Bedrock Dedicated Server software is explicitly developed for Ubuntu. While it can run on Debian, it often requires manual library linking that can be a headache for new owners.

    Can I switch from Ubuntu to Debian later?

    You cannot easily “convert” the OS. You would need to back up your /home/minecraft folder, wipe the drive, install the new OS, and move the files back. For safety, see [How to Move Your Minecraft World from One Host to Another Without Data Loss].

    Does Linux actually reduce lag compared to Windows?

    Yes. Windows consumes 2GB-4GB of RAM just to sit idle. A low lag minecraft server on Linux uses that same RAM to cache world data, leading to significantly smoother gameplay.


    Final Verdict: Which One Should You Pick?

    • Pick Debian if: You are an experienced Linux user, you are hosting on older/limited hardware, or you value “set-it-and-forget-it” stability above all else.
    • Pick Ubuntu if: You are a beginner, you want the fastest setup possible, or you are using the latest Minecraft versions and need up-to-date Java and kernel support.

    Ultimately, both distributions are capable of hosting the best Minecraft servers in the world. The “best” one is the one you feel most comfortable managing, as a well-maintained server is always faster than a neglected one.

    Ready to dive deeper into server optimization?

  • How to Move Your Minecraft Server from One Host to Another?

    How to Move Your Minecraft Server from One Host to Another?

    There comes a moment in every server owner’s journey when the current walls start closing in. Perhaps your community has outgrown the limited RAM of a budget plan, or maybe you’re tired of the “no-name” hardware causing lag spikes during peak hours. You’ve decided it’s time to upgrade to a higher-tier minecraft server hosting provider.

    But then, the anxiety sets in. You have months of player builds, complex Redstone contraptions, and thousands of lines of configuration in your minecraft server plugins. The thought of a corrupted chunk or a wiped inventory is enough to keep any admin up at night.

    In this exhaustive 2026 guide, we are teaching you How to Move Your Minecraft World from One Host to Another Without Data Loss. Whether you are running a small private world or a massive public minecraft server, this step-by-step blueprint ensures a “Zero-Downtime” style transition that keeps your player base happy and your data intact.


    1. Why Move? The Signs You Need Better Minecraft Server Hosting

    Before we dive into the “how,” let’s look at the “why.” Not all minecraft servers are created equal. If you are experiencing any of the following, it is likely time to migrate to a more robust infrastructure:

    • Low TPS (Ticks Per Second): Your server stays below 18 TPS even with few players online.
    • Poor Single-Thread Performance: Your current host uses older Xeon CPUs instead of modern Ryzen or high-clock Intel chips.
    • Lack of Control: You can’t access your startup flags or manage your own backups.
    • Scaling Issues: You want to follow our [Case Study: How Lifesteal SMP Reached 500 Players in 3 Months] but your current host hits a “player cap” too early.

    Moving to a low lag minecraft server environment is the best gift you can give your community.


    2. Pre-Migration Checklist: The “Point of No Return”

    Successful migration is 90% preparation and 10% execution. Before you touch a single file, you must complete this checklist to ensure you don’t lose progress.

    A. Perform a “Cold” Backup

    Never try to copy files while the server is running. This leads to “Partial Chunk Saves,” which causes the dreaded “Chunk Reset” bug where a player’s base disappears.

    1. Announce a maintenance window in your Discord (using one of [The Best Discord Bots for Minecraft Server Management in 2026]).
    2. Issue the /stop command.
    3. Trigger the “Backup” function on your old host’s panel.

    B. Gather Your Credentials

    You will need the SFTP (Secure File Transfer Protocol) details for both your old and new hosts. This usually includes:

    • Host/IP Address
    • Port (usually 2022 or 22)
    • Username
    • Password (or SSH Key)

    C. Verify Version Consistency

    Ensure the new server is set to the exact same Minecraft version (e.g., 1.21.1) and Server Jar (Paper, Fabric, Purpur) as the old one. Mixing a Paper world with a Vanilla jar can lead to inventory loss or broken custom items.


    3. Step-by-Step Guide: Moving Files via SFTP

    While some hosts offer “Auto-Importers,” the manual SFTP method is the only way to guarantee you have moved every single file. For this, we recommend using FileZilla or WinSCP.

    Step 1: Connect to the Old Host

    Open your SFTP client and enter the credentials for your old host. You should see a root directory containing folders like world, plugins, and logs.

    Step 2: Create a Local Archive (The “Download” Phase)

    Instead of downloading 10,000 tiny plugin files one by one (which takes hours), use your host’s “File Manager” to Zip/Archive your entire directory.

    • Select all files -> Right-click -> Compress/Archive.
    • Name the file server_backup_full.zip.
    • Download this single .zip file to your computer.

    Expert Tip: If your world folder is massive (over 20GB), consider deleting the logs and backups folders before zipping to save time. These aren’t necessary for the server to run.

    Step 3: The Big Upload

    Connect to your new host via SFTP.

    1. Upload your server_backup_full.zip to the root directory.
    2. On the new host’s control panel, use the “File Manager” to Unarchive/Extract the file.
    3. Ensure the folders are in the root (e.g., /world, not /server_backup_full/world).

    4. Handling Databases: Migrating LuckPerms and MySQL

    If you are running a professional public minecraft server, you likely aren’t using flat files for your ranks and permissions. You are likely using MariaDB or MySQL.

    How to move a database:

    1. Export: On your old host, go to phpMyAdmin and click Export on your database (e.g., luckperms_db).
    2. Save: This will give you a .sql file.
    3. Import: On your new host, create a new database. Go to its phpMyAdmin, click Import, and upload the .sql file.
    4. Update Configs: Go into your plugins/LuckPerms/config.yml on the new server and update the MySQL address, username, and password to match the new host.

    Failure to do this will result in every player losing their ranks and becoming “Guests” upon joining.


    5. Domain and DNS: The Final Switch

    You’ve moved the files, but your players are still trying to connect to the old IP address. This is where DNS (Domain Name System) comes in.

    If you have a custom IP like play.myserver.com, you need to update your “A Record” or “SRV Record.”

    • A Record: Change the “Content” field from the Old IP to the New IP.
    • SRV Record: If your new host uses a non-standard port (e.g., 25601), you must update the SRV record to reflect this.

    Note: DNS propagation can take anywhere from 5 minutes to 24 hours. During this time, some players will land on the old server and some on the new one. This is why you should keep the old server OFF once the move is complete to avoid “Split Progress.”


    6. Pros and Cons of Migration Methods

    MethodProsCons
    Manual SFTPMost reliable; you know exactly what moved.Slower; requires technical knowledge of file structures.
    Auto-ImporterFast; “one-click” solution provided by some hosts.Can fail on large worlds; might miss hidden configuration files.
    Plugin-based (e.g. MyDrive)Good for specific world folders.Doesn’t move the actual server JAR or system configs.

    7. Common Mistakes When Moving Minecraft Servers

    Even the best minecraft servers run into issues during a move. Avoid these common pitfalls:

    1. Level-Name Mismatch: In your server.properties, the level-name= must match the name of your world folder exactly. If your folder is named Survival_2026 but the property says world, the server will generate a brand-new, empty map.
    2. Permission Ownership: On Linux-based minecraft server hosting, sometimes uploaded files are owned by “root” instead of the “container user.” If the server won’t start, use the “Repair Permissions” button on your panel.
    3. Forgetting the usercache.json: This file maps player names to their UUIDs. If you forget this, players might see “Player” instead of their names in certain plugin lists.
    4. The “Online Mode” Toggle: If your old server was in online-mode=false and you switch the new one to true, players will have different UUIDs. They will spawn with empty inventories. Refer to our guide on [How to run a minecraft server: Offline vs Online Mode] for the fix.

    8. Expert Tips for a Perfect Transition

    • Pre-Generate Chunks: Before letting players in, use the Chunky plugin to re-load the world border. This ensures your new CPU is ready for the load.
    • JVM Optimization: Moving hosts is the perfect time to implement [Deep Dive into Aikar’s Flags]. Most new hosts allow you to paste these flags into the startup settings for a low lag minecraft server experience.
    • Update GeyserMC: If you allow Bedrock players, remember to update your [Guide to GeyserMC] settings, as Bedrock players are particularly sensitive to IP and Port changes.
    • Test with “Dummy” Accounts: Before announcing the launch, join the server yourself and break a block, then re-join to see if it saved. Check your /vault and inventories to ensure no data was lost.

    FAQ: People Also Ask

    Can I move a world from Singleplayer to a Hosted Server?

    Yes! The process is almost identical. You find your world in %appdata%/.minecraft/saves, zip it, and upload it to the server. Just remember to rename the folder to match the level-name in your server.properties.

    Will my plugins work on the new host?

    As long as the Java version is the same (usually Java 17 or 21 in 2026), they will work. However, you must update any “License Keys” in your premium minecraft server plugins, as some developers lock their plugins to a specific IP address.

    How long does it take to move a server?

    For a standard survival server (1-5GB), the process takes about 30 to 60 minutes. For massive networks with multiple terabytes of data, it can take several hours of upload time.


    Conclusion: Ready for the Next Chapter

    Learning How to Move Your Minecraft World from One Host to Another Without Data Loss is a rite of passage for every successful server administrator. It marks the transition from “experimenting” to “growing.” By following the SFTP archive method, migrating your databases correctly, and updating your DNS, you ensure that your players’ hard work is protected.

    A server move is the perfect time to re-evaluate your community goals. If you want to improve player stay-times on your new hardware, don’t forget to check out our analysis of [The Psychology of Player Retention].

  • The Best Linux Distros for Hosting a Minecraft Server in 2026

    The Best Linux Distros for Hosting a Minecraft Server in 2026

    If you are looking to start a Minecraft server that can handle hundreds of players, complex minecraft server plugins, and massive world files, there is one technical truth you can’t ignore: Linux is king. While Windows is great for gaming, it carries too much “bloat” for a dedicated 24/7 server. In 2026, the best minecraft servers in the world—from Hypixel to small community SMPs—almost exclusively run on Linux. It offers superior memory management, better CPU scheduling, and a “headless” environment that saves every possible megabyte of RAM for your game.

    But which distribution (distro) should you choose? Between “stability-first” veterans and “performance-tuned” newcomers, picking the right OS is the first step toward running a low lag minecraft server. This guide breaks down the top contenders for The Best Linux Distros for Hosting a Minecraft Server in 2026.


    1. Why Linux Dominates Minecraft Server Hosting

    Before we look at the distros, it’s important to understand why we aren’t using Windows.

    • Resource Efficiency: A “headless” Linux server (no desktop interface) uses as little as 300MB of RAM. Windows Server can use 2GB+ before you even launch Minecraft.
    • Uptime: Linux systems are designed to run for years without a reboot.
    • Automation: Tools like Docker, Pterodactyl, and LinuxGSM are natively built for Linux, making it easier to manage a public minecraft server.

    2. Top Linux Distros for Minecraft in 2026: The Rankings

    1. Ubuntu Server 24.04 LTS (The Gold Standard)

    Ubuntu remains the most popular choice for minecraft server hosting for one reason: documentation. If you run into an error, someone has already solved it on an Ubuntu forum.

    • Best For: Beginners and those who want a “just works” experience.
    • Pros: Massive package library, great support for minecraft server plugins, and 5+ years of security updates.
    • Cons: Includes “Snap” packages which some purists find unnecessary for a clean server.

    2. Debian 12 “Bookworm” (The Rock-Solid Choice)

    If Ubuntu is the popular kid, Debian is the reliable veteran. It is the foundation that Ubuntu was built upon.

    • Best For: Owners who want absolute stability and zero “bloat.”
    • Pros: Extremely lightweight and famous for never crashing.
    • Cons: Packages (like Java versions) can sometimes be older than those on Ubuntu, requiring manual updates to run the latest Minecraft versions.

    3. Rocky Linux / AlmaLinux 9 (The Enterprise Powerhouse)

    After the “CentOS” shakeup a few years ago, Rocky and AlmaLinux emerged as the premier choices for enterprise-grade stability.

    • Best For: Large networks and professional administrators.
    • Pros: Built to be 1:1 compatible with Red Hat Enterprise Linux. Excellent for high-traffic public minecraft servers.
    • Cons: Steeper learning curve; uses dnf instead of apt for package management.

    4. Alpine Linux (The Minimalist)

    Alpine is an ultra-lightweight distro often used inside Docker containers.

    • Best For: Experts running “containerized” servers or those with limited hardware.
    • Pros: The entire OS can be smaller than 10MB.
    • Cons: Uses musl instead of glibc, which can occasionally cause issues with certain custom Java binaries or older plugins.

    3. Comparison Table: At-a-Glance

    DistroDifficultyResource UsagePackage ManagerRecommended For
    Ubuntu ServerEasyLowaptBeginners / VPS users
    DebianMediumVery LowaptStability Purists
    Rocky LinuxHardLowdnfEnterprise / Networks
    Alpine LinuxExpertTinyapkDocker / Advanced

    4. How to Choose Based on Your Hosting Style

    If You Use a VPS

    Most minecraft server hosting providers that offer a VPS will give you a choice of OS.

    If You Are Self-Hosting at Home

    If you are repurposing an old PC to host for friends:


    5. Expert Tips for Linux Performance

    1. Skip the GUI: Never install a “Desktop Environment” (like GNOME or KDE) on a server. It wastes CPU and RAM that should be going to your low lag minecraft server.
    2. Use Java 21+: In 2026, modern Minecraft versions require the latest Java. Ensure your distro has access to the correct OpenJDK version.
    3. Optimize Your Flags: Regardless of the OS, you must tune your startup.
    4. Use Screen or Tmux: These Linux utilities allow your server to keep running even after you close your SSH window (PuTTY).

    6. Common Mistakes to Avoid

    • Mistake: Running as Root. Never run your Minecraft server using the root user. If a plugin has a security flaw, the hacker would have full access to your entire Linux system. Always create a dedicated minecraft user.
    • Mistake: Forgetting the Firewall. Linux is secure, but you still need to open port 25565. Use ufw (Uncomplicated Firewall) on Ubuntu/Debian to manage this easily.
    • Mistake: Ignoring Updates. Run sudo apt update && sudo apt upgrade regularly to ensure your OS has the latest security patches.

    FAQ: People Also Ask

    Is Linux better than Windows for Minecraft servers?

    Yes. Linux uses significantly fewer system resources, offers better uptime, and provides more powerful automation tools for managing public minecraft servers.

    What is the easiest Linux distro for a beginner?

    Ubuntu Server is widely considered the easiest due to its massive community, clear tutorials, and straightforward package management.

    Can I run a Bedrock server on Linux?

    Absolutely. While Bedrock was originally a Windows-centric edition, there are official Linux builds available for the Bedrock Dedicated Server (BDS).


    Conclusion: Build Your Fortress on Linux

    Selecting one of The Best Linux Distros for Hosting a Minecraft Server in 2026 is about more than just personal preference—it’s about building a stable foundation for your community. Whether you choose the user-friendliness of Ubuntu, the rock-solid nature of Debian, or the enterprise power of Rocky Linux, you are already miles ahead of anyone trying to host on Windows.