# Systemd - Customizing Application Support folder (Metadata) - override.conf

**URL:** <https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux\
**Created:** [May 28, 2022, 3:08am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594 "2022-05-28T03:08:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![doreski](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@doreski](https://forums.plex.tv/u/doreski)\
**Post date:** [May 28, 2022, 3:08am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/1 "2022-05-28T03:08:38Z")

</div>

Hi All,  
Hoping someone can help me. I  
I am wanting to ‘move’ the application support folder to and SSD drive on my Plex Media Server to increase its performance (that is the general idea as I have only started reading into this)  
Anyhow, I have read a number of threads about editing the override.conf file to point to the new location, which I have done (pretty sure its correct) and I’ve assigned the user/group permissions to plex (plex:plex)

This is my override.conf:

**# Customize Plex’s config**  
**#**  
**# Identify this as a service override**  
**[Service]**  
**#**  
**# Move the data directory**  
**Environment="PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR=/media/dennis/Plex\_Cache/plexmediaserver/"**  
**#**  
**# These values are only needed if you wish to change user & group**  
**User=plex**  
**Group=plex**

I then try to restart the plex service (service plexmediaserver restart) and I get the following error:

**Job for plexmediaserver.service failed because the control process exited with error code.**  
**See “systemctl status plexmediaserver.service” and “journalctl -xeu plexmediaserver.service” for details.**

So I investigate systemctl status plexmediaserver.service and I get the below error:

**systemctl status plexmediaserver.service**  
**× plexmediaserver.service - Plex Media Server**  
\*\* Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)\*\*  
\*\* Drop-In: /etc/systemd/system/plexmediaserver.service.d\*\*  
\*\* └─override.conf\*\*  
\*\* Active: failed (Result: exit-code) since Sat 2022-05-28 10:22:41 AWST; 476ms ago\*\*  
\*\* Process: 26476 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPP\>\*\*  
\*\* CPU: 13ms\*\*

**May 28 10:22:41 per-plex-svr systemd[1]: plexmediaserver.service: Scheduled restart job, restart \>**  
**May 28 10:22:41 per-plex-svr systemd[1]: Stopped Plex Media Server.**  
**May 28 10:22:41 per-plex-svr systemd[1]: plexmediaserver.service: Start request repeated too quic\>**  
**May 28 10:22:41 per-plex-svr systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.**  
**May 28 10:22:41 per-plex-svr systemd[1]: Failed to start Plex Media Server.**

Looking at journalctl -xeu plexmediaserver.service, I see the below:

