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

chravis

Contributor
Joined
Jan 27, 2019
Messages
104
I feel like I'm missing the boat on this. Any advice would be much appreciated.
When I run my scripts I get errors like:
Code:
supervisord does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable

and
Code:
Destination: /mnt/tank/iocage/jails/mineos/root/var/games/minecraft does not exist or is not a directory.

I thought maybe it could be because I was missing the line where I actually start the jail (I see that line in the instructions on this thread) but I get a message saying the jail has already been started.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Code:
supervisord does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
So you did not do a pkg install py38-supervisor in your script, it seems.

Code:
Destination: /mnt/tank/iocage/jails/mineos/root/var/games/minecraft does not exist or is not a directory.
You need to create that empty directory if you want to mount a dataset there.
 

chravis

Contributor
Joined
Jan 27, 2019
Messages
104
@Patrick M. Hausen - you are correct, I don't have a pkg install py38-supervisor , but I did have py37-supervisor (along with py37-rdiff-backup and python37). I have replaced "37" with "38" in my script and I think I've gotten past that particular issue.

As for the mounting issue - I believe that directory is created by the server (?). After my script runs, that directory is indeed there. So I don't know if it's a timing issue or something. Maybe I'm trying to create the mount point before the server has had time to create the directory.

Update - I added a "sleep 45" in my script and then it created the mount point successfully, so I guess it was a timing issue.
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
FreeBSD just updated the default version of Python from 3.7 to 3.8 with this quarter starting July, 1st.
 

chravis

Contributor
Joined
Jan 27, 2019
Messages
104
So I've made progress with setting up the jail and mineos. I am able to log into the MineOS web gui using the user mcserver. I can download a new profile. However, when I attempt to create a server, I give the server a name and submit, the screen goes to the dashboard, but no server is created. I don't know if this is a permissions issue or what, but I'm not seeing any error messages anywhere either.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Probably. Your mcserver user should be in the games group and the directory and all subdirectories set up like this:
Code:
root@mineos:~ # ll /var/games/
total 12
drwxr-xr-x  7 mc  games  8 Dec 29  2020 minecraft/
root@mineos:~ # ll /var/games/minecraft/
total 3
drwxrwxr-x  3 mc  games  3 Dec 29  2020 archive/
drwxrwxr-x  3 mc  games  3 Dec 29  2020 backup/
drwxrwxrwx  2 mc  games  2 Dec 29  2020 import/
drwxrwxr-x  4 mc  games  4 Feb 16 18:40 profiles/
drwxrwxr-x  3 mc  games  3 Dec 29  2020 servers/

My user is named mc - just replace mc with mcserver.
 

chravis

Contributor
Joined
Jan 27, 2019
Messages
104
I think I need to step back and take a break. I can't seem to get it all to work start-to-finish. My ultimate goal was to have one script to rule them all (so that when things inevitably break, I can reinstall everything exactly the same way with ease) and without having to "run script, now go change permissions, now go do this, and don't forget this...".
Just when I think things are working, ie I can log into the gui, I can't actually create a server, or I can't start a server.
I have even just installed via the plugin, logged in, downloaded the profile Papermc-1.16.5-latest, created a server, but the server won't start. Just nothing happens when I click Start.
 

chravis

Contributor
Joined
Jan 27, 2019
Messages
104
Well I stepped back and decided to start fresh with the plugin.
I created a new dataset. I didn't change anything from the default configs on the new dataset. /mnt/tank/mineosdata
Then I installed the plugin successfully.
Now I know I need to install java16 in order for MC 1.17 to work, so I went into the jail and ran the following. I'm really not sure if uninstall was necessary or not.

Code:
root@mineos:~ # java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-1)
OpenJDK 64-Bit Server VM (build 11.0.11+9-1, mixed mode)
...
root@mineos:~ # pkg remove openjdk11-jre-11.0.11+9.1
...
root@mineos:~ # pkg install openjdk16
...
root@mineos:~ # java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-1)
OpenJDK 64-Bit Server VM (build 16.0.1+9-1, mixed mode, sharing)


