# Set installation path

**URL:** https://meta.discourse.org/t/set-installation-path/65903
**Category:** Support
**Created:** [July 9, 2017, 7:05pm UTC](https://meta.discourse.org/t/set-installation-path/65903 "2017-07-09T19:05:49Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 9, 2017, 7:05pm UTC](https://meta.discourse.org/t/set-installation-path/65903/1 "2017-07-09T19:05:49Z")

</div>

Hi 👋

I hava an EC2 Server powered by AWS Educate. It has 8GiB of space, but I’ve also used an external drive of 25GiB that can be mounted anywhere  
How can I make Discourse to install on it’s mount point?

Thanks 👍

---

<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: [July 9, 2017, 7:17pm UTC](https://meta.discourse.org/t/set-installation-path/65903/2 "2017-07-09T19:17:26Z")

</div>

Discourse uses /var/discourse, so you could mount it there if you think it’s as fast as the local drive.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 9, 2017, 7:19pm UTC](https://meta.discourse.org/t/set-installation-path/65903/3 "2017-07-09T19:19:46Z")

</div>

So, if I mount the drive to /var/discourse, I should have 25 GiB for it?

Because when I tried the warn of you have less than 5GB of space appeared

---

<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: [July 9, 2017, 7:32pm UTC](https://meta.discourse.org/t/set-installation-path/65903/4 "2017-07-09T19:32:21Z")

</div>

Hmm. Either you didn’t mount it there, or there is a bug with the space checking code.

Edit: that’s wrong. You need space for the docker images too, as explained below. 6gb is going to cause you problems.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [July 9, 2017, 8:00pm UTC](https://meta.discourse.org/t/set-installation-path/65903/5 "2017-07-09T20:00:43Z")

</div>

There are several folders involved in a typical Discourse install:

1. Docker root dir, typically `/var/lib/docker`, where docker images live.

2. the folder where your Discourse installer lives, typically `/var/discourse/`

3. folders of Discourse persistence, typically `/var/discourse/shared`.

If you are low on space on the main disk, you wanna change 1 and 3 first.

Our space detection code will check for enough space on 1, and will the check will follow a config change on docker just fine.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 9, 2017, 8:00pm UTC](https://meta.discourse.org/t/set-installation-path/65903/6 "2017-07-09T20:00:51Z")

</div>

It worked now

There was an error in the space script, IDK why  
I’ve disabled the `exit 1` line and I see that on Discourse I have 25Gb of space

Thanks 👍

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 9, 2017, 8:01pm UTC](https://meta.discourse.org/t/set-installation-path/65903/7 "2017-07-09T20:01:40Z")

</div>

Yeah, I supposed this, so in `launcher.sh` I dissabled the `exit` function when there’s no more than 5Gb of space

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [July 9, 2017, 8:42pm UTC](https://meta.discourse.org/t/set-installation-path/65903/8 "2017-07-09T20:42:21Z")

</div>

Cool, but if you don’t have space on the docker root dir, the next rebuilds will fail, so point that a bigger folder too.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 10, 2017, 1:14pm UTC](https://meta.discourse.org/t/set-installation-path/65903/9 "2017-07-10T13:14:48Z")

</div>

I’ve added some plugins in app.yml, but when I execute `./launcher rebuild app`, I get this:

```plaintext
2017-07-10 12:43:05.106 UTC [87] LOG: shutting down
2017-07-10 12:43:05.133 UTC [87] LOG: database system is shut down
Error response from daemon: Error processing tar file(exit status 1): write /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/ffi-1.9.18/ext/ffi_c/AbstractMemory.o: no space left on device
FAILED TO COMMIT
5c39f3937267b026e910baf7030d922fcb5a9efa4fc1863b7b14f17efd292227
Removing old container
+ /usr/bin/docker rm app
app

```

And I have enough space  
Discourse Admin Dashboard said that I had more than 20Gb

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [July 10, 2017, 1:51pm UTC](https://meta.discourse.org/t/set-installation-path/65903/10 "2017-07-10T13:51:37Z")

</div>

Well, one of your volumes is out of space – most likely, `/var/lib/docker` cannot be written to anymore, as @Falco mentioned above. You will need to make sure this folder sits on your external drive too.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [July 10, 2017, 9:06pm UTC](https://meta.discourse.org/t/set-installation-path/65903/11 "2017-07-10T21:06:06Z")

</div>

Yep  
Finally I’ve mounted the extra EBS device of 25GiB to the `/var` folder and now everything works fine 👍

Also, 25GiB must be enough for a community, no?  
Could I know how much space has used this community now? To know more or less the maximum that a community can reach 😅

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [August 4, 2017, 1:31pm UTC](https://meta.discourse.org/t/set-installation-path/65903/12 "2017-08-04T13:31:21Z")

</div>

Over time I’m guessing /var/discourse will grow as the site grows. Is that also true for /var/lib/docker? Will that grow with updates/new site content or is that relatively constant? I’m currently at about 3.5GB for that folder.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [August 5, 2017, 7:59pm UTC](https://meta.discourse.org/t/set-installation-path/65903/13 "2017-08-05T19:59:17Z")

</div>

Anyone thoughts? Is it sufficient to put the /var/discourse folder on a virtual drive to make it portable or do I also need other folders?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 11, 2017, 3:39pm UTC](https://meta.discourse.org/t/set-installation-path/65903/14 "2017-08-11T15:39:24Z")

</div>

`/var/discourse` and all the directories below it are the only place we store persistent data.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [August 11, 2017, 4:41pm UTC](https://meta.discourse.org/t/set-installation-path/65903/15 "2017-08-11T16:41:23Z")

</div>

Thanks Sam, so for redundancy sake, I can move the entire `/var/discourse` into an external disk and run it from there. If the OS were to get corrupted, I can just reinstall a fresh clean version of Discourse on a new OS and then repoint /var/discourse to the external disk?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 11, 2017, 4:41pm UTC](https://meta.discourse.org/t/set-installation-path/65903/16 "2017-08-11T16:41:51Z")

</div>

You could but your database would run very very slowly.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:44pm UTC](https://meta.discourse.org/t/set-installation-path/65903/17 "2024-06-08T12:44:21Z")

</div>

This topic was automatically closed after 2525 days. New replies are no longer allowed.
