Open regimeG opened 9 months ago
That looks like it was setup as a plugin jail which should make that easy.
Try iocage update JAILNAME
(where JAILNAME is the name of your jail)
Thanks for the quick reply. I get the following error: /mnt/Pool1/iocage/jails/jellyfi/jellyfi.json was not found
Either remake the missing .json
or remake the jail using a URI to the .git
of that repo
I'm afraid I've strayed off the road a bit. What do you suggest is the best way to run your Jellyfin server so that I can easily update it the intended way in the future?
If you don't have much experience with it and are using TrueNAS CORE I advise using a "thick" jail with just jellyfin and mounting in anything that you need. A "thin" jail or even a different jail manager (pot, cbsd, bastile, others...) under FreeBSD handle this much better than iocage
and TrueNAS CORE. Their plugin system was OK until they killed it.
The "simple but not completely easy" for TrueNAS CORE would be: Create jail that will work for jellyfin; FreeBSD 13.2-Release or higher, mlock enabled, network enabled -> Install just jellyfin via pkg; motoring software is OK here (e.g., Zabbix) -> mount in resources you want jellyfin to use (e.g., "Music") -> Enjoy!... -> update jellyfin either using iocage
from the host or pkg upgrade
inside the jail.
Thanks for your support, but I don't think I'm tech savvy enough to safely maintain Jellyfin in this way permanently.
So far I had the following plan:
->pkg install wget
-> cd /mnt/Pool1/iocage/jails/jellyfi
-> wget https://raw.githubusercontent.com/spz2k9/iocage-plugin-jellyfin/master/jellyfin.json
-> iocage update jellyfin
Unfortunately none of this works.
Can you perhaps tell me how I can restore the .jason file?
@spz2k9 Please add an INDEX
file to your repo or copy the repo and add an INDEX
to it. This will allow the creating of a plugin jail directly via iocage fetch -g https://github.com/spz2k9/iocage-plugin-jellyfin/ -n NAMEOFJAIL -P jellyfin
{
"jellyfin": {
"MANIFEST": "jellyfin.json",
"description": "Jellyfin Server for FreeBSD",
"name": "Jellyfin",
"official": false,
"primary_pkg": "jellyfin"
}
}
Other fields include "icon" for the TrueNAS GUI. TrueNAS is removing "plugins" at some point in the future so it is not needed. iocage
will still work.
Result + "Plugins" GUI screenshot
root@iocage:~ # iocage fetch -g https://github.com/spz2k9/iocage-plugin-jellyfin/ --name jelltest -P jellyfin
Plugin: Jellyfin Server
Official Plugin: False
Using RELEASE: 13.2-RELEASE
Using Branch: 13.1-RELEASE
Post-install Artifact: https://github.com/spz2k9/iocage-plugin-jellyfin.git
These pkgs will be installed:
- libva-utils
- libva-intel-media-driver
- python39
- jellyfin
Testing Host DNS response to pkg.FreeBSD.org
Testing jelltest's SRV response to pkg.FreeBSD.org
Testing jelltest's DNSSEC response to pkg.FreeBSD.org
Installing plugin packages:
- libva-utils...
- libva-intel-media-driver...
- python39...
- jellyfin...
Fetching artifact...
Cloning git repository
Branch 13.1-RELEASE does not exist at https://github.com/spz2k9/iocage-plugin-jellyfin.git!
Using "master" branch for plugin, this may not work with your RELEASE
Running post_install.sh
Updating iocage-plugins repository catalogue...
iocage-plugins repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
jellyfin_enable: -> YES
Starting jellyfin.
Admin Portal:
http://192.168.0.195:8096
Doc URL:
https://github.com/Thefrank/jellyfin-server-freebsd
@regimeG above should be a much smoother solution for the future :)
First of all, thank you for the great help. Jellyfin has become very, very important to me and I now have a TrueNAS Mini+. Expensive enough that I have no other alternative at the moment. One-click solution via plugin was extremely attractive to me, so I went with TrueNas. I never intended to operate outside of the GUI. So I don't know if I have a repo, where it is or how to deal with it. My system consists of the pure TrueNAS Core and your link to install Jellyfin. ...just so you know what my level of knowledge is.
For now, please let's go through your instructions step by step.
How exactly do I add an index to my repo?
@Thefrank adding the INDEX file could be an option... not sure if it would break something on TrueNas end as they're the one that control the INDEX file and none of the other plugins have one.
Also they merged the "new" 13.2 plugin last week so the plugin should be working in the next release if it's not already working.
So I could switch back to the community plugin? That would of course be the best solution. But would the configuration be adopted? Because I have currently installed Jellyfin via your link (fetch https://raw.githubusercontent.com/spz2k9/iocage-plugin-jellyfin/master/jellyfin.json iocage fetch -P ./jellyfin.json --name jellyfin rm ./jellyfin.json)
The community plugin will be the best and easiest until iXsystems gets rid of plugins which could be as soon as the next minor release but more likely the next major release.
Most simple: You can export (or just copy out) your settings and import them into the plugin. Best: If you mounted in a dataset for your configuration/settings/cache just mount that into the new jail.
What will replace the plug-in system afterwards? How will all the people who use Nextcloud, Plex or Syncthing, for example, continue to run these important services?
Ok, I'm giving up at this point. Maybe the language barrier is too great for me to express myself clearly, or maybe I just don't understand you.
I can't find an export function for the Jellyfin settings, nor do I understand what you mean by "mount in a dataset". I must really be too stupid.
I just leave everything as it is and hope that the security holes are not exploited for as long as possible.
I have to admit, I'm pretty down after you described the perspective for TrueNAS Core and the plugins. I'll pop in here from time to time and see if there's any news. Maybe it won't be as bad as you fear.
Sorry for the inconvenience and thanks a million for your patience.
What will replace the plug-in system afterwards? How will all the people who use Nextcloud, Plex or Syncthing, for example, continue to run these important services?
Ok, I found something about it myself. https://www.truenas.com/blog/the-future-of-truenas-plugins-is-apps/
@regimeG I've made a test plugin with TrueNAS-13.0-U6.1 (The latest) and now the jail does get created with 13-2. I've also updated my own jellyfin plugin with the UI (in the jail pannel) and now it's running 13.2-RELEASE-p5. So it seems the commit for the jail did get shipped with the update to U6.1.
@regimeG Yes seems plugins will probably be removed... but Apps are only for Scale (for now at least)... but the thing is to properly use the Apps on Scale is more complex than on Core.
@regimeG I've made a test plugin with TrueNAS-13.0-U6.1 (The latest) and now the jail does get created with 13-2. I've also updated my own jellyfin plugin with the UI (in the jail pannel) and now it's running 13.2-RELEASE-p5. So it seems the commit for the jail did get shipped with the update to U6.1.
Yep, I've just tested it too. The only problem that remains for me is how to transfer the settings from your plugin to the community plugin. Respectively from Jellyfin to Jellyfin. Updating your plugin leeds again to the error, that the .json file is missing.
The fact that I have to set up Jellyfin again is actually less of a problem for me. The bigger problem is that my family and friends' clients would all have to log in again. I would like to prevent that, if possible.
@regimeG Json file missing? Weird I didn't get that error when updating the plugin from the jail UI.
fetch https://raw.githubusercontent.com/spz2k9/iocage-plugin-jellyfin/master/jellyfin.json iocage fetch -P ./jellyfin.json --name jellyfin rm ./jellyfin.json
this is the command I used to install your plugin. It's in the last line...
Oh. ok... I still had the 13.1-RELEASE-p9 plugin installed and did an update with the update button in the Jail pannel... to upgrade it to 13.2-RELEASE-p5.
To copy from the OLD jail to the NEW jail... I suppose the only way would be to copy the files from /var/db/jellyfinserver from only jail to the other. I don't recall how I had the jail path in my script... I'd have to check.
Oh. ok... I still had the 13.1-RELEASE-p9 plugin installed and did an update with the update button in the Jail pannel... to upgrade it to 13.2-RELEASE-p5.
Mine is 13.2-RELEASE-p4 How can I replace the missing json file?
13.2-p4 it's rather recent... and the update button doesn't update it to 13.2-p5?
That JFin jail is the old one?
No, when I click on Update in your installed plugin, the error with the missing json file appears.
Oh okay. It might be a bug in the manual install process. It wasn't something I tested fully. One thing that could be done is create a new jail let's say a "JFin-New" and then copy the configuration folder from the actual to the new jail.
i'll need the output of this command and the names of both old and new jail.
Create the new jail with the UI - you mean install the community plugin?
yes. Install the plugin under a new name... and configure the mountpoint. Then we'll try to copy all the configuration files from the old one to the new one.
Ok, done. The output of iocage get -p is Pool1
I just remembered that I marked the jail as read only. Is it possible that this is why the update is not working?
hmm... that would be more a question for @Thefrank as I'm not that much experienced with BSD operating system... I'm more a linux guy... but that said... I don't think the read only woud cause problem. I think it's more a thing that the UI search the json file that created the initial jail... and in the manual install procedure I delete it.
Anyway the manual install should not be usefull now since it's up to date with the 13.2 release.
Now i'm missing the name of the new jail.
And check that this command does list folder and files like : config / data / log ....
ls -l /mnt/Pool1/iocage/jails/JFin/root/var/db/jellyfinserver
I have modified your command so that it fits my installation.
ls -l /mnt/Pool1/iocage/jails/jellyfin/root/var/db/jellyfin
...and yes, the corresponding folders are listed.
The new jail is called Jellyfin2
Oh sorry... you're right as I'm still using the old package from TheFrank and now the one in the official repo.
Okay now check the output of this one :
ls -l /mnt/Pool1/iocage/jails/jellyfin2/root/var/db/jellyfin
It should be almost the same output than for the jellyfin jail... if it is and the jellyfin2 is stopped proceed to copy from jellyfin to jellyfin2 with this command :
cp -R /mnt/Pool1/iocage/jails/jellyfin/root/var/db/jellyfin/* /mnt/Pool1/iocage/jails/jellyfin2/root/var/db/jellyfin
Then try to start jellyfin2 and check if everything is working. It might not work as the user and group might not copy over and might require to do a chown
on all files and folder... but we'll see.
Copying has worked. But now I can no longer connect to Jellyfin2 with the assigned IP.
curl -i http://IP_OF_JELLYFIN:8096/health
from TrueNAS console if that fails then try from inside the jail
Both shells: curl: (6) Could not resolve host: IP_OF_JELLYFIN
so the jail is not up? does iocage list -l
show it as up?
The files took forever to copy but I've managed to reproduce the error. One of the folder doesn't exist probably.
Stop the jail then do those to create and set the correct user and groups... then try again.
mkdir -p /mnt/Pool1/iocage/jails/jellyfin2/root/var/cache/jellyfin
chown -R 868:868 /mnt/Pool1/iocage/jails/jellyfin2/root/var/db/jellyfin
chown -R 868:868 /mnt/Pool1/iocage/jails/jellyfin2/root/var/cache/jellyfin
if it still doesn't start then do this command to get the error message :
tail -n30 /mnt/Pool1/iocage/jails/jellyfin2/root/var/db/jellyfin/log/log_20231214.log
Your command contains "jellyfinserver" again. Should I replace it again or do we need it for the command this time?
Yes I've updated the comment... the thing is since I never updated the plugin to the official jellyfin... I'm still running jellyfinserver and not jellyfin... so you might be right it might be jellyfin. The correct user:group has been fixed since it's not root:wheel it's 868:868 as it's updated later in the script.
The correct folder will be shown in the error message of this logfile :
tail -n30 /mnt/Pool1/iocage/jails/jellyfin2/root/var/db/jellyfin/log/log_20231214.log
At first glance, everything is back. Wow, how much you've helped me. That was voodoo beyond my abilities. Admirable!
Ok, the clients apparently still have to log in again. But at least everything from the server is back.
Great. Yes it will disconnect everyone since it's a new IP, but it will be the same user and password. You could swap the IP to prevent that... but it will break the old jail. You might want to keep both for 2-3 days to compare that everything is working as intended before either swapping IPs or deleting it.
Good plan, that's how I do it.
But it is correct that version 10.8.10 and not 10.8.13 is still installed?
According to the ports page here (https://www.freshports.org/multimedia/jellyfin/) the latest for FreeBSD 13 is 10.8.10_3... so it should be the latest. Maybe the linux versions are more recent.
Also... you can try the "update" button on the new jail... it should work since it was created with the UI.
I only ask because "Thefrank" has already listed the newer version and recommends an update as soon as possible because of the security gaps.
Oh... well... I don't really know then. I'll leave that question for @Thefrank.
How can I thank you in the end? Let me send you money for a beer or a whisky. Really! It's a necessity for me.
It's all fine. I don't have any way to receive payement nor do I require one for this job.
Oh man, now I have to go to sleep with a bad conscience.
In the past, I always had trouble updating my installed Jellyfin instance. In the end, I always had to reconfigure everything.
Last time I was only able to install my Jellyfin server via this link (fetch https://raw.githubusercontent.com/spz2k9/iocage-plugin-jellyfin/master/jellyfin.json iocage fetch -P ./jellyfin.json --name jellyfin rm ./jellyfin.json) from this thread (https://github.com/spz2k9/iocage-plugin-jellyfin). I then uninstalled the official community plugin.
Now I see that Jellyfin 10.8.13 has been released here, but I'm too dumb to update my version.
Can you please help me to update my version without losing my configuration?
I am really lost. Many thanks in advance!