digiMoot:

TrueNAS: Install Minecraft Server

TrueNAS Install Minecraft ServerTrueNAS: Install Minecraft Server? Yep. Why not? You already have a TrueNAS sever up and running and you want to play a bit of Minecraft on your own, with some buddies or the family. Minecraft servers running MineOS don’t take a ton of resources and can usually easily be run along side of everything else on your TrueNAS server. So lets setup and install Minecraft in its own jail on your TrueNAS sever. This guide is pretty straight forward and is based on the community based TrueNAS  plug-in. Alternatively you could try a manual install by following the instructions here from Jurgen Segaert who is a prolific member of the TrueNAS community who also appears to maintains the Github page for this plugin.

The plug-in install process is pretty straight forward, but this guide will walk you through that before helping you setup your first server, which is actually the more difficult part! There were definitely a few points that snagged me and so, lets make sure you don’t get caught in the same spots! Alright, so lets begin this setup of TrueNAS: Install Minecraft Server!

This is part of my ongoing series of TrueNAS and FreeNAS setup, configuration and install articles.

Installing Minecraft in a TrueNAS Jail

This is the simplest part! of this TrueNAS: Install Minecraft Server article. From your TrueNAS web interface, select plugins from the left hand menu and the click the drop down menu under ‘Browse a Collection’ located in the top left of the new frame. Select ‘Community’.  You will see a list plugs listed below and then you will need to scroll over and select MineOS and then click the ‘Install’ button. You will receive a warning about this being a community add-on. You can select ‘Continue’.

You will be presented with a new window and you can now put in the server information. You just need a jail name and to setup the network parameters. You are probably going to want to use DHCP for automatic network configuration, but select what is appropriate for your network. Click save and the installation process will begin. It will take a few minutes and timing will depend on your internet speed.

When its done you will get a popup window which should say “Plugin installed successfully”. Don’t close this window yet! It will look something like below and will contain some critical information for you.

TrueNAS Minecraft Installed Sucessfully
This window includes important information so don’t close it quite yet!

