Inhaltsverzeichnis
- General
- Major Upgrade 11.0.8 > 12.0.14
- Error "CSRF-Verifizierung fehlgeschlagen. Anfrage abgebrochen."
- Error "Seahub failed to start." with Debian 12 (bookworm) and Seafile Server 9.0.10
- Error "[WARNING] django.security.csrf:228 log_response Forbidden (CSRF cookie not set.): /"
- Minor upgrade 8.3 > 8.4
- WebDav
- WebDav: error HTTP MOVE 502 Bad Gateway
- Migrate from 7.1.5 to 8.0.3
- Config (17.02.2021)
- New Installation on Debian (27.12.2020)
- ./setup-seafile-mysql.sh
- Initial Installation (2018)
- Problem Android "Unknown Server Status"
- Upgrade
- Migrate to new server
General#
- Check version with https://www.inetone.de:444/api2/server-info/

- Stop: cd $SF ./seahub.sh stop + ./seafile.sh stop
- Start: ./seafile.sh start + ./seahub.sh start
- Restart: ./seafile.sh restart + ./seahub.sh restart
- Log: /markus/seafile/logs seafdav.log + seafile.log + seahub.log
Major Upgrade 11.0.8 > 12.0.14#
- Check version, Stop
- Download
, gunzip *, tar xvf *
- Follow Upgrade Notes: https://manual.seafile.com/latest/upgrade/upgrade_notes_for_11.0.x/
> apt-get install -y default-libmysqlclient-dev build-essential pkg-config libmemcached-dev > pip install --break-system-packages 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.*Note: add "--break-system-packages" for system wide installation
4. cd seafile-server-12.0.14
5. ./upgrade/upgrade_11.0_12.0.sh
6. Create the .env file in conf/ directory and update
TIME_ZONE=UTC #UTF (changed) JWT_PRIVATE_KEY=xxx #changed SEAFILE_SERVER_PROTOCOL=https SEAFILE_SERVER_HOSTNAME=<server>:<port> #changed, no protocol, but with port !!! SEAFILE_MYSQL_DB_HOST=127.0.0.1 #db # your MySQL host (changed) SEAFILE_MYSQL_DB_PORT=xxx #standard SEAFILE_MYSQL_DB_USER=xxx #standard SEAFILE_MYSQL_DB_PASSWORD=xxx #changed SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet-db #ccnet_db (changed) SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile-db #seafile_db (changed) SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub-db #seahub_db (changed)7. Start
> ./seafile.sh start # starts seaf-server > ./seahub.sh start # starts seahub # Fix for seahub failure "[ERROR] root:68 <module> Failed to import seafevents package." "ModuleNotFoundError: No module named 'pylibmc'" > pip install --break-system-packages django-pylibmc8. clean up old installations in /seafile
Error "CSRF-Verifizierung fehlgeschlagen. Anfrage abgebrochen."#
> sudo vi /markus/seafile/conf/seahub_settings.py CSRF_TRUSTED_ORIGINS = ["https://<yourServerURL:Port>"] # add this lineRestart seafile + seahub
Error "Seahub failed to start." with Debian 12 (bookworm) and Seafile Server 9.0.10#
1. There is no entry in the logs, but you can have the console output if you disable the daemon mode at vi ../conf/gunicorn.conf.pydaemon = False # originally True
./seahub.sh start
File "/markus/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/mysql/base.py", line 17, in <module>
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Error:Seahub failed to start.
Issue comes with Debian 12. There are two options:
a) Based on stackoverflow
:
In this way seafile is wrorking but without webdav, because some py files associate NOT 'django.db.backends.mysql' with SQLite (you need to tweak also the upgrade.sh, because this will fail, too)
1. vi ./conf/ccnet.conf
'ENGINE': 'mysql.connector.django', # old was 'django.db.backends.mysql'
2. pip install --break-system-packages mysql-connector-python
b) rcommended: Install all needed with --break-system-packages mode
pip install --break-system-packages sqlalchemy pip install --break-system-packages djangosaml2 apt-get install python2-dev libsasl2-dev gcc pip install --break-system-packages python-ldapHere also webdav is working fine again. You can check webdav with following command, there must be a listener to your webdav port (8080):
netstat -tlpen
Error "[WARNING] django.security.csrf:228 log_response Forbidden (CSRF cookie not set.): /"#
at /markus/seafile/logs/seahub.logvi /markus/seafile/seafile-server-latest/seahub/seahub/settings.py
SITE_ROOT_URLCONF = 'seahub.urls' ROOT_URLCONF = 'seahub.utils.rooturl' # ME, 01.09.2021 changed #SITE_ROOT = '/' SITE_ROOT = '/markus/seafile/seafile-server-latest/' <===
Minor upgrade 8.3 > 8.4#
1. Download server version into /markus/seafile, gunzip, untar2. Then you have another folder "seafile-server-8.0.4"
3. stop, cd <new folder>
4. ./upgrade/minor-upgrade.sh
5. start
WebDav#
base URL = https://www.inetone.de:444/seafdavWebDav: error HTTP MOVE 502 Bad Gateway#
check seafdav.logFixed according to forum
with Apache conf added:
RequestHeader edit Destination ^https: http:
Migrate from 7.1.5 to 8.0.3
#
- Check version, Stop
- Download
, gunzip *, tar xvf *
- extract and copy, run script (start upgrade scripts from base folder, not inside upgrade folder!
cp seafile-server-8.0.3 /markus/seafile cd /markus/seafile/seafile-server-8.0.3 ./upgrade/upgrade_7.1_8.0.sh4. Start
Config (17.02.2021)#
See Seafile admin manualConfig Seahub with Apache
at "Modify ccnet.conf and seahub_setting.py"
Seafile > WebInterface > Avatar-Icon > Steam Administration > Settings
SERVICE_URL = https://www.inetone.de:444 FILE_SERVER_ROOT = https://www.inetone.de:444/seafhttp
Though the docu tells "if you set the value both via Web UI and config file, the setting via Web UI will take precedence", I edited the config files, too:
vi .../conf/seahub_settings.py
# add following FILE_SERVER_ROOT = 'https://www.inetone.de:444/seafhttp'vi .../conf/ccnet.conf
# change SERVICE_URL = https://www.inetone.de:444
Note: When you change service URLs clean your browser cache or hard reload each page !
It takes a some seconds until the new settings come into effect even if the seafile has started already, so keep reloading in case!
For Apache there is a proxy config
.
vi /etc/apache2/sites-available/000-default-le-ssl.conf
<VirtualHost www.inetone.de:444>
ServerName www.inetone.de
ServerAlias inetone.de
DocumentRoot /var/www
ErrorLog ${APACHE_LOG_DIR}/seafile_443.log
Alias /media /markus/seafile/seafile-server-latest/seahub/media
RewriteEngine On
<Location /media>
Require all granted
</Location>
#
# seafile fileserver
#
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]
#
# seahub
#
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.inetone.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.inetone.de/privkey.pem
</VirtualHost>
On Errors check Seafile FAQ
.New Installation on Debian (27.12.2020)#
Download
> Server > Server for generic Linux
cd /markus/seafile wget ...copy link... tar xvf * (this will create sub folder like seafile-server-7.0.5) cd seafile-server-7.0.5Note: symlink seafile-server-latest is created automatically from the script.
Manual for deploying with MySQL

