> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emplio.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Emplio and back up your data

> Update self-hosted Emplio by running the installer again, and back up its Docker volumes and .env so you can restore chats, memory, records and saved logins.

Updating keeps your settings and data. Backing up means copying Emplio's Docker volumes and your `.env`.

## Update

Run the installer again:

```bash theme={null}
curl -fsSL https://emplio.app/install.sh | bash
```

Or, from the folder you installed to:

```bash theme={null}
cd ~/emplio && ./setup.sh
```

It keeps your `.env`, downloads the newest images, restarts Emplio and checks it's up. The installer replaces the other files in `~/emplio`, so keep your own changes in `.env`.

## What to back up

| Volume | What's in it |
| - | - |
| `postgres-data` | Accounts, chats, tasks, automations, settings and saved logins. |
| `gitea-data` | Memory: each business's files and their full history. |
| `app-data` | Uploaded and made files, and each business's records database. |
| `secrets` | The token Emplio uses to reach its file history. |

Keep a copy of `.env` too. Without the same `ENCRYPTION_KEY`, saved passwords and keys can't be read.

## Back up with Docker

Docker names the volumes after the install folder, so in `~/emplio` they are `emplio_postgres-data` and so on. Check yours with `docker volume ls`. This stops Emplio for a moment, writes one archive per volume to `~/emplio/backups`, and starts it again:

```bash theme={null}
cd ~/emplio
mkdir -p backups
docker compose stop
for v in postgres-data gitea-data app-data secrets; do
  docker run --rm -v "emplio_$v:/from:ro" -v "$PWD/backups:/to" alpine tar -czf "/to/$v.tar.gz" -C /from .
done
cp .env backups/
docker compose start
```

Copy the `backups` folder somewhere off the machine.

> [!WARNING]
>
> Never run `docker compose down -v`. The `-v` deletes the volumes, and with them all of Emplio's data.

## Restore

On the new machine, put your `.env` in the install folder first, so the installer keeps it. Unpack each archive into the volume of the same name before Emplio starts, then run `./setup.sh`.

> [card] [Configuration](https://docs.emplio.app/self-host/configuration.md)
>
> What each setting in `.env` does.

> [card] [Troubleshooting](https://docs.emplio.app/self-host/troubleshooting.md)
>
> If something doesn't come back up.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.