Upgrading SimpleLogin usually consists of simply pulling the latest version, stop & re-run SimpleLogin containers: *sl-migration*, *sl-app* and *sl-email*. It's not necessary to restart *sl-db* as it uses Postgres image.
No emails or any data is lost in the upgrade process. The same process is by the way used by the SimpleLogin SaaS version which is deployed several times per day.
Sometimes upgrading to a major version might require running a manual migration. This is for example the case when upgrading to 2.0.0. In this case please follow the corresponding migration first before running these scripts.
<details>
<summary>Upgrade to 2.0.0</summary>
<p>
2.0.0 comes with mailbox feature that requires running a script that puts all existing users to "full-mailbox" mode.
1) First please make sure to upgrade to 1.0.5 which is the latest version before 2.0.0.
2) Then connect to your SimpleLogin container shell:
```bash
docker exec -it sl-app python shell.py
```
3) Finally copy and run this below script:
```python
"""This ad-hoc script is to be run when upgrading from 1.0.5 to 2.0.0