# Change Default Location

**URL:** <https://discourse.mailinabox.email/t/change-default-location/4388>\
**Category:** uncategorized\
**Created:** [January 21, 2019, 4:33pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388 "2019-01-21T16:33:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattF](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@MattF](https://discourse.mailinabox.email/u/MattF)\
**Post date:** [January 21, 2019, 4:33pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/1 "2019-01-21T16:33:01Z")

</div>

i know under [https://mailinabox.email/guide.html](https://mailinabox.email/guide.html) there is a section called Advaned states you can change storage root. is the steps to preform this.

1. export STORAGE\_ROOT=/your/desired/path
2. curl -s [https://mailinabox.email/setup.sh](https://mailinabox.email/setup.sh) | sudo -E bash

and all works the same? or am i missing something? sorry very basic question and I am a begineer at linux.

---

<div class="post-metadata">

**Author:** ![murgero](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/murgero/32/750_2.png) [@murgero](https://discourse.mailinabox.email/u/murgero)\
**Post date:** [January 21, 2019, 4:51pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/2 "2019-01-21T16:51:43Z")

</div>

It does look like that is all you need to do.

---

<div class="post-metadata">

**Author:** ![MattF](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@MattF](https://discourse.mailinabox.email/u/MattF)\
**Post date:** [January 21, 2019, 9:49pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/3 "2019-01-21T21:49:45Z")

</div>

After Install i noticed that if i run export the export storage\_root location is gone is this suppose to happen? is this going to affect future updates/upgrades?

---

<div class="post-metadata">

**Author:** ![murgero](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/murgero/32/750_2.png) [@murgero](https://discourse.mailinabox.email/u/murgero)\
**Post date:** [January 21, 2019, 10:09pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/4 "2019-01-21T22:09:19Z")

</div>

It specifically says in the instructions you must run the export _before_ the running the script. It’s possible that meant before installing MIAB.

@JoshData - Is this storage\_root variable allowed after initial install or must it be done before?

---

<div class="post-metadata">

**Author:** ![alento](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/alento/32/1371_2.png) [@alento](https://discourse.mailinabox.email/u/alento)\
**Post date:** [January 21, 2019, 10:23pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/5 "2019-01-21T22:23:26Z")

</div>

There is an issue on GitHub related to this …

> <https://github.com/mail-in-a-box/mailinabox/issues/1501>

---

<div class="post-metadata">

**Author:** ![murgero](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/murgero/32/750_2.png) [@murgero](https://discourse.mailinabox.email/u/murgero)\
**Post date:** [January 21, 2019, 10:28pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/6 "2019-01-21T22:28:03Z")

</div>

**QUOTE FROM GITHUB ISSUE:**

> I did, and eventually it did work but was pretty inconsistent. I had to do it with my root user since it didn’t work when using a non-root user. I found that it seemed to work sometime after the first install, but wouldn’t work when doing a fresh one.

Need to update the instructions on the website to `sudo export STORAGE_ROOT=/path/to/place` as root account (when using sudo?) might not have access to a users env variables.

---

<div class="post-metadata">

**Author:** ![MattF](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@MattF](https://discourse.mailinabox.email/u/MattF)\
**Post date:** [January 22, 2019, 2:06pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/7 "2019-01-22T14:06:22Z")

</div>

When i do sudo export i get “Sudo: export” command not found"

---

<div class="post-metadata">

**Author:** ![murgero](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/murgero/32/750_2.png) [@murgero](https://discourse.mailinabox.email/u/murgero)\
**Post date:** [January 22, 2019, 2:38pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/8 "2019-01-22T14:38:23Z")

</div>

Can you copy the full output (including the full command you used?)

---

<div class="post-metadata">

**Author:** ![MattF](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@MattF](https://discourse.mailinabox.email/u/MattF)\
**Post date:** [January 22, 2019, 2:41pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/9 "2019-01-22T14:41:17Z")

</div>

![Export%20Command](https://discourse.mailinabox.email/uploads/default/original/2X/1/1612095c3f9217369f9250bfb1dceeacc2dfd247.jpeg)

Is this what your wanting?

---

<div class="post-metadata">

**Author:** ![murgero](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/murgero/32/750_2.png) [@murgero](https://discourse.mailinabox.email/u/murgero)\
**Post date:** [January 22, 2019, 2:54pm UTC](https://discourse.mailinabox.email/t/change-default-location/4388/10 "2019-01-22T14:54:26Z")

</div>

Oh, you are running the command as root alright, so sudo is not required (and wont work properly anyway)
