# Upgrade notes for 13.0

- These notes give additional information about changes.
Please always follow the main [upgrade guide](./upgrade.md).

- For docker based version, please check [upgrade Seafile Docker image](./upgrade_docker.md)

## Important release changes

Seafile version 13.0 has following major changes:

* SeaDoc: SeaDoc is now version 2.0, beside support sdoc, it support whiteboard too
* Thumbnail server: A new thumbnail server component is added to improve performance for thumbnail generating and support thumbnail for videos
* Metadata server: A new metadata server component is avaible to manage extended file properties
* Notification server: The web interface now support real-time update when other people add or remove files if notification-server is enabled
* SeaSearch: SeaSearch is now version 1.0 and support full-text search


Configuration changes:

* Database and memcache configurations are added to `.env`, it is recommended to use environment variables to config database and memcache
* Redis is recommended to be used as memcache server
* (Optional) S3 configuration can be done via environment variables and is much simplified
* Elastic search is now have its own yml file

Breaking changes

* For security reason, WebDAV no longer support login with LDAP account, the user with LDAP account must generate a WebDAV token at the profile page
* [File tags] The old file tags feature can no longer be used, the interface provide an upgrade notice for migrate the data to the new file tags feature


Deploying Seafile with binary package is no longer supported for community edition. We recommend you to migrate your existing Seafile deployment to docker based.


### ElasticSearch change (pro edition only)

Elasticsearch version is not changed in Seafile version 13.0

## New system libraries (TO be updated)

=== "Ubuntu 24.04/22.04"

    ```sh
    apt-get install -y default-libmysqlclient-dev build-essential pkg-config libmemcached-dev
    ```

=== "Debian 11"
    ```sh
    apt-get install -y libsasl2-dev
    ```


## New Python libraries (TO be updated)

Note, you should install Python libraries system wide using root user or sudo mode.

=== "Ubuntu 24.04 / Debian 12"

    ```sh
    sudo pip3 install future==1.0.* mysqlclient==2.2.* pillow==10.4.* sqlalchemy==2.0.* pillow_heif==0.18.0 \
    gevent==24.2.* captcha==0.6.* django_simple_captcha==0.6.* djangosaml2==1.9.* \
    pysaml2==7.3.* pycryptodome==3.20.* cffi==1.17.0 python-ldap==3.4.*
    ```

=== "Ubuntu 22.04 / Debian 11"

    ```sh
    sudo pip3 install future==1.0.* mysqlclient==2.1.* pillow==10.4.* sqlalchemy==2.0.* pillow_heif==0.18.0 \
    gevent==24.2.* captcha==0.6.* django_simple_captcha==0.6.* djangosaml2==1.9.* \
    pysaml2==7.2.* pycryptodome==3.16.* cffi==1.15.1 python-ldap==3.2.0
    ```


## Upgrade to 13.0 (for binary installation)

The following instruction is for binary package based installation. If you use Docker based installation, please see [*Updgrade Docker*](./upgrade_docker.md)

### 1) Clean database tables before upgrade

If you have a large number of `Activity` in MySQL, clear this table first [Clean Database](../../administration/clean_database). Otherwise, the database upgrade will take a long time.

### 2) Install new system libraries and Python libraries

Install new system libraries and Python libraries for your operation system as documented above.


### 3) Stop Seafile-11.0.x server

In the folder of Seafile 11.0.x, run the commands:

```sh
./seahub.sh stop
./seafile.sh stop
```

### 4) Run Seafile 12.0.x upgrade script

In the folder of Seafile 12.0.x, run the upgrade script

```sh
upgrade/upgrade_11.0_12.0.sh
```

### 5) Create the `.env` file in `conf/` directory

conf/.env

```env
TIME_ZONE=UTC
JWT_PRIVATE_KEY=xxx
SEAFILE_SERVER_PROTOCOL=https
SEAFILE_SERVER_HOSTNAME=seafile.example.com
SEAFILE_MYSQL_DB_HOST=db # your MySQL host
SEAFILE_MYSQL_DB_PORT=3306
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD=<your MySQL password>
SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db
SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db
SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db
```

!!! tip
    JWT_PRIVATE_KEY, A random string with a length of no less than 32 characters, can be generated by
    
    ```sh
    pwgen -s 40 1
    ```

### 6) Start Seafile-12.0.x server

In the folder of Seafile 12.0.x, run the command:

```
./seafile.sh start # starts seaf-server
./seahub.sh start  # starts seahub
```

### 7) (Optional) Upgrade notification server



### 8) (Optional) Upgrade SeaDoc from 1.0 to 2.0




## FAQ

We have documented common issues encountered by users when upgrading to version 12.0 in our FAQ <https://cloud.seatable.io/dtable/external-links/7b976c85f504491cbe8e/?tid=0000&vid=0000>.

If you encounter any issue, please give it a check.
