2024-12-03, 10:31 AM
(2024-11-16, 02:29 AM)theguymadmax Wrote: You can configure Jellyfin to run automatically before login by using the Task Scheduler. If Jellyfin starts automatically after you log in, it's likely being launched from the system tray. You'll need to disable that, click the Jellyfin icon in the system tray and unselect "Autostart".
Steps to Set Up Task Scheduler:
1. Open Task Scheduler and select Create Task from the Action menu.
2. General Tab:
- Name: Enter a name like "Start Jellyfin" (or any name you prefer).
- Under Security options, choose the user account under which Jellyfin is installed.
- Select "Run whether user is logged on or not".
3. Triggers Tab:
- Click New, then under "Begin the task," select At startup.
4. Actions Tab:
- Click New.
- For Program/script, enter:
C:\Programs\jellyfin\master\jellyfin.exe
- For Add arguments, enter:
--datadir "C:\ProgramData\Jellyfin\Server"
OR
--datadir "C:\Users\YOURUSERNAME\AppData\Local\jellyfin"
Identifying the Correct Data Directory:
- If Jellyfin is launching from the system tray, it's using the ProgramData folder.
- If you're starting Jellyfin manually with custom arguments, it's likely using the AppData\Local directory.
Make sure to select the correct folder for the --datadir argument.
5. After saving the task by selecting OK, you'll be prompted to enter your admin password.
6. Restart your system and test to ensure Jellyfin starts automatically as expected.
Be sure to keep the userdata folder in its original location. Moving it without updating the corresponding paths in the database will cause it to malfunction.
I want to thank everyone for the help and ideas.
I have tried this before you mentioned, the taskscheduler will run into some error, and won't start jellyfin correctly.
I re-installed Windows system the other day, and give me a chance to play with jellyfin. (since it's already a clean re-install, I have backed up every file, and I will have the risk of re-install jellyfin anyways..)
After spending from 10 P.M. to now (5:24 a.m.), I have figure out how to do this.
Basically, you modify every xml config that point to original %localappdata%\Jellyfin to the new "Program Data" folder. This is easy. After this, it took me 6 hours to figure out that Jellyfin for Windows w/ intall as a service using NETWORK SERVICE user account, and the "Program Data\Jellyfin\Server" does not have premission, and causes service stops randomly with the log states unauthorized. After giving the premission, it is good to go.
(by the way, jellyfin config also don't use %localappdata%, it uses the original user name, like C:\User\Michael\xxx. Lucky I used the same user name or it would be pain to restore jellyfin after a fresh install and windows decided your user folder name from "Michael" to "Micha" for some reason. If this the case, you also need to edit the config xml files to the correct path.)