**The unit plexmediaserver.service has entered the ‘failed’ state with result ‘exit-code’.**  
**May 28 10:22:41 per-plex-svr systemd[1]: Failed to start Plex Media Server.**  
**Subject: A start job for unit plexmediaserver.service has failed**  
**Defined-By: systemd**  
**Support: [Enterprise open source support | Ubuntu](http://www.ubuntu.com/support)**  
**A start job for unit plexmediaserver.service has finished with a failure.**  
**The job identifier is 5256 and the job result is failed.**

I am not sure what I am doing wrong as I have confirmed the location of where I want the Application Support to now be (the SSD drive) and I am confident I did edit the override.conf file correctly, so I am not sure where the error lays.  
Anyone have any ideas?

I am running Plex Media Server 1.26.2.5797 on Linux (Ubuntu 22.04)

---

<div class="post-metadata">

**Author:** ![BobSnot](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@BobSnot](https://forums.plex.tv/u/BobSnot)\
**Post date:** [May 28, 2022, 3:35am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/2 "2022-05-28T03:35:53Z")

</div>

why did you select /media as the mount point? This is usually reserved for removable media devices.

Is this a removal media device? If so it is definitely not a good choice for Plex metadata.

if its a fixed SSD in the computer you would usually mounts it under /mnt and you’ll need to ensure each and every directory in the path is accessible by the Plex user and/or the Plex group

---

<div class="post-metadata">

**Author:** ![doreski](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@doreski](https://forums.plex.tv/u/doreski)\
**Post date:** [May 28, 2022, 3:43am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/3 "2022-05-28T03:43:32Z")

</div>

Hey BobSnot,  
My Plex Media Server is a Virtual machine. I do appreciate what you are saying and agree, but the SSD will not be removed from that host. Its running USB bypass through the VM to get to Linux. (though technically its a thunderbolt drive and not USB but anyhow, a story for another time) so I want to think it will still handle the required throughput. The SSD auto-mounts on bootup.

I have confirmed that the plex:plex does have access to every directory in that path.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 28, 2022, 4:10am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/4 "2022-05-28T04:10:43Z")

</div>

@doreski

Ubuntu/Debian, with a graphical desktop, will always override the permissions & ownership of `/media`. The offending program is the automounter built into Nautilus. (It communicates with gnome-session, which runs as root, and has anything in there mounted / chowned with exclusive access by your username only which blocks ‘plex:plex’ from accessing it.

To avoid this problem, any other location can be used.

Might I suggest ?

1. mkdir /home/plex
2. chown plex:plex /home/plex
3. mount your SSD to this location
4. Change the override.conf to point to  
`Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plex/Library/Application Support"`

Now you can move `Library` from `/var/lib/plexmediaserver` to `/home/plex`.

For reference (in case you need)

> [@Linux Tips](https://forums.plex.tv/t/linux-tips/276247/3):
>
> Customizing your Plex configuration on systemd based systems This information is intended for those systems where cat /proc/1/comm returns systemd. On systems which use Systemd (Ubuntu 16+, Fedora, Centos 7, Debian 8,) you create this customization file which SystemD reads prior to launching PMS. This file is independent of the default configuration and service control mechanisms in /lib/systemd/system/plexmediaserver.service. Your customization override is preserved across updates, uninstal…

---

<div class="post-metadata">

**Author:** ![doreski](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@doreski](https://forums.plex.tv/u/doreski)\
**Post date:** [May 28, 2022, 4:45am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/5 "2022-05-28T04:45:17Z")

</div>

@ChuckPa  
You are a champion!! That seemed to work. Thank you so much. Been pulling my hair out for 2 days trying to get this to work.

I do have one question however… upon reboot, will I always need to mount my SSD to /home/plex?  
If so, how can I make this happen upon boot up?  
I am trying to automate as much as I can.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 28, 2022, 5:15am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/6 "2022-05-28T05:15:47Z")

</div>

@doreski

I don’t know how you have the VM configured as it pertains to the outside world.

As far as Linux (in the VM) is concerned –

1. The kernel boots
2. It finds all the devices
3. It mounts all filesystems listed in /etc/fstab \<---- KEY POINT HERE
4. It starts launching the remaining services \<— Of which Plex is one.

How it all works –

1. Linux uses `systemd` to sequence everything.
2. File system mounts are sequenced first
3. Other system services are next
4. After all those system-global services are started, it then launches user-installed
5. Plex is one of those user-installed services.

This means you can always guarantee the SSD is mounted before Plex starts  
(I assume the VM creates the passthrough automatically as well before it loads the kernel)

In /etc/fstab, you’ll want a standard “auto” mount statement.

Example,

```auto
/dev/sdb1 /home/plex ext4 defaults,auto,rw 0 2

```

This assumes:

1. /dev/sdb1 is where the device is mapped into the VM
2. You’re mounting it on `/home/plex`
3. it’s been formatted with ext4

Feel free to adjust here as you see fit to match your actual installation.

I have a lot of How-To’s here. Feel free to avail yourself of them

> [@Linux Tips](https://forums.plex.tv/t/linux-tips/276247):
>
> Tips & Tricks of the Linux trade. Below, you’ll find a collection of tips, tricks, and how-to’s to help make setting up, administrating, and using Plex Media Server on Linux a little easier. [Reporting problems](https://forums.plex.tv/t/linux-tips/276247/20)[Using other hard drives (Windows or Linux) with PMS](https://forums.plex.tv/t/linux-tips/276247/2)[Customizing your Plex configuration on systemd based systems](https://forums.plex.tv/t/linux-tips/276247/3)[Using other EXT4, NTFS, or other drives (internal or USB)](https://forums.plex.tv/t/linux-tips/276247/2)[Mounting CIFS + SMB network shares for Plex use](https://forums.plex.tv/t/linux-tips/276247/4)[Mounting NFS network shares for Plex use](https://forums.plex.tv/t/linux-tips/276247/5)[Moving…](https://forums.plex.tv/t/linux-tips/276247/6)

---

<div class="post-metadata">

**Author:** ![doreski](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@doreski](https://forums.plex.tv/u/doreski)\
**Post date:** [May 28, 2022, 5:49am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/7 "2022-05-28T05:49:41Z")

</div>

@ChuckPa

That worked an absolute charm!  
Thank you sooo much for the help!!!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [August 26, 2022, 5:50am UTC](https://forums.plex.tv/t/systemd-customizing-application-support-folder-metadata-override-conf/794594/8 "2022-08-26T05:50:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
