Upgrade Seafile binary from 11.0 to 12.0¶
New system libraries¶
apt-get install -y default-libmysqlclient-dev build-essential pkg-config libmemcached-dev
apt-get install -y libsasl2-dev
New Python libraries¶
Note, you should install Python libraries system wide using root user or sudo mode.
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.*
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 12.0 (for binary installation)¶
The following instruction is for binary package based installation. If you use Docker based installation, please see Upgrade 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-11.0.x server¶
In the folder of Seafile 11.0.x, run the commands:
./seahub.sh stop
./seafile.sh stop
3) Run Seafile 12.0.x upgrade script¶
In the folder of Seafile 12.0.x, run the upgrade script
upgrade/upgrade_11.0_12.0.sh
4) Create the .env file in conf/ directory¶
conf/.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
pwgen -s 40 1
5) 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
6) (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.
7) (Optional) Upgrade SeaDoc from 0.8 to 1.0¶
If you have deployed SeaDoc v0.8 with Seafile v11.0, you can upgrade it to 1.0 use the following two steps:
- Delete sdoc_db.
- Re-deploy SeaDoc server. In other words, delete the old SeaDoc deployment and re-deploy a new SeaDoc server.
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.
7.1) Delete sdoc_db¶
From version 1.0, SeaDoc is using seahub_db database to store its operation logs and no longer need an extra database sdoc_db. The database tables in seahub_db are created automatically when you upgrade Seafile server from v11.0 to v12.0. You can simply delete sdoc_db.
7.2) Deploy a new SeaDoc server¶
Please see the document Setup SeaDoc to install SeaDoc on a separate machine and integrate with your binary packaged based Seafile server v12.0.
8) (Optional) Update gunicorn.conf.py file in conf/ directory¶
If you deployed single sign on (SSO) by Shibboleth protocol, the following line should be added to the gunicorn config file.
forwarder_headers = 'SCRIPT_NAME,PATH_INFO,REMOTE_USER'
9) (Optional) Other configuration changes¶
Enable passing of REMOTE_USER¶
REMOTE_USER header is not passed to Seafile by default, you need to change gunicorn.conf.py if you need REMOTE_USER header for SSO.
forwarder_headers = 'SCRIPT_NAME,PATH_INFO,REMOTE_USER'
Supplement or remove ALLOWED_HOSTS in seahub_settings.py¶
Since version 12.0, the seaf-server component need to send internal requests to seahub component to check permissions, as reporting 400 Error when downloading files if the ALLOWED_HOSTS set incorrect. In this case, you can either remove ALLOWED_HOSTS in seahub_settings.py or supplement 127.0.0.1 in ALLOWED_HOSTS list:
# seahub_settings.py
ALLOWED_HOSTS = ['...(your domain)', '127.0.0.1']
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.