Minecraft - Java Edition gameplay

Host a Minecraft - Java Edition Dedicated Server

Minecraft Java Edition dedicated server. The official Mojang server software with automatic Java version detection, JAR management, and mod support. Runs in Docker for isolated resource management.

Hardware Requirements

Here's what you need to run a Minecraft - Java Edition dedicated server.

Economy

Small server, 1-10 players

CPU1 core
RAM2 GB
Storage5 GB

Standard

Community server, 10-40 players

CPU2 cores
RAM4 GB
Storage5 GB

Pro

Large server, 40-200 players

CPU4 cores
RAM8 GB
Storage5 GB

Start hosting from your own computer

Run a Minecraft - Java Edition server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and Minecraft - Java Edition configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.

Get Started FreeNo credit card required

Setup in 4 Steps

Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.

The Manual Way vs. GameCP

Manual Setup

  • Configure 3+ firewall ports and router settings
  • Write systemd service files
  • SSH into server to edit configs
  • Requires a VPS or dedicated server
  • 30-60 minutes if experienced

With GameCP

  • Automatic port forwarding — no router config
  • Host from your own PC, VPS, or dedicated server
  • Docker container with auto-restart
  • Visual config editor in browser
  • Under 5 minutes total

Under the Hood

The full manual process to host a Minecraft - Java Edition dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.

Step 1

Configure & Prepare

Set your server settings, then install Docker, and pull the Minecraft - Java Edition container image.

Server ConfigurationEdit values to update all commands
terminal
# Update system and install Docker
sudo apt update && sudo apt install -y docker.io
sudo systemctl enable --now docker

# Create game server directory
sudo mkdir -p /opt/gameserver

# Server configuration
export GAMEMODE="survival"
export DIFFICULTY="easy"
export LEVEL_NAME="world"
export PVP="true"
export SPAWN_MONSTERS="true"
export WHITE_LIST="false"
export ALLOW_FLIGHT="false"
export SPAWN_PROTECTION="16"
export HARDCORE="false"
export FORCE_GAMEMODE="false"
export ALLOW_NETHER="true"
export LEVEL_TYPE="minecraft:normal"
export GENERATE_STRUCTURES="true"
export ONLINE_MODE="true"
export ENFORCE_WHITELIST="false"
export ENFORCE_SECURE_PROFILE="true"
export ENABLE_RCON="false"
export ENABLE_QUERY="true"
export ENABLE_STATUS="true"
export ENABLE_COMMAND_BLOCK="false"
export VIEW_DISTANCE="10"
export SIMULATION_DISTANCE="10"
export MAX_TICK_TIME="60000"
export NETWORK_COMPRESSION_THRESHOLD="256"

# Pull the container image
docker pull eclipse-temurin:21-jre-alpine
Step 2

Run the Installation Script

Minecraft - Java Edition uses a custom install script to download and configure the server files.

Installation Script
#!/bin/bash

apt update
apt install -y wget curl jq

cd /opt/gameserver || { echo "Failed to change directory to /opt/gameserver"; exit 1; }

# Accept EULA
echo "Accepting EULA..."
echo "eula=true" > eula.txt

# Resolve Minecraft version
MC_VERSION="${MINECRAFT_VERSION:-latest}"
MANIFEST_URL="https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"

echo "Fetching version manifest..."
MANIFEST=$(curl -sSL "$MANIFEST_URL")

if [ "$MC_VERSION" = "latest" ]; then
  MC_VERSION=$(echo "$MANIFEST" | jq -r '.latest.release')
  echo "Latest release version: $MC_VERSION"
else
  echo "Using specified version: $MC_VERSION"
fi

# Get version metadata URL
VERSION_URL=$(echo "$MANIFEST" | jq -r --arg v "$MC_VERSION" '.versions[] | select(.id == $v) | .url')

if [ -z "$VERSION_URL" ] || [ "$VERSION_URL" = "null" ]; then
  echo "ERROR: Version $MC_VERSION not found in Mojang manifest!"
  exit 1
fi

# Get server JAR download URL
echo "Fetching version metadata for $MC_VERSION..."
SERVER_JAR_URL=$(curl -sSL "$VERSION_URL" | jq -r '.downloads.server.url')

if [ -z "$SERVER_JAR_URL" ] || [ "$SERVER_JAR_URL" = "null" ]; then
  echo "ERROR: No server download found for version $MC_VERSION!"
  exit 1
fi

echo "Downloading Minecraft $MC_VERSION server JAR..."
wget -q "$SERVER_JAR_URL" -O server.jar
echo "Download completed."

echo "Install Completed"
Step 3

Open Firewall Ports

Minecraft - Java Edition requires 3 ports to be open for game traffic and queries.

terminal
sudo ufw allow 25565/tcp
sudo ufw allow 25575/tcp
sudo ufw allow 25566/both
25565/TCP(PORT)25575/TCP(RCON_PORT)25566/BOTH(QUERY_PORT)
Step 4

Launch the Server

Start the Minecraft - Java Edition server using the configuration from Step 1.

terminal
docker run -d \
  --name minecraft-java-server \
  -p 25565:25565/tcp \
  -p 25575:25575/tcp \
  -p 25566:25566/both \
  -e GAMEMODE="survival" \
  -e DIFFICULTY="easy" \
  -e LEVEL_NAME="world" \
  -e PVP="true" \
  -e SPAWN_MONSTERS="true" \
  -e WHITE_LIST="false" \
  -e ALLOW_FLIGHT="false" \
  -e SPAWN_PROTECTION="16" \
  -e HARDCORE="false" \
  -e FORCE_GAMEMODE="false" \
  -e ALLOW_NETHER="true" \
  -e LEVEL_TYPE="minecraft:normal" \
  -e GENERATE_STRUCTURES="true" \
  -e ONLINE_MODE="true" \
  -e ENFORCE_WHITELIST="false" \
  -e ENFORCE_SECURE_PROFILE="true" \
  -e ENABLE_RCON="false" \
  -e ENABLE_QUERY="true" \
  -e ENABLE_STATUS="true" \
  -e ENABLE_COMMAND_BLOCK="false" \
  -e VIEW_DISTANCE="10" \
  -e SIMULATION_DISTANCE="10" \
  -e MAX_TICK_TIME="60000" \
  -e NETWORK_COMPRESSION_THRESHOLD="256" \
  -v /opt/gameserver:/opt/gameserver \
  -w /opt/gameserver \
  eclipse-temurin:21-jre-alpine \
  java -Xmx -Xms -jar server.jar nogui

Alternative startup profiles:

  • Aikar's Flags (Optimized)Optimized JVM flags recommended by Aikar for Minecraft servers. Best for servers with 10+ players.
  • ZGC Low LatencyGenerational ZGC for ultra-low pause times. Best for competitive or latency-sensitive servers. Requires Java 21+.

GameCP lets you switch between these profiles with one click.

Or skip all of this

GameCP automates every step above: Docker, port forwarding, startup, and config. Install on your own PC and deploy a Minecraft - Java Edition server in under 5 minutes.

Deploy with GameCP

Ready to Host Your Minecraft - Java Edition Server?

Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.

No credit card required · Free tier available · Install local, scale later

Deploy Free