# Change Discourse install storage location

**URL:** https://meta.discourse.org/t/change-discourse-install-storage-location/88256
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [May 23, 2018, 2:27pm UTC](https://meta.discourse.org/t/change-discourse-install-storage-location/88256 "2018-05-23T14:27:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [May 23, 2018, 2:27pm UTC](https://meta.discourse.org/t/change-discourse-install-storage-location/88256/1 "2018-05-23T14:27:48Z")

</div>

Need to move your Discourse install to another (local) directory? Let’s get started!

### Configure new directory

Ensure the new directory is properly mounted/connected as needed. Then create the folder where Discourse will live.

```plaintext
cd /new/discourse/location
mkdir -p shared/standalone

```

### Copy existing files to new location

> ⚠ From this point forward your site will be down.

Stop the container to ensure no changes to the files are made during the transfer.

```plaintext
cd /var/discourse
./launcher stop app

```

Copy files to new location

```plaintext
rsync -avzh /var/discourse/shared/standalone/ /new/discourse/location/shared/standalone

```

### Update `app.yml` and rebuild

Modify your `app.yml` so Discourse runs from the new location.

**Current configuration:**

```plaintext
## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

```

**Updated configuration:**

```plaintext
## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /new/discourse/location/shared/standalone
      guest: /shared
  - volume:
      host: /new/discourse/location/shared/standalone/log/var-log
      guest: /var/log

```

Rebuild Discourse

```plaintext
cd /var/discourse
sudo ./launcher rebuild app

```

> ✅ Your site will now be back up.

### Test changes

Open your site and confirm everything still looks OK. Ensure that all content (including uploads) is still displaying properly.

### Delete files from old location

Once you’re happy everything is working, delete the old Discourse files to regain space.

```plaintext
cd /var/discourse
sudo rm -r shared/standalone

```

> Last edited by @JammyDodger 2024-05-25T11:28:25Z
> 
> > **Check document**
> >
> > Perform check on document:
