How to install MineOS-node in a jail (alternative to using the MineOS plugin)

Joined
Jul 10, 2016
Messages
521
The original posting was made when jails in FreeNAS were managed by warden and as of FreeNAS 11.3, jails are managed using iocage. That being said, the package list and build instructions are still the same.

The only differences would be step #1 and step #6.

Creating a jail in the UI looks very different from how it looked in the pre-11.3 UI. All jail networking options (Shared IP, VNET, DHCP or NAT) should work with MineOS, but if you chose to use NAT you'll have to forward port 8443 and 25565 (or whatever ports you have your minecraft servers listen on).

There's an option/checkbox in iocage that automatically mounts lincprofs upon startup, so that eliminates step #6.

The new iocage plugin is trouble free under FreeNAS 11.3. The only difference is that the plugin script uses a proper rc.d script instead of using the supervisord service.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Hi there. I'd love to use your install steps but I've hit the gyp and npm errors during install. Could you update your OP to reflect an iocage 11.3 jail with all the correct and current packages, please?

Aside: A few days ago I had successfully installed the plugin and had a running mineos server. I then wanted to use your jail technique so I destroyed the plugin/jail. After getting the (above) errors I tried four times to just use the plugin again but got the errors that the packages couldn't be installed. That's when I found this post about the plugin install errors: https://www.ixsystems.com/community/threads/mineos-error.83701/ . I tried your solution in that thread to use your updated plugin script and it's working perfectly. Thanks!
 
Last edited:
Joined
Jul 10, 2016
Messages
521
Yeah, node8 was deprecated and dropped from the quarterly repo this weekend. I'll update the top post.
 

shawndewet

