Deploy a Minecraft Server on Docker with NetEase Hive in Minutes
This guide walks you through manually setting up a Minecraft server on a Linux container and then automating the process with a Dockerfile on NetEase Hive, covering required tools, server files, Dockerfile details, and runtime configuration for a smooth gaming experience.
Introduction
Minecraft is a Java‑based sandbox game that runs from a single JAR file. To let friends join a shared world without the limitations of public servers, this tutorial shows how to create a dedicated Minecraft server using NetEase Hive’s container platform.
Manual Server Setup on a Linux Container
Before using Docker, you can launch the server manually by following these steps:
Create a Linux container (Ubuntu, Debian, or CentOS – the example uses Debian).
Install a JRE or JDK inside the container.
Install basic utilities such as tmux and vim.
Download the official Minecraft server JAR.
Run the server JAR inside a tmux session so it continues in the background.
Perform basic server configuration (e.g., accept the EULA, set server.properties). tmux is used to keep the server running while allowing you to execute commands like adding operators or banning IPs without stopping the game.
Automating with a Dockerfile
Manual steps are tedious, so the tutorial switches to a Docker‑based approach. NetEase Hive provides a JDK base image; the Dockerfile adds the required tools, creates a working directory, copies the server JAR, and defines an entrypoint that launches the server inside tmux and enables SSH access.
The Dockerfile consists of four main parts:
Base image selection (Hive’s JDK image).
Installation of utilities (e.g., tmux, vim).
Creation of a working directory and downloading the Minecraft server JAR (the tutorial uploads the JAR to an OSChina Git repository, but any URL can be used).
Entry point that starts tmux with the server and opens SSH.
Essential Server Files
eula.txt : Contains eula=true; the server will not start until this agreement is accepted.
server.properties : Holds configuration parameters. The tutorial highlights online-mode=true, which enables authentication against Minecraft’s official account service. Disabling it ( online-mode=false) allows anyone to log in with any username, which is insecure.
Other files such as banned-ips.json, banned-players.json, and ops.json manage blacklists and operator lists.
Building and Running the Container
Build the custom image with docker build -t my-mc-server . and create a container using Hive’s UI or CLI (refer to Hive’s documentation at https://c.163.com/wiki/index.php?title=创建自定义镜像 and https://c.163.com/wiki/index.php?title=创建容器). After the container starts, connect with the Minecraft client to the container’s external IP.
Tip: Allocate at least 1 GB of memory to the container, as Minecraft is memory‑intensive.
Conclusion
The tutorial demonstrates the simplest way to launch a Minecraft server using Docker on NetEase Hive, while noting that further automation (e.g., environment variables, custom scripts) can make the setup more flexible and elegant.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
