Don't wanna be here? Send us removal request.
Text
Managing A Simple Family Minecraft Server
In the end, I use my ratcraft script to manage the Minecraft server in the "cloud".
Virtual hardware
I have an Linode shared virtual instance that has the following specs: 4GB RAM 2 Cores, 40 GB SSD, at $20 per month. While cheaper instances may work, we have no problems with more than four users using this instance.
Hosting on an in-house computer works great (and is cheaper after about an year or so) However, having the "cloud" instance is so much easier to manage and getting your friends outside of the home is 100% easier.
The server runs Slackware Linux and I do all server management from the command line using SSH.
It also comes with it's own DNS subdomain, which makes it easy to tell your acquaintances how to access it.
Minecraft Server
We've experimented with mods (and creating them), so we've run Spigot servers locally. On the server that is family-owned we run the "vanilla" Minecraft server (Java Edition).
The server is launched
The server is an Java executable that needs to be kept running within a process. I've opted to manage the process by using the GNU terminal multiplexer screen. This is the start command.
I don't believe I can write that many times, so I wrote a small Bash script to handle it for me.
It's approximately 130 lines of Bash and comes with a couple of commands:
Server upgrades
Minecraft clients automatically upgrade to the latest version as soon as it becomes available.
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:
UPDATE: I no longer manually change the server's name to the version number and keep the old names around. Instead, I let the server.jar that I downloaded server.jar overwrite the previous. This saves me a step, and I haven't needed to downgrade (yet).
So I no longer have to do this step: manually edit the ratcraft script to update the server version:
Then I restart (stop and start) the server with the following command:
In just a few minutes the server will be ready for the updated clients in a matter of minutes.
It's not a high-end solution however, it is:
- Easy enough to understand for me, when I return to it every couple of months
Simple to use and sufficiently automated to not cause any discomfort
Backups
The backup function in the ratcraft script is available. It is called every day by a cron job in Slackware’s /etc/cron.daily directory. The script calls:
The backup instructs the Minecraft server to stop saving, creates a.tgz by using tar –cpvzf from the "world" directory and saves it in the directory "backups".
The backup command can also perform simple backup rotations to make sure that the server does not overflow. Sometimes we'd like to preserve a significant moment in our lives. To do this, I just rename one backup so it doesn’t be removed from the rotation.
How to get/upgrade the JDK
You could just run the Java executable on your system and then update with a package manager. But in my universe it's a bit more manual.
The Minecraft server updates seem to require newer and more recent versions of the JVM. Although I'm not keeping up with Java world, it appears that the best way to download the JVM currently is:
http://jdk.java.net/
I'm not sure how you can obtain just the JRE (runtime environment ) with JVM which is all that should be required 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.
Minecraft server
1 note
·
View note