# Linux Plex server tmp folder filling up

**URL:** <https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [August 3, 2022, 11:32pm UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159 "2022-08-03T23:32:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lvangent](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@lvangent](https://forums.plex.tv/u/lvangent)\
**Post date:** [August 3, 2022, 11:32pm UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/1 "2022-08-03T23:32:30Z")

</div>

Server Version#: 1.28.0.5999  
Player Version#: 1.49.1.3146-73559c78

I have a problem with repopulating my Debian 11 Openmediavault Plex server. Plex server keeps filling up the /tmp partition with jpg files. These are the movie/TV/Music posters.  
these are not deleted after use.

root@nas:/# df -kh /tmp  
Filesystem Size Used Avail Use% Mounted on  
tmpfs 1.5G 62M 1.4G 5% /tmp

root@nas:/# ls -1 /tmp

12b7686c5f78ff6fbc575f3cc49545b0.jpg  
137694ff321598b583c3e8124f36c7ee.jpg  
1474c53c65d92f6534803e12f7a9088e.jpg  
1f7a6bffcd01e44d1e519799dfd60329.jpg  
1f89e4df777c70c422719a2054c592e1.jpg  
2cb566498ea457577ed096ece9c8f1dc.jpg  
…

Is there a way to redirect Plex media server to a different folder for these temporary files?  
I have looked in the config files but cannot find any option to do this myself.

Thanks

---

<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:** [August 4, 2022, 12:40am UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/2 "2022-08-04T00:40:37Z")

</div>

PMS responds to the TEMPDIR or TMPDIR environment variables.

Did you set your transcoder temp to /tmp?

---

<div class="post-metadata">

**Author:** ![lvangent](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@lvangent](https://forums.plex.tv/u/lvangent)\
**Post date:** [August 4, 2022, 2:25am UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/3 "2022-08-04T02:25:41Z")

</div>

on Debian TEMPDIR or TMPDIR variable not set.  
root@nas:/etc# systemctl status plexmediaserver.service  
● plexmediaserver.service - Plex Media Server  
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)  
Active: active (running) since Thu 2022-08-04 09:18:57 AEST; 3h 4min ago  
Process: 699605 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” || /bin/mkdir -p “${PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR}” (code=exited, status=0/SUCCESS)  
Main PID: 699608 (Plex Media Serv)  
Tasks: 52 (limit: 3531)  
Memory: 400.7M  
CPU: 1h 33min 37.302s  
CGroup: /system.slice/plexmediaserver.service  
├─699608 /usr/lib/plexmediaserver/Plex Media Server  
├─699670 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-97678ded3/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.28.0.599\>  
├─699781 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.28.0.5999-97678ded3 32600  
└─737126 /usr/lib/plexmediaserver/Plex Media Scanner --match --type 1 --log-file-suffix Matcher --files /storage/PlexMedia/LeenMovies/Trading Places (1984)/Trading Places (1080p HD).m4v

as this is a service, where to set these variables for plexserver only?

---

<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:** [August 4, 2022, 4:05am UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/4 "2022-08-04T04:05:28Z")

</div>

Start here:

> [@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…

In the override file

```auto
[Service]
Environment="PLEX_MEDIA_SERVER_TMPDIR=/path/you/want"

```

This is not the same as the Transcoder Temp Dir which you set in Preferences.

NOTE: To clarify, on SYSV Linux systems, I map TMPDIR or TEMP or TEMPDIR to PLEX\_MEDIA\_SERVER\_TMPDIR for PMS.

---

<div class="post-metadata">

**Author:** ![lvangent](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@lvangent](https://forums.plex.tv/u/lvangent)\
**Post date:** [August 4, 2022, 6:47am UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/5 "2022-08-04T06:47:12Z")

</div>

Thank you for your response. The provided Environment variable “PLEX\_MEDIA\_SERVER\_TMPDIR” did not work on my Debian 11 server but adding Environment variables TMPDIR and TEMPDIR did fix my issue.  
I won’t be running out of disk space anytime soon.

---

<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:** [November 2, 2022, 6:47am UTC](https://forums.plex.tv/t/linux-plex-server-tmp-folder-filling-up/803159/6 "2022-11-02T06:47:42Z")

</div>

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