plex does not recognize changes in /etc/default/plexmediaserver (debian)

Hi there,

i tried to change some settings in the plexmediaserver config file in /etc/default/

where the mediaserver should store the transcodes

PLEX_MEDIA_SERVER_TMPDIR=/home/encrytped/.plex/tmp

uncomment to set it to something else

PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/home/encrytped/.plex/plexmediaserver/Library/Application Support"

saved it. moved the directory from /var/lib/ to its new destination /home/encrytped/.plex/.

restarted plex and bam… every time the same error…:

Jan 15 19:53:32 localhost sh[8422]: /bin/mkdir: das Verzeichnis „/var/lib/plexmediaserver“ kann nicht angelegt werden: Keine Berechtigung (in english: cant creare directory /var/lib/plexmediaserver)
Jan 15 19:53:32 localhost systemd[1]: plexmediaserver.service: control process exited, code=exited status=1
Jan 15 19:53:32 localhost systemd[1]: Failed to start Plex Media Server for Linux.

it seems to me that plex is ignoring my changed settings.

so please help me :slight_smile:

You’re correct. PMS does not use the /etc/defaults mechanism anymore.

Mid last summer (June - Aug 2016), I was part of the effort to unify Linux startup mechanisms. The result was to utilize the native systemd init mechanism when it’s native to the system.

Now, all customizations to your PMS installation are kept separate from the default /usr/lib/systemd/system/plexmediaserver.service file.
The systemd override.conf mechanism is used. This is located in /etc/defaults/systemd/system/<name>.service.d/override.conf

You may change any of the default parameters normally defined for PMS startup in it.

As example, and how it relates to you:

  1. cat /proc/1/comm to verify it reports systemd as the system control process name

  2. sudo mkir /etc/systemd/system/plexmediaserver.service.d

  3. create (as root) /etc/systemd/system/plexmediaserver.service.d/override.conf in a text editor

  4. In it, define the variables you wish to override using this structure (use the same names as found in the distribution service file)

    [Service]

    Move Plex to /home/encrypted/.plex

    Environment=“PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/encrypted/.plex/Library/Application Support”
    Environment=“PLEX_MEDIA_SERVER_TMPDIR=/home/encrypted/.plex/tmp”

Now make the changes effective

  1. move or remove the old /etc/defaults file. It is no longer needed
  2. sudo systemctl daemon-reload
  3. sudo systemctl restart plexmediaserver
1 Like

Many thanks! Your answer fixed it :slight_smile:

Please remove the /etc/defaults file from the debian package as it is misleading.

The file is included only because the same .deb file can be loaded on all the different versions of Debian.

If there would not be such an outcry by discontinuing the older versions, it would have already been removed.

Hi there is still the same process I just install plex now from scratch in raspberry pi 3 and want to move my cache folder to usd drive! And im having problems with that i try this method i worked but when I restart i starts to put the library t same place before!

Debian 8+ uses systemd

To effect the change you wish, please read: http://forums.plex.tv/discussion/286395/customizing-your-plex-configuration

then perhaps add a comment into the file in regards to the new file location?

In light of all the confusion which is now coming to light over something done over two years ago,

I am fully rewriting and re-instituting a migration step in the installation.

With Ubuntu, Debian, and Fedora, along with the other lesser known distros now in sync with proper systemd locations,

  1. extract any customization information from /etc/defaults/plexmediaserver
  2. extract any customization information from /etc/systemd/system/plexmediaserver.service
  3. extract any customization information from /etc/systemd/system/plexmediaserver.service.d/*.conf
  4. Write a properly formatted /etc/systemd/system/pledmediaserver.service.d/override.conf or /etc/defaults/plexmediaserver (if init based installation))

I am doing this because some of these older distros will be deprecated soon.

Do no be alarmed because it will be announced well in advance

I will share a little bit of “roadmap”

Based on the Ubuntu published dates:

Current
Version	Code name	End of          Life date
Ubuntu  16.04.1 LTS	Xenial Xerus	April 2021
Ubuntu  16.04 LTS	Xenial Xerus	April 2021
Ubuntu  14.04.5 LTS	Trusty Tahr	    April 2019
Ubuntu  14.04.4 LTS	Trusty Tahr	HWE August 2016

Ubuntu 14.04 is next to be deprecated and obsoleted.