Plex not automatically launching on after rebooting QNAP

Hey All,

I’ve been having the same frustrating problem on my QNAP, and the easiest way I found to “fix” the issue is by creating a script that restarts Plex after 2 minutes after starting up. I couldn’t find a solution so I thought I’d share.

I have Plex installed via QNAP App Center. I have the TS-464 (Intel based) QTS 5.2.3 so this should work for most of you.

  1. Enable ssh (Control Panel => Network & File Services => Telnet / SSH => Allow SSH)
  2. Open a terminal window
  3. ssh <username>@<ip of QNAP NAS> (Example ssh Mike@192.168.1.34 )
  4. sudo -i
  5. Quit out of the interactive mode (Q then Y)
  6. Now you’re admin@<MyNasDevice>
  7. mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config
  8. touch /tmp/config/autorun.sh
  9. chmod +x /tmp/config/autorun.sh

Okay Great now we’re setup and ready to add a delay to Plex

  1. vi /tmp/config/autorun.sh
  2. Hit the “i” key for insert
  3. Type in the following:
#!/bin/sh
sleep 120
/etc/init.d/plex.sh restart
  1. After typing the above hit the ESC key. Type in “:wq!” that will write to the file and quit, in vim.

  2. Lastly go to Control Panel => System => Hardware => Check "Run user defined processes during startup"

  3. Verify by clicking the view autorun.sh to confirm and view the changes (in Step 14).

The script above just waits 120 seconds, then restarts Plex. You can adjust the time as needed, but 120 seconds works for me. If there’s enough evidence that 60s is sufficient and it works in tests let me know and I’ll adjust.

Hope I end up solving more than a few frustrated QNAP users. I’ve never had issues with my Synology. :sweat_smile:

Thanks @dane22 for the suggestion to change the location to simplify the location to enable maximum compatibility! Teamwork makes the dreamwork!