Clean up databases?
mysql -u <user> -p
DROP DATABASE `ccnet-db`;
DROP DATABASE `seafile-db`;
DROP DATABASE `seahub-db`;
Note: Seafile 7.1.x will NOT work with Debian 9 because some required packages are not available there.
You will find error django.request:135 handle_uncaught_exception Internal Server Error at seafileHome\logs\seahub.log !
# on Debian 10/Ubuntu 18.04
apt-get update
apt-get install python3 python3-setuptools python3-pip -y
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy \
django-pylibmc django-simple-captcha python3-ldap
./setup-seafile-mysql.sh#
Checking python on this machine ...
-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at
https://download.seafile.com/published/seafile-manual/home.md
Press ENTER to continue
-----------------------------------------------------------------
What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] inetone
What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 185.244.195.4
Which port do you want to use for the seafile fileserver?
[ default "8082" ]
-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------
[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases
[ 1 or 2 ] 1
What is the host of mysql server?
[ default "localhost" ]
What is the port of mysql server?
[ default "3306" ]
What is the password of the mysql root user?
[ root password ]
verifying password of user root ... done
Enter the name for mysql user of seafile. It would be created if not exists.
[ default "seafile" ]
Enter the password for mysql user "seafile":
[ password for seafile ]
verifying password of user seafile ... done
Enter the database name for ccnet-server:
[ default "ccnet-db" ]
Enter the database name for seafile-server:
[ default "seafile-db" ]
Enter the database name for seahub:
[ default "seahub-db" ]
---------------------------------
This is your configuration
---------------------------------
server name: inetone
server ip/domain: 185.244.195.4
seafile data dir: /markus/seafile/seafile-data
fileserver port: 8082
database: create new
ccnet database: ccnet-db
seafile database: seafile-db
seahub database: seahub-db
database user: seafile
---------------------------------
Press ENTER to continue, or Ctrl-C to abort
---------------------------------
Generating ccnet configuration ...
done
Successly create configuration dir /markus/seafile/ccnet.
Generating seafile configuration ...
Done.
done
Generating seahub configuration ...
----------------------------------------
Now creating ccnet database tables ...
----------------------------------------
----------------------------------------
Now creating seafile database tables ...
----------------------------------------
----------------------------------------
Now creating seahub database tables ...
----------------------------------------
creating seafile-server-latest symbolic link ... done
-----------------------------------------------------------------
Your seafile server configuration has been finished successfully.
-----------------------------------------------------------------
run seafile server: ./seafile.sh { start | stop | restart }
run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------
port of seafile fileserver: 8082
port of seahub: 8000
When problems occur, Refer to
https://download.seafile.com/published/seafile-manual/home.md
for information.
/markus/seafile/seafile-server-latest/seafile.sh restart /markus/seafile/seafile-server-latest/seahub.sh restart
Logs at /markus/seafile/logs
vi /markus/seafile/logs/seahub.log
django.request:135 handle_uncaught_exception Internal Server Error
Initial Installation (2018)#
After reading positive comments I installed seafile to my Linux root server1. Info Server
> cat /proc/version Linux version 4.4.0-66-generic (buildd@lgw01-28) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 > lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial > getconf LONG_BIT 64 > uname -m x86_64 > file /bin/bash /bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0428e4834e687e231fa865562d32fbb64ce45577, stripped
2. Download
Server for generic Linux 64bit
wget https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_6.0.8_x86-64.tar.gz gunzip * tar xvf *
3. See Manual
For installing and setup see "Deploying with MySQL"
4. Start/Stop Folder "seafile-server-latest" (>4.0.2)
./seafile.sh start # Start seafile service ./seahub.sh start # Start seahub website, port defaults to 8000 ./seahub.sh stop ./seafile.sh stop
Problem Android "Unknown Server Status"#
This seems to be a device ID problem in the source code
.
See ./seafile-server-latest/seahub/seahub/api2/serializers.py
Upgrade#
on 12.01.2017 from 4.05. to 6.0.7, see manual
1. cd /markus/seafile
2. stop old one
3. here you download the lastest server version
Note: you have here als folder ccnet and seafile-data
After gunzip and tar you have a new folder seafile-server-6.0.7
4. cd seafile-server-6.0.7
5. ls -l upgrade
Here you need to call all steps, e.g.
upgrade_4.0_4.1.sh
upgrade_4.1_4.2.sh
...
But NOT from inside folder, but one above, so
upgrade/upgrade_4.0_4.1.sh
upgrade/upgrade_4.1_4.2.sh
...
6. All upgrade set a new symlink to seafile-server-6.0.7
7. cd seafile-server-6.0.7
8. start like above, done
Migrate to new server#
- Stop services
- Download and install latest version (as of Mar 2017 it was 6.0.8), follow manual
- create mysql databases create database ccnet-db default character set 'UTF8'; create database seafile-db default character set 'UTF8'; create database seahub-db default character set 'UTF8';
- create mysql seafile user create user 'seafile'@'localhost' identified by 'seafile'; GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@localhost; GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@localhost; GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@localhost; SET PASSWORD FOR 'seafile'@'localhost' = PASSWORD('...your.password...');
- clean and copy folders ccnet, conf, seafile-data
- maybe: update SERVER_URL in /conf/ccnet.conf
- old versions of seafile used folder "data" and not "seafile-data" as data storage, update folder in /ccnet/seafile.ini
- export, copy, import database mysqldump -u root -p<password> ccnet-db > /home/proftpd/ccnet-db.sql mysqldump -u root -p<password> seafile-db > /home/proftpd/seafile-db.sql mysqldump -u root -p<password> seahub-db > /home/proftpd/seahub-db.sql mysql -u root -p<password> ccnet-db < /home/proftpd/ccnet-db.sql mysql -u root -p<password> seafile-db < /home/proftpd/seafile-db.sql mysql -u root -p<password> seahub-db < /home/proftpd/seahub-db.sql
- Delete cache rm -rf /tmp/seahub_cache
- Update mysql config
in /conf/seahub_settings.py to
'init_command': 'SET default_storage_engine=INNODB',
- Start services