If you scroll down to the bottom of this window, you will see that this window gives you the information you need to sign into the MineOS webUI. Let’s copy that link (which in the image above for my system is http://10.10.11.105:8443) and paste it into a new browser window or tab.

WebUI Login and Creating a Minecraft Server

So the next step in this TrueNAS: Install Minecraft Server article is to login to the WebUI and setup your first Minecraft Server. If you’ve put in the address from above, you should now be looking at a login screen for your MineOS webUI. As noted in the importation information window above, the default login is:

u: mcserver
p: mcserver

Go ahead and punch your login credentials in and you should be presented with the interface very similar to below.

TrueNAS Minecraft MineOS WebUI
TrueNAS Minecraft MineOS WebUI

So now you’re in and so lets start creating your first server. Start by clicking “Create New Server” button (what a shock, right!) and you will be presented with a window which shows all your server settings. Go ahead and set this up how you’d like, but here is some commentary on some of the less self explanatory fields:

server-port: this is the port that your server will run on. If you are running more than one server, you will need to set them up on different ports, and when connecting from your Minecraft game you will need to specify this port, if it is not the default port of 25565.

server-ip: leave this as default (0.0.0.0) to use the ip address of your jail.

level-name: this is the level name and actually corresponds to the directory name of the world in your server (e.g. /var/games/minecraft/server/*server name*/*level-name*)

The rest of the items are self-explanatory or related the characteristics of your Minecraft game itself and so you can set them as you prefer. When you’re happy with the settings, click “Create New Server”. Once you do, you will be brought back to the main dashboard and your new server should be show at the bottom of the screen.

Configuring Minecraft Server

We now need to create a profile and a spigot for your server based on the desired Minecraft release (note: if you would like to use 1.17, you will need to also follow the steps in the digiMoot TrueNAS: Minecraft Server 1.17 article).

First lets set a profile by clicking the “Profiles” button on the left menu. Click the green “Download” button beside your desired version and you will need to wait a few minutes (depending on your internet speed) for the profile to download.

Second,  lets create a Spigot by clicking “Spigot” on the left menu. First you will need to click the “Download latest BuildTools.jar” button. Once that is done, you can click the “Build Spigot” button beside the version number you’re working with. After that, you should have three buttons beside your version number on this Spigot page, looking something like the image below. 

TrueNAS Minecraft MineOS Spigot
TrueNAS Minecraft MineOS Create Spigot

You will need to copy the spigot to your server by clicking the blue “Copy to Server” button and then selecting your server on the next pop-up window and clicking the green “Copy to Server” button.

A couple of more things to do before starting our server. First, if you don’t have an online Minecraft / XBox / Microsoft account, you will need to tell your server that it is standalone and not to look to the online servers for account information.If you don’t have an online account and don’t make this change you will get error message when trying to play, something like the following:

Failed to login: Invalid session (Try restarting your game and the launcher)

or

Failed to verify user name!

To set offline mode, click on the “Server.Properties” on the left webUI menu. On this page click the plus icon in the top right corner to add a new server property. In the left box you will enter the item online-mode and in the right box you will set it to false. It will look like the image below.

TrueNAS Minecraft MineOS Online Mode False
TrueNAS Minecraft MineOS Online Mode False

Click add and the new property should now be listed (you may need to refresh the window for it to show up). If you want to do this manually then you can edit drop to the jail’s shell and edit the config file directly at:

/var/games/minecraft/servers/*SERVERNAME*/server.config

Now the final thing we need to do is to accept the End User License Agreement (EULA). To do this, click on “Server Status” in the left menu. You will see a grey “Accept EULA” button which you can go ahead and click that and then click the “Accept EULA” button in the next window as well (not the “Start” button, not quite ready for that).

Starting Minecraft Server

We are at the last steps of this TrueNAS: Install Minecraft Server article and are just about ready to start the Minecraft server. You should still be on the “Server Status” page which would look something like the image below.

TrueNAS Minecraft MineOS Server Status
TrueNAS Minecraft MineOS Server Status

there are a few things for you to set here:

  1. Under Server Actions: change the “Change profile to:” drop down menu to the profile you created above
  2. Under Server Actions: you may want to select “Broadcast to LAN” and/or “Start server on boot” options.
  3. Under Java Settings: change the “Change runnable jar to:” drop down menu to the jar you created above.
  4. Under Java Settings: set the memory amount to your desired amount under both the “-Xmx” and “-Xms” options.

Once you have all of this setup, you are ready to hit that enticing, big, green “Start” button. Go ahead, and hit that button! I know you’ve been wanting to.

If everything is setup correctly, you should see the status of your server change (and stay) at up in the top left of the server status frame. You should now be able to login to your Minecraft games, goto multiplayer and add a new server using the information for this server!

Minecraft 1.17

As noted within this article, you are going to have to do couple updates in order to use the latest (at the time of this post) version of the Minecraft environment. I’ve posted how to update the TrueNAS server in the short digiMoot TrueNAS: Minecraft Server 1.17 article. Please go and check that out to be sure you can run this latest version.

Alright that’s it for this TrueNAS: Install Minecraft Server article. You should be up and running with your Minecraft MineOS sever on your TrueNAS server!

Happy minin’!

~digiMoot

Liked it? Take a second to support digiMoot on Patreon!

4 thoughts on “TrueNAS: Install Minecraft Server

  1. I am unable to install via webUI as I just keep getting the following error:

    Error: MineOS had a failure Exception: RuntimeError Message: + Starting services FAILED ERROR: [b’jexec: execvp: /bin/sh: Permission denied\n’] Refusing to start MineOS: exec_start failed Partial plugin destroyed

    1. I did the method by Jurgen Segaert but I get nothing loading on the actual page. Formatted incorrectly, buttons not working, etc.

      1. I have figured out my problem please ignore my comments. My jail storage had messed up permissions. I deleted and recreated and all good.

        Just a side question though… How would one add a modpack to run on this server?

Leave a Reply

Your email address will not be published. Required fields are marked *