Minecraft

From SME Server
Jump to navigationJump to search

How-To: Install a Minecraft server and map system on SME Server 10.

Introduction

we assume you have a SME Server in server-gateway mode fully functional, including, domains DNS, IP, ports and SSL certificate using Letsencrypt.

we assume also that your servers will live in /opt/msm. You can add a dedicated drive mounted there.

Install MSM Minecraft Server Manager

install prerequisite: Java 8 is required to run Minecraft versions 1.12 through 1.17. Java 17 is required to run Minecraft version 1.18 and up

yum install java-1.7.0-openjdk

then run the script and fill the questions the same way

# wget -q http://git.io/lu0ULA -O /tmp/msm && bash /tmp/msm
MSM INSTALL: Configure installation
Install directory [/opt/msm]: 
New server user to be created [minecraft]: 
Add new user as system account? [y/N]: y
Complete installation with these values? [y/N]: y

MSM INSTALL: Updating sources
[...]

This will install all the needed element for MSM to work and create a user. It will also update your server and install deps: jq, oniguruma you will need to sync config db and accounts db to sync in order to have service to be enabled and to avoid use of the systemname.

db accounts set minecraft system 
config set msm service TCPPort 25565 status enabled access public

also need to add the scripts for systemd

mkdir -p  /etc/e-smith/templates-custom//etc/systemd/system-preset/49-koozali.preset/
echo '{
# we need to force because the script lives in init.d
$status = $msm{status} || "disabled";
$OUT .= "";
if ($status eq "enabled") {
        $OUT .= "enable msm.service\n" 
}
}
' > /etc/e-smith/templates-custom//etc/systemd/system-preset/49-koozali.preset/80msm
cd /usr/lib/systemd/system ; wget https://github.com/msmhq/msm/raw/master/init/msm%40.service https://github.com/msmhq/msm/raw/master/init/msm.service

/etc/e-smith/events/actions/systemd-default

Install dynmap

we assume you configured dynmap plugin to point to /opt/msm/dymap