Upgrade Seafile binary from 12.0 to 13.0¶
New system libraries¶
apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmysqlclient-dev ldap-utils libldap2-dev python3.12-venv default-libmysqlclient-dev build-essential pkg-config
apt-get install -y python3 python3-dev python3-setuptools python3-pip python3-ldap python3-rados libmariadb-dev-compat ldap-utils libldap2-dev libsasl2-dev pkg-config python3.13-venv
New Python libraries¶
Note, you should install Python libraries system wide using root user or sudo mode.
pip3 install --timeout=3600 boto3 oss2 twilio configparser pytz \
sqlalchemy==2.0.* pymysql==1.1.* jinja2 django-pylibmc pylibmc redis django-redis psd-tools lxml \
django==5.2.* cffi==1.17.1 future==1.0.* mysqlclient==2.2.* captcha==0.7.* django_simple_captcha==0.6.* \
pyjwt==2.10.* djangosaml2==1.11.* pysaml2==7.5.* pycryptodome==3.23.* python-ldap==3.4.* pillow==11.3.* pillow-heif==1.0.* cairosvg==2.8.* scikit-learn==1.7.*
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
1) Install new system libraries and Python libraries¶
Install new system libraries and Python libraries for your operation system as documented above.
2) Stop Seafile-12.0.x server¶
In the folder of Seafile 12.0.x, run the commands:
./seahub.sh stop
./seafile.sh stop
3) Run Seafile 13.0.x upgrade script¶
In the folder of Seafile 13.0.x, run the upgrade script
upgrade/upgrade_12.0_13.0.sh
4) Modify the .env file in conf/ directory¶
conf/.env
JWT_PRIVATE_KEY=<Your jwt private key>
SEAFILE_SERVER_PROTOCOL=https
SEAFILE_SERVER_HOSTNAME=seafile.example.com
SEAFILE_MYSQL_DB_HOST=<your database 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
## Cache
### options: redis (recommend), memcached
CACHE_PROVIDER=redis
### Redis
REDIS_HOST='<your redis host>'
REDIS_PORT=6379
REDIS_PASSWORD=
### Memcached
MEMCACHED_HOST='<your memcached host>'
MEMCACHED_PORT=11211
Tip
Redis is recommended as the cache server, you need to install the following dependencies.
apt-get install -y redis-server libhiredis-dev
# activate the venv
source python-venv/bin/activate
pip3 install redis django-redis
systemctl enable --now redis-server
If you are using memcached as the cache server, you need to install the following dependencies.
apt-get install memcached libmemcached-dev -y
# activate the venv
source python-venv/bin/activate
pip3 install pylibmc django-pylibmc
systemctl enable --now memcached
Tip
JWT_PRIVATE_KEY, A random string with a length of no less than 32 characters, can be generated by
pwgen -s 40 1
5) Remove obsolete configurations¶
Although the configurations in environment (i.e., .env) have higher priority than the configurations in config files, we recommend that you remove or modify the cache configuration in the following files to avoid ambiguity:
-
Backup the old configuration files:
# please replace /opt/seafile-data to your $SEAFILE_VOLUME cp /opt/seafile/conf/seafile.conf /opt/seafile/conf/seafile.conf.bak cp /opt/seafile/conf/seahub_settings.py /opt/seafile/conf/seahub_settings.py.bak -
Clean up redundant configuration items in the configuration files:
- Open
/opt/seafile/conf/seafile.confand remove the entire[memcached],[database],[commit_object_backend],[fs_object_backend],[notification]and[block_backend]if above sections have correctly specified in.env. - Open
/opt/seafile/conf/seahub_settings.pyand remove the entire blocks forDATABASES = {...}andCAHCES = {...}
In the most cases, the
seafile.confonly include the listen port8082of Seafile file server. - Open
6) Start Seafile-13.0.x server¶
In the folder of Seafile 13.0.x, run the command:
./seafile.sh start # starts seaf-server
./seahub.sh start # starts seahub
7) (Optional) Upgrade notification server¶
Since seafile 12.0, we use docker to deploy the notification server. Please follow the document of notification server to re-deploy notification server.
Note
Notification server is designed to be work with Docker based deployment. To make it work with Seafile binary package on the same server, you will need to add Nginx rules for notification server properly.
8) (Optional) Upgrade SeaDoc from 1.0 to 2.0¶
Since seafile 12.0, we use docker to deploy the seadoc server. Please see the document Setup SeaDoc to install SeaDoc on a separate machine and integrate with your binary packaged based Seafile server v13.0.
SeaDoc and Seafile binary package
Deploying SeaDoc and Seafile binary package on the same server is no longer officially supported. You will need to add Nginx rules for SeaDoc server properly.
FAQ¶
We have documented common issues encountered by users when upgrading to version 13.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.