Scripted Plex Installation

Yes, that command is crontab -l. But you’d need to be able to read cron syntax, for which there are plenty of resources on the web.

crontab -l just lists the cron table for your current user; it doesn’t actually upgrade anything (or run any of the other commands scheduled). If the upgrade hasn’t run for some reason, you can run pkg upgrade, which will upgrade you to the latest version available in the FreeBSD package repositories. That version will often lag behind what Plex has released, because updating those packages takes some time.

This is what I get when I run that command:

root@pms:~ # crontab -l
#Upgrade all installed packages and restart Plex
18 3 * * 0 pkg upgrade -y && service plexmediaserver restart

Okay, well I’m feeling better about it. I will pay more attention, perhaps this is just me not paying close enough attention. Thank you so much for all the help!

Hello, I have used the install script. During installation, everything is normal and it terminate successfully. However, when I try to connect to the server using the browser I get “This site can’t be reached” error.

I did some digging and I found out that the plexmediaserver is not running. I have confirmed it’s set to start at boot up and I have tried to start it manually.

Since I am a new user, I cannot attach files… Here a summary of logs entries that I think could be of interest.

Feb 08, 2025 07:48:55.875 [0x806c12000] WARN - Failed to create temp dir "/tmp/pms-22708cdd-aa23-48c2-8c0e-b805ae3b57e2": 13, Permission denied
Feb 08, 2025 07:48:55.876 [0x806c12000] ERROR - Unable to open named mutex 9334581e-7251-4ef7-a8ec-5bfe8e89ff68 with option 1: Permission denied

Feb 08, 2025 07:48:55.937 [0x806c12000] ERROR - SQLITE3:0x10, 6410, statement aborts at 5: [CREATE TABLE "media_parts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "media_item_id" integer, "directory_id" integer, "hash" varchar(255), "open_subtitle_hash" varchar(255), "file" varchar(255), "index" integer, "size" integer(8), "duration" integer, "created_at" dt_integer(8), "updated_at" dt_integer(8), "deleted_at" dt_integer(8), "extra_data" varchar(255))] disk I/O error

Seems to be some permission issues… User plex (id:972) have been created. Permission set to Full Control to my media dataset. In the jail shell, I can fully access the mount in /media (as jail user root… dont know how to start shell with plex user…)

What else could I check? thanks!

NOTE: I have changed the script to install FreeBSD 13.3 Release-p8. (was doing same thing with 13.2.

Here is my plex-config file


JAIL_IP="192.168.1.80"
DEFAULT_GW_IP="192.168.1.1"
POOL_PATH="/mnt/mainpool"
PLEX_MEDIA_PATH="/mnt/mainpool/Multimedia"

I don’t know that it’ll make a difference, but what happens if you try 13.4?

thanks for the quick reply. I have same behavior with FreeBSD 13.4.

Hi dan, I’m running into the exact same issue as jfrancoism. I have also tried both 13.3 and 13.4 and getting the same disk I/O error on both when I try to start the plex service.

Weird. Apparently in 13.4-RELEASE /tmp isn’t world-writable as it should be. chmod 777 /tmp should resolve the issue. I’ll see if I can get an update out to the script (and also make it install 13.4-RELEASE).

That did it! Thank you dan for the help and the script!

1 Like

Problem fixed. Thank you Dan!

1 Like