Then I stopped the jail and ran the following in order to mount the dataset:
Code:
cp -a /mnt/tank/iocage/jails/mineos/root/var/games/minecraft/ /mnt/tank/mineosdata/
iocage fstab -a mineos "/mnt/tank/mineosdata /var/games/minecraft nullfs rw 0 0"


I started the jail back up and went to the web gui, logged in as mcserver, and downloaded the Mojang 1.17.1 profile.
I created a new server.
I went into the server, selected the profile, selected the runnable jar, set the -Xmx to 4096.
Click Start and nothing at all happens.
Is there anywhere I can look to see why this is not working?

Update: My particular problem is solved related to the server not starting. See the forum thread here.
 
Last edited:

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Just a quick thank you to the OP and the other contributors who enabled me to get this running on 12.0-U5.

The MineOS bit was relatively straightforward, but I struggled to get a server up and running for some time as I couldn't select/change the runnable .jar

I think the iocage set mount_linprocfs=1 mineos command eventually fixed that, and I now have a server up and running than I can connect to on some devices.

Little did I know before I started this just how much of a minefield Minecraft is! Different servers and clients, so many different version and cross-platform compatibility. I suspect it will taken me even longer to try and get my various client all connected into the same server :D
 
Joined
Jul 10, 2016
Messages
521
Yeah, once you down the rabbit hole, you find that the scope of the Minecraft ecosystem is enormous.

The mount_linprocfs checkbox that is in the FreeNAS Gui is no longer in the TrueNAS gui, but I updated the OP to run the command. It used be be easier to setup servers in MineOS, but now the newer servers require newer versions of Java, but these can break some of the older Forge servers and mods that are still very popular. The upstream project is still working to intergrate this functionality in the MineOs UI, but there are some posts in this thread with the manual workarounds.

Have fun! :grin:
 

Mewandwing

Cadet
Joined
Nov 20, 2021
Messages
1
Hi guy just starting to play around with it all, trying get MineOS Plugin install and im getting this error
MineOS thing.PNG


How can I get this fixed?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi all, sorry to bring back a dead thread.

My oldest is 5 now and I was trying to run him a Minecraft Server, so we can play together. I tried the instructions but it looks like the npm building isn't working. Is MineOS-node still being actively maintained? Seems like it's trying to pull in alot of old stuff which is causing issues.

I gave up and just used the minecraft-server port, which worked fine, but I was spoiled with the MineOS web-ui which let me create/destroy MC server worlds easily.

Thanks!
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Hi all, sorry to bring back a dead thread.

My oldest is 5 now and I was trying to run him a Minecraft Server, so we can play together. I tried the instructions but it looks like the npm building isn't working. Is MineOS-node still being actively maintained? Seems like it's trying to pull in alot of old stuff which is causing issues.

I gave up and just used the minecraft-server port, which worked fine, but I was spoiled with the MineOS web-ui which let me create/destroy MC server worlds easily.

Thanks!
Check my signature for an install script that works.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks @victort I'll take a look!
Looking at some other threads it sounds like iocage based plugins are somewhat discouraged now. While it's a shame, I think us stanch FreeBSD users should just focus on maintaining documentation / scripts to keep things working well on FreeBSD. The port system is great too for a centralized way to maintain scripts/instruction, and should be maintained indefinitely. I always wanted to get a MineOS FreeBSD port built, so maybe one day when my kids don't eat up all my time, I'll restart that project.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
BTW, reading your script and using it as a template worked! I think the key was using node16.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I always wanted to get a MineOS FreeBSD port built, so maybe one day when my kids don't eat up all my time, I'll restart that project.
It might not be worth the effort. The problem is that node based software pulls additional parts at build time. That is forbidden by the FreeBSD ports system and while still working interactively will break in poudriere. All parts necessary to build must be fetched first, and there must be valid checksums etc.

The way many "modern" software products are built is actually bad practice. Some port maintainers work around this by providing a download repo for those artefacts themselves, e.g. on Github. Others just go ahead and do the fetch - these are the ports you will find on Github and at first wonder why they are not in the official FreeBSD ports tree. Many Python based ports face the same challenge.

A good up to date blog post with install instructions would probably do the best possible.

Kind regards,
Patrick
 
Top