Deployment Overview of Minecraft Java Edition Server on Server¶
Prerequisites and Basic Requirements¶
The following requirements must be met before deploying the Minecraft Java Edition Server:
-
Operating System: Ubuntu (specific version compatible with the installation script)
-
Privileges: Root access or
sudoprivileges are required for installation and configuration -
Domain: The
hostkey.inzone is configured for domain management -
Network: The server must have access to the internet to download the installation script and SSL certificates
FQDN of the Final Panel¶
The fully qualified domain name (FQDN) for accessing the Minecraft Java Edition Server follows this format:
-
<prefix><Server ID>.hostkey.in:<external_port> -
Example structure:
minecraft<Server ID>.hostkey.in:12333 -
The daemon service uses the port range
12444for its specific endpoint.
File and Directory Structure¶
The application and configuration files are organized in the following locations on the host system:
-
Nginx configuration directory:
/root/nginx -
Nginx user configuration:
/data/nginx/user_conf.d/<prefix><Server ID>.hostkey.in.conf -
Docker Compose file:
/root/nginx/compose.yml -
SSL Certificates: Stored within the Docker volume
nginx_secretsmounted at/etc/letsencryptinside the container -
Environment configuration:
/data/nginx/nginx-certbot.env
Application Installation Process¶
The application is installed using a provided shell script that automates the setup of dependencies and the service container:
-
Update system packages to ensure compatibility.
-
Download the installation script from
https://script.mcsmanager.com/setup_cn.shto/root/setup_cn.sh. -
Execute the script with the following command:
-
The script installs Docker and proceeds to configure the reverse proxy and application services.
Docker Containers and Their Deployment¶
The server deployment utilizes Docker Compose to manage the Nginx reverse proxy and SSL certificate management.
-
Image:
jonasal/nginx-certbot:latest -
Restart Policy:
unless-stopped -
Network Mode:
host -
Volumes:
-
nginx_secrets(external) mounted to/etc/letsencrypt -
/data/nginx/user_conf.dmounted to/etc/nginx/user_conf.d -
Environment Variables: Defined in
/data/nginx/nginx-certbot.envandCERTBOT_EMAIL -
Deployment Command:
Proxy Servers¶
Nginx acts as the reverse proxy and SSL terminator for the Minecraft Java Edition Server.
-
SSL/TLS: Managed automatically via Certbot within the Docker container.
-
Certificates: Stored in
/etc/letsencrypt/live/<prefix><Server ID>.hostkey.in/ -
Configuration: The Nginx configuration listens on external ports and forwards traffic to internal service ports.
-
Features:
-
Support for WebSocket upgrades
-
Client max body size set to 10240M
-
Proxy buffering is disabled
-
Real IP forwarding via
X-Forwarded-Forheader
The configuration defines two server blocks:
-
Main Service: Listens on the external port for standard traffic.
-
Daemon Service: Listens on the external daemon port for specific daemon operations.
Both blocks use the same domain name and SSL certificate configuration.
Permission Settings¶
File and directory permissions are set as follows during the deployment:
-
/root/nginx:0755(owner: root, group: root) -
/data/nginx/user_conf.d/<prefix><Server ID>.hostkey.in.conf:0644(owner: root, group: root) -
/root/nginx/compose.yml:0644(owner: root, group: root) -
Installation script
/root/setup_cn.sh: Executable permissions (o+x)
Location of Configuration Files and Data¶
Key configuration and data files are located at:
-
Main Nginx Config:
/data/nginx/user_conf.d/minecraft<Server ID>.hostkey.in.conf -
Docker Compose:
/root/nginx/compose.yml -
SSL Environment Variables:
/data/nginx/nginx-certbot.env -
Installation Script:
/root/setup_cn.sh
Available Ports for Connection¶
The following ports are configured for external and internal communication:
| Port Type | Port Number | Description |
|---|---|---|
| External (Main) | 12333 | Public facing port for the main Minecraft service |
| Internal (Main) | 23333 | Internal port used by the application container |
| External (Daemon) | 12444 | Public facing port for the daemon service |
| Internal (Daemon) | 24444 | Internal port used by the daemon service |
Starting, Stopping, and Updating¶
Service management is handled via Docker Compose commands executed within the /root/nginx directory:
-
Start the services:
-
Stop the services:
-
Update the services: To update the image and configuration, pull the latest changes and restart: