What app is this about, and its version: Jellyfin 10.11.8~ynh1 What YunoHost version are you running: 12.1.39 (stable) What type of hardware are you using: Other(?)
Describe your issue
Today in the morning I got aware that jellyfin is not working anymore.
Scrolling through the recent logs I recognised that the jellyfin.service is not running properly. It is actually starting every few seconds, but never succesfully.
I tried to start it manually, no success.
I tried to restore a backup from 4 days ago, no success.
The only changes I did, have been the previous upgrades yunohost suggested me in the last couple of days. But I didn’t upgrade jellyfin itself.
Me and especially my kid (no more audiobooks playable ) highly apprecciate your help, THANKS
The command “sqlite3 jellyfin.db …” gets the output: Error: in prepare, file is not a database (26)
The other two commands get an “ok”
What I meant with “only changes” was: I did some system upgrades in the web-interface, but no app upgrade (either for jellyfin or any other installed app).
I assume the output “Error: in prepare, file is not a database (26)” indicates that my database is not healthy, which means, I have to reinstall jellyfin from scratch?
Uninstalling Jellyfin, and installing it again (not restoring from a backup), still the same failure 502 Bad gateway and also the logs contain the same issues
If the integrity check do not gives you “ok”, it means indeed that there is something wrong with your database.
Keep in mind that even if you uninstall an app, all the data will still be here.
I removed mopidy months ago but all the data is still here :
root@redzic:/home/yunohost.app/mopidy# ls -l
total 8
drwxr-x--- 3 988 www-data 4096 Feb 11 2025 cache
drwxr-x--- 6 988 www-data 4096 Nov 20 2022 data
You can uninstall jellyfin, remove the directory /home/yunohost.app/jellyfin and then reinstall the app.
NB : please note that I a not a very advance user when it comes to database thing so wait the answer from someone else. What I told is the way I would do it on my personnal machine.
@md27 Keep in mind that sometimes things can happen and databases can be corrupted. You should follow the 3-2-1 backup method and once you have your jellyfin setup the way you like it, make a fresh backup of the web and plugins folders. Make a database backup within Jellyfin UI then copy the database backup file to your backup directory and store in a compressed file in case something happens and you need to restore. This is just good practice because you never know what may happen. Just some friendly advice so you don’t lose everything in the future and have to start from scratch. Cause that sucks when you have to do it multiple times
Jellyfin Watch is giving you some good information as well as the commands to complete the activity. Here is my personal strategy using the 3-2-1 backup strategy, have 3 copies of your data in at least 2 different locations with 1 copy being offline (such as an external USB drive). Make sure your media files are stored on a separate storage volume or backend. Once you have Jellyfin configured your configuration shouldn’t change all that much. I personally don’t do daily backups of JF. I do weekly backups for my primary OS and monthly backups for my apps such as JF. I also have my media storage located on a different storage backend than my primary VPS. This separation prevents you from losing or changing your media files unnecessarily in the event of a failure.
Jellyfin specifically, it is overkill to backup the entire directory and it is not good practice as native installs of Jellyfin keep different configuration files in different places. Web, database and plugin folders are usually in /var/lib/jellyfin directory while database backups and system Config files are kept in /etc/jellyfin directory. This is why it is good practice to create a restore backup once you have everything together and configured the way you like. Then as you use JF, at the end of every month you should create a new backup so you always have a recent version of new config changes. I rotate mine out every 3 months. This means that you always keep the original restore backup plus three monthly date-stamped copies. This allows you to be able to go back in time if something breaks. When you reach the 4th month of backups, then you delete the first date-stamped backup and keep rotating like that. This can also be automated using crontab, although it will take you 3 separate entries to accomplish
The bad gateway sounds like the JF services stopped for some reason and I have experienced this with other services on Yunohost platform where services don’t restart like they are suppose to on reboot. My custom solution to that issue is a crontab entry using the @rebootsleep 30 && /path to restart those services once the core system is back up and running. This way i don’t have to do it manaully in webadmin>>services. Hope this helps
Jellyfin doesn’t store it’s data or configuration the the typical Yunohost directory /var/www instead it uses standard native install directories.
Data Directory: /var/lib/jellyfin
Configuration: /etc/jellyfin
to access these you will have to use a terminal with the sudo command.
First, ensure you are in the root directory by using this command sudo cd /
next, change directory by sudo cd /var/lib/jellyfin
you should be able to use the lscommand to view files in the directory
repeat this process for the config directory
sudo cd /etc/jellyfin
this verifies the directories exist and then you will have the path to backup
Note: Different systems locate these files in different places. I use Debian 12 and this is accurate for that system. But other systems might locate the data directory in (for example) /home/yunohost.app/dataso you would need to determine that location. You can also look in admin section of JF and it should tell you the paths for the different file locations