← All articles
GAMING How to Self-Host a Minecraft Server: Complete Setup ... 2026-02-08 · minecraft · gaming · docker

How to Self-Host a Minecraft Server: Complete Setup Guide

Gaming 2026-02-08 minecraft gaming docker java

Running your own Minecraft server gives you full control over gameplay rules, mods, and who can join. It's also one of the most common first self-hosting projects — and for good reason. The setup is straightforward, the community is massive, and the resource requirements are reasonable for most home servers.

Why Self-Host Your Minecraft Server?

Paid Minecraft hosting (Realms, Apex, Shockbyte) costs $5–30/month and limits your control. Self-hosting gives you:

The trade-off is that you're responsible for updates, backups, and keeping things running.

Java Edition vs Bedrock Edition

First decision: which edition are you hosting for?

Feature Java Edition Bedrock Edition
Platforms PC, Mac, Linux Windows 10/11, consoles, mobile
Mod support Extensive (Forge, Fabric) Limited (add-ons)
Server software Many options BDS or Geyser
Performance More resource-hungry Lighter weight
Cross-play Java clients only Cross-platform

Most self-hosters choose Java Edition because of the vastly superior mod and plugin ecosystem. If you need cross-play with console/mobile players, look into GeyserMC which bridges Bedrock clients to Java servers.

Choosing Server Software

For Java Edition, you have several server implementations:

Vanilla

The official Mojang server. No mod support, but guaranteed compatibility.

Paper

The most popular choice for self-hosters. Paper is a high-performance fork of Spigot that supports Bukkit/Spigot plugins while offering significantly better performance through async chunk loading and other optimizations.

Purpur

A fork of Paper with even more configuration options and gameplay tweaks. If Paper is too restrictive, Purpur gives you more knobs to turn.

Fabric

A lightweight mod loader focused on performance. Fabric mods tend to be more performance-oriented (Lithium, Sodium, Starlight), making it great for vanilla-plus servers.

Forge

The classic mod loader with the largest mod library. Heavier than Fabric but supports massive modpacks like Feed The Beast and All The Mods.

Recommendation: Start with Paper for most servers. It's fast, well-supported, and has a huge plugin ecosystem. Switch to Fabric or Forge only if you need specific mods.

Hardware Requirements

Minecraft server performance depends primarily on single-thread CPU speed and RAM:

Server Size Players RAM CPU Storage
Small (friends) 1–5 2–4 GB Any modern CPU 5 GB SSD
Medium 5–20 4–8 GB 3.5+ GHz 10 GB SSD
Large 20–50 8–16 GB 4+ GHz single-thread 20 GB SSD
Modded Varies +2–8 GB over base Fast single-thread 20–50 GB SSD

Key points:

A Raspberry Pi 4 can technically run a small vanilla server, but performance will be marginal. A cheap used desktop with an i5 or Ryzen 5 is a much better starting point.

Docker Setup

Docker makes it easy to manage your Minecraft server alongside other self-hosted services. The itzg/minecraft-server image is the community standard:

# docker-compose.yml
services:
  minecraft:
    image: itzg/minecraft-server
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      TYPE: "PAPER"
      VERSION: "1.21.4"
      MEMORY: "4G"
      VIEW_DISTANCE: 12
      MAX_PLAYERS: 20
      MOTD: "My Self-Hosted Server"
      DIFFICULTY: "normal"
      SPAWN_PROTECTION: 0
      ENABLE_COMMAND_BLOCK: "true"
    volumes:
      - ./data:/data
    restart: unless-stopped
    # Limit container resources
    deploy:
      resources:
        limits:
          memory: 5G

Start it with:

docker compose up -d

The itzg/minecraft-server image handles:

Installing Plugins (Paper)

Drop plugin .jar files into ./data/plugins/:

# Example: download EssentialsX
curl -L -o ./data/plugins/EssentialsX.jar \
  "https://github.com/EssentialsX/Essentials/releases/latest/download/EssentialsX.jar"

# Restart to load new plugins
docker compose restart minecraft

Performance Tuning

JVM Flags

The itzg/minecraft-server image uses Aikar's flags by default, which is ideal. If running without Docker, use these flags:

java -Xms4G -Xmx4G \
  -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
  -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
  -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
  -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 \
  -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 \
  -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
  -jar paper.jar --nogui

Server Properties

Key settings in server.properties that affect performance:

# Lower = better performance, but shorter visibility
view-distance=10
simulation-distance=8

# Async chunk generation (Paper default)
# Massively improves performance with many players

# Pre-generate chunks to avoid lag spikes
# Use Chunky plugin to pre-gen a 5000-block radius

Paper-Specific Tuning

In paper-global.yml and paper-world-defaults.yml:

Backups

World corruption can happen. Set up automated backups:

#!/bin/bash
# backup.sh - run daily via cron
BACKUP_DIR="/backups/minecraft"
DATA_DIR="/path/to/data"

# Create timestamped backup
tar czf "$BACKUP_DIR/world-$(date +%Y%m%d-%H%M).tar.gz" \
  -C "$DATA_DIR" world world_nether world_the_end

# Keep only last 7 days
find "$BACKUP_DIR" -name "world-*.tar.gz" -mtime +7 -delete

For zero-downtime backups, use the RCON interface to pause saves:

docker exec minecraft rcon-cli save-off
# run backup
docker exec minecraft rcon-cli save-on

Network Setup

Port Forwarding

To let friends connect from outside your network:

  1. Forward TCP port 25565 on your router to your server's local IP
  2. Give friends your public IP (check at checkip.amazonaws.com)
  3. Consider a dynamic DNS service if your IP changes

Using a Reverse Proxy

If you have a domain, you can use an SRV DNS record to point to your server without needing the default port:

_minecraft._tcp.mc.yourdomain.com. SRV 0 5 25565 your-server-ip.

Players can then connect using mc.yourdomain.com.

Security Considerations

Hosted Alternatives Comparison

Option Cost Control Performance Ease
Self-hosted $0 (existing hardware) Full Your hardware Medium
Minecraft Realms $8/month Very limited Mediocre Easy
Apex Hosting $5–20/month Good Good Easy
Oracle Cloud free tier Free Full Decent (ARM) Hard

Self-hosting wins on control and cost if you already have the hardware. Paid hosts win on convenience and uptime if you don't want to maintain infrastructure.

Verdict

Self-hosting a Minecraft server is one of the most rewarding beginner self-hosting projects. The community tooling (especially itzg/minecraft-server) has matured to the point where setup takes minutes, and Paper makes performance management nearly automatic.

Start with Docker + Paper for a reliable, performant server. Add plugins as needed. Back up your world regularly. And enjoy not paying monthly hosting fees for something you can run on a spare computer.