p>In the end, I utilize my ratcraft script to manage the Minecraft server in the "cloud".

/p>

p>Virtual hardware

/p>

p>I have a Linode shared virtual instance with the following specifications: 4GB RAM 2 Cores and 80GB SSD for $20 a month. The less expensive instances might be a good idea, but we've had no issue with four or more users playing on this instance.

/p>

p>Hosting on a home computer is great and could cost less after a year. However having a "cloud" instance is so much simpler to manage and is more convenient to connect with people outside of the home.

/p>

p>The server runs Slackware Linux and I do all server management from the command line through SSH.

/p>

p>It also comes with it's own DNS subdomain, making it easy to share with friends how to get it.

/p>

p>Minecraft Server

/p>

p>We've played around with mods (and creating them) and have run Spigot servers locally. However, on our family server, we run the so-called "vanilla" Minecraft server (Java Edition).

/p>

p>The server is launched

/p>

p>The server is an Java executable that must be maintained within the context of a process. I've decided to control the process with the GNU terminal multiplexer screen. The start command would appear like this:

/p>

p>Obviously I'm not going to type that more than a few times, so I wrote an application (a wee Bash script) to manage this for me called ratcraft.

/p>

p>It contains about 130 lines of Bash, and a few commands.

/p>

p>Server upgrades

/p>

p>Minecraft clients automatically upgrade to the most recent version when it becomes available.

/p>

p>Getting the latest server to match is as simple as grabbing the tarball link from minecraft.net/download/server and downloading it on the host:

/p>

p>UPDATE: I no longer manually change the name of the server in accordance with the version number. The old ones are still available. Instead, I let the server.jar version that I downloaded server.jar replace the previous version. Saves a step and I've not had any need to downgrade (yet).

/p>

p>This is the reason I no longer edit manually the ratcraft script in order to update the server version.

/p>

p>Then, I restart the server (stop and start) with ratcraft.

/p>

p>In just a few minutes the server will be ready for the updated clients.

/p>

p>It's not a high-end solution It's:

/p>

p>It's easy enough for me to understand when I revisit it every couple months

/p>

p>- Automated enough not to be a hassle to use

/p>

p>Backups

/p>

p>The ratcraft script comes with an option to backup. It is called daily by a cron job within Slackware’s /etc/cron.daily directory. The script simply calls:

/p>

p>The backup informs the Minecraft server to stop saving, and creates a .tgz using tar -cpvzf from the "world" directory and saves it to a "backups" directory.

/p>

p>The backup command can also perform simple backup rotations to make sure that the server does not overflow. Occasionally we might wish to preserve an important moment in our world So I simply rename one of the backups to ensure it doesn't get removed in the rotation.

/p>

p>How do I upgrade the JDK

/p>

p>Perhaps you can use the Java executable on your system and update with a package manager. https://notes.io/qd6K6 In my case, it's a little more manual.

/p>

p>The Minecraft server updates seem to require newer and more recent versions of the JVM. I'm not keeping up with the Java world at all now However, it appears the current best location to get the JVM is:

/p>

p>http://jdk.java.net/

/p>

p>I don't think you can find the JRE (runtime environment ) without JVM) that's all you require to run the Minecraft server. It's not that big of a deal. The JDK is simply a bigger download, since it's a subset of JRE along with compilers and libraries, etc.

/p>


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-09-15 (木) 11:09:24 (595d)