# Changing location of tmp directory

**URL:** https://meta.discourse.org/t/changing-location-of-tmp-directory/139531
**Category:** Development
**Created:** [January 23, 2020, 1:55pm UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531 "2020-01-23T13:55:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nikolay](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Nikolay](https://meta.discourse.org/u/Nikolay)
#### Post date: [January 23, 2020, 1:55pm UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531/1 "2020-01-23T13:55:34Z")

</div>

Hello.  
Is it possible to change location of “tmp” dir and how?  
For example now my tmp dir is in /var/discourse/tmp  
and i want temp files to be created in /tmp/discourse-tmp

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 23, 2020, 2:55pm UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531/2 "2020-01-23T14:55:58Z")

</div>

What problem are you trying to solve?

One solution might be do create a docker volume for /tmp that points to wherever you want on the host file system.

---

<div class="post-metadata">

### Author: ![Nikolay](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Nikolay](https://meta.discourse.org/u/Nikolay)
#### Post date: [January 23, 2020, 3:03pm UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531/3 "2020-01-23T15:03:05Z")

</div>

the problem is because i mounted discourse from host to docker, so folder /var/discourse in shared directory between host (which is on windows) and client os (which is on linux). And because of that, there are some problems.  
One of the problem i described today: [Problem with development on Windows with Docker and mounted volume](https://meta.discourse.org/t/problem-with-development-on-windows-with-docker-and-mounted-volume/139523)

when discourse try to generate some files in “tmp” directory it gets errors, because it expect filesystem to be case sensitive, but mounted directory uses windows ntfs filesystem, that is case insensitive.

If i can somehow change location of tmp dir, so it will be in /tmp, then problem will go away, because guest os filesystem is ext4 which support case sensitive directories

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 23, 2020, 4:04pm UTC](https://meta.discourse.org/t/changing-location-of-tmp-directory/139531/4 "2020-01-23T16:04:02Z")

</div>

I’d just move all of Discourse to a non-stupid file system (Actually, I quit using Windows around Win98). Failing that, you can add a volume for just /tmp.