Dabbler
Joined
Feb 28, 2014
Messages
37
Thanks this guide worked a charm for me in trying to get a Minecraft server up and running at home for my kids!
MineOS is up and running, and the server I created on port 25565 shows up and running in the log tail.
The server is even accessible via the https://mcsrvstat.us site.
However, none of my kids' devices are able to connect. They are running Minecraft PE on Android and IOS devices. All of them get the message "Unable to connect to world". I've tried via the internal LAN address to the server, and via the public IP Address of my router (the one that tests ok via https://mcsrvstat.us mentioned above).
Any advice as to where I go from here to determine a root cause?
Edit: Just to circumvent the obvious question. I have confirmed they are all running Minecraft PE 1.14.3. And the server I configured on the mentioned port is for that same version.
 
Joined
Jul 10, 2016
Messages
521
MineOS hosts Minecraft "Java Edition"; this is the original game started by Mojang. When Microsoft bought Mojang, they spun off a different flavor of Minecraft ("Bedrock Edition") to be cross-platform (!) and work on Windows 10 and xBox etc... but this game is not compatible with the Java Edition.

You cannot connect the Minecraft PE client to Minecraft Java Edition server.
That being said, there are some projects out there that intend to bridge the gap, e.g.DragonProxy but I haven't tried these.
 

shawndewet

Dabbler
Joined
Feb 28, 2014
Messages
37
Thanks for that feedback Jurgen. I'm currently looking into getting pmmp up and running instead.
 
Joined
Jul 10, 2016
Messages
521
I was intrigued enough with DragonProxy to try it out. :D

At the writing of this post, Dragon Proxy supports connecting Bedrock 1.14.x clients run to a Java 1.15.2 server.

In the MineOS UI:
  • Create New server using the Official Mojang 1.5.2 profile
  • Start server to initialize
  • If you do not have a Mojang account: (and otherwise you should be playing the Java Edition anyway): Stop server and in the server.properties section, set online-mode = false and start the server again
In the mineos-jail:

Enter the following commands to download and install DragonProxy:
Code:
mkdir -p /usr/local/games/dragonproxy
cd /usr/local/games/dragonproxy
fetch https://ci.codemc.io/job/DragonetMC/job/DragonProxy/lastSuccessfulBuild/artifact/bootstrap/standalone/target/DragonProxy.jar
screen
java -jar DragonProxy.jar 

Type 'stop' in console and review/edit the config.yml file, in particular the following parameters:
  • max-players: the default is 1, this isn't very conducive for multiplayer
  • remote-auth: change to offline if you do not have a Mojang account
  • remote-port: change to match your server, if needed
Start the proxy again with java -jar DragonProxy.jar and type CTLR-a and then d to leave the screen session.

Now you can connect to your Java server using a Bedrock client, just use the IP of your jail and port 19132 (bind-port in config.yml)
 

shawndewet

Dabbler
Joined
Feb 28, 2014
Messages
37
Wow thanks Jurgen! I got it working!
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
I need some help with the fundamental understanding of the Minecraft server, please.

When I first tried it I never could understand where the world saves were located - they were pointed to my local drive in the client GUI launcher. Sooo, then what's the point in the server?

Second, I want to use Forge to run some mods like JourneyMap (because I can't stand not knowing where I am!). I'm unable to run Forge with it pointing to my "saves" folder on my FreeNAS smb share, Forge keeps crashing - I'm only able to run Forge if the files are local. Therefore, can I run a Forge server on FreeNAS?
 
Joined
Jul 10, 2016
Messages
521
Sooo, then what's the point in the server?

Minecraft is a client/server application. Even when you play/construct a single play world, it starts an internal server, running on your client (local computer). This get more obvious in multiplayer mode, where your single world has an "Open to LAN" option, where you (Person A) can share that internal server so other users on your LAN can connect to it. You can even forward the ports to the internet for the whole world to join in the fun.
More info in the Mnecraft wiki.

The server is what takes up most of the resources, as it keep track of all the blocks, chunks, mobs etc... When you have multiple family members/kids building on a major project (Virtual Lego!), you may not want to be dependent on Person A's local machine to be up and running to share/host the server. Instead, you can run that server component on a separate machine that's already "always on", has oodles of memory and many TiB of storage, such as your FreeNAS box... You connect to such external servers in the Multiplayer section.

In addition to Mojang, there is a huge eco-system out there with Minecraft public/freemium servers. You mentioned Forge, which stays fairly close to to the Mojang/Microsoft, but there's also CubeRite, Spigot, etc... These server builds are highly optimized for performance and are compatible with the standard clients/launchers. They will be more stable and faster than the internal server.

Therefore, can I run a Forge server on FreeNAS?
If you run Mineos, you can set up a Forge server with a few clicks.
  • Download the Forge profile with the desired release,
  • Create a new server, start it with the Forge profile. It will default to the Forge*installler.jar
  • The installer will run for a while. When it stops, switch to the other forge*.jar and start it up again. You'll need at least 4 GiB to start the latest versions.
Note that some mods required are on the server, some on the client, and some are required on both. In MineOs, the servers are located in /var/games/minecraft/servers/<servername> This corresponds with the "saves" for your local/single player worlds. In there, you'll have the "mods" directory for Forge servers where you are supposed to drop the various mods. There's the "world" directory that contains your world data, etc...
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
If you run Mineos, you can set up a Forge server with a few clicks.
  • Download the Forge profile with the desired release,
  • Create a new server, start it with the Forge profile. It will default to the Forge*installler.jar
  • The installer will run for a while. When it stops, switch to the other forge*.jar and start it up again. You'll need at least 4 GiB to start the latest versions.
Note that some mods required are on the server, some on the client, and some are required on both. In MineOs, the servers are located in /var/games/minecraft/servers/<servername> This corresponds with the "saves" for your local/single player worlds. In there, you'll have the "mods" directory for Forge servers where you are supposed to drop the various mods. There's the "world" directory that contains your world data, etc...
Awesome info, thanks!

I rolled my own mineOS jail server with your updates from your OP. Thanks for that!
  1. How do I connect the client to the server?
    1. EDIT: Okay, I ran my local client launcher to which I made a new Installation with Forge. I then went to Multiplayer and connected to my freenas mineOS jail:25565. I now had a new world. BTW, I have forge.15.2-latest set as the profile.
    2. EDIT: But wait, every time I run the client launcher, isn't it just running a local server? When I run multiplayer and connect to my mineOS server, am I still running Forge locally or from the server?
  2. When I roll a new server, I only see the option to have one world. Can I just drop my existing single player worlds into the /var/games/minecraft/servers/<servername> folder or do I need a server for EACH world (and can they be single player)?
 
Last edited:
Joined
Jul 10, 2016
Messages
521
1.2: I don't know how this works internally, they may just start up the internal server (or server.jar) when you "connect" to a local world.

2. yes, one server = one world. I wouldn't mess with the worlds in the filesystem. The seed and the release is also part of the server setting, same for the mods folder when you Forge or FTB servers. Some mods can conflict with each other, so you want to keep things separated. I just increment the port 25565 for other servers if I want to keep them running simulatnously, otherwise it's easy to start/stop using mineos.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
2. yes, one server = one world. I wouldn't mess with the worlds in the filesystem. The seed and the release is also part of the server setting, same for the mods folder when you Forge or FTB servers. Some mods can conflict with each other, so you want to keep things separated. I just increment the port 25565 for other servers if I want to keep them running simulatnously, otherwise it's easy to start/stop using mineos.
Thanks!

What is a seed and release?

Can I create a server that matches my single-player world (survival, normal difficulty) and then just copy my local world data into that server's folder?
 

kingtj

Dabbler
Joined
Jun 21, 2011
Messages
26
Wow.... some of this recent discussion is JUST what I was looking for earlier tonight. My teenage daughter started bugging me for help setting up a Minecraft private server for her and a few friends to share to build custom things in the world. I've never really played around with Minecraft other than watching them spend hours in it, but I was able to get the MineOS plug-in going on my FreeNAS 11.3 box.

She knew enough about things to tell me she needed the "Forge" version of the Profile installed, so I got that all up and running, and she was able to connect from her Minecraft installation on her Windows PC. But she's complaining that she doesn't have any usable / commands or OPS access.

I already did the "adduser" command in the MineOS jail and created a new user account with a name and password that matched her Minecraft login credentials, and set the server up under that login - thinking that would do the trick. But I guess not? What am I missing here?
 
Joined
Jul 10, 2016
Messages
521
But she's complaining that she doesn't have any usable / commands or OPS access.

In MineOs, click on the "logs/latest log" in the left side toolbar and select the desired server. This will show you the log and at the bottom there's a command prompt. To make a player an operator, type /op playername . For more info and other commands, type /help.

Players don't need access to the MineOS webUI. A useful feature is that you use it for in game communication, e.g. by typing /say Dinner is ready :)
 
Joined
Jul 10, 2016
Messages
521
What is a seed and release?
The release is the version, by default the launcher is set the "Latest release", but you can chose to play older versions. This is more important for Forge, as mods are tied to a release.

The seed is what the world generator uses to generate a world. The same seed and release will result in the same world. You can provide this in the server settings when you create a new server. If you leave it blank, it generates a random seed. There are lot of places on the internet where people who ended up with a particularly nice or interesting world publish the seed for others to enjoy.

You could use the /seed command on your old/local server to retrieve the seed, and use it to rebuild that world. This only goes for the generated landscape though, not for the stuff you built yourself. As you suggest, you can replicate by copying from %appdata%\.minecraft\saves\<worldname> to /mnt/<pool>/iocage/jails/<jailname>/root/var/games/minecraft/servers/<servername>/world The easiest way is to use a program such as WinSCP or alike. Avoid creating a Windows share on your iocage dataset, as it may change permissions and break something.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
The release is the version, by default the launcher is set the "Latest release",..
Ah! I knew that. haha I just didn't understand it in the context of the reply.

The seed is what the world generator uses to generate a world. You could use the /seed command on your old/local server to retrieve the seed, and use it to rebuild that world. This only goes for the generated landscape though, not for the stuff you built yourself.
Oh wow cool! I didn't know that, thanks!

As you suggest, you can replicate by copying from %appdata%\.minecraft\saves\<worldname> to /mnt/<pool>/iocage/jails/<jailname>/root/var/games/minecraft/servers/<servername>/world Avoid creating a Windows share on your iocage dataset, as it may change permissions and break something.
Thanks so much for taking the time to explain some of these fundamental functions! I've run into the smb share permissions issue whenever I create a new server (not visible in the mineOS GUI until I change permissions back to "games (13)" despite there being a mcserver user and games group in my FreeNAS accounts. It's annoying but easily fixable and the permissions persist. I'm not sure though why I - as a member of 'games' can't manipulate the files. Oh well. But thanks for confirming that I can copy over a world to the servers/<servername> folder.
 

Dunuin

Contributor
Joined
Mar 7, 2013
Messages
110
Got some problems:
1.) There are no "profiles" or "spigot" entries listed. I think MineOS can'T fetch them online but everthing else in the jail can go online.
2.) I put the new plugins in the plugin folder but no plugins are started. I can connect to the server and play but have no Mods running....Maybe because I copied the spigot.jar directly into the folder without using the not working GUI?
3.) Most of the time when I start the server its status stays at "stopped" but it is running.

Anyone with the same problems?
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Got some problems:
1.) There are no "profiles" or "spigot" entries listed. I think MineOS can'T fetch them online but everthing else in the jail can go online.
2.) I put the new plugins in the plugin folder but no plugins are started. I can connect to the server and play but have no Mods running....Maybe because I copied the spigot.jar directly into the folder without using the not working GUI?
3.) Most of the time when I start the server its status stays at "stopped" but it is running.

Anyone with the same problems?
Write permissions are what I had trouble with and had to just go with the plugin to get permissions to be set properly.
 
Top