diff --git a/12.0/deploy/notification-server/index.html b/12.0/deploy/notification-server/index.html index dba47f4a..b17ab018 100644 --- a/12.0/deploy/notification-server/index.html +++ b/12.0/deploy/notification-server/index.html @@ -3461,7 +3461,7 @@ openssl rand -base64 32 proxy_pass http://127.0.0.1:8083/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_set_header Connection $connection_upgrade; access_log /var/log/nginx/notif.access.log; error_log /var/log/nginx/notif.error.log; } diff --git a/12.0/deploy_pro/deploy_clamav_with_seafile/index.html b/12.0/deploy_pro/deploy_clamav_with_seafile/index.html index 711e3d01..b4944509 100644 --- a/12.0/deploy_pro/deploy_clamav_with_seafile/index.html +++ b/12.0/deploy_pro/deploy_clamav_with_seafile/index.html @@ -3524,7 +3524,7 @@ User root -
$ curl https://www.eicar.org/download/eicar.com.txt | clamdscan -
+
$ curl https://secure.eicar.org/eicar.com.txt | clamdscan -
 

The output must include:

diff --git a/12.0/deploy_pro/deploy_in_a_cluster/index.html b/12.0/deploy_pro/deploy_in_a_cluster/index.html index fc813e7c..090da937 100644 --- a/12.0/deploy_pro/deploy_in_a_cluster/index.html +++ b/12.0/deploy_pro/deploy_in_a_cluster/index.html @@ -3931,7 +3931,7 @@ sudo pip install boto

seahub_settings.py

-

You must setup and use memcached when deploying Seafile cluster. Refer to "add memcached" to use memcached in Seahub.

+

You must setup and use memory cache when deploying Seafile cluster. Refer to "memory cache" to configure memory cache in Seahub.

Also add following options to seahub_setting.py. These settings tell Seahub to store avatar in database and cache avatar in memcached, and store css CACHE to local memory.

AVATAR_FILE_STORAGE = 'seahub.base.database_storage.DatabaseStorage'
 
diff --git a/12.0/deploy_pro/ldap_in_11.0/index.html b/12.0/deploy_pro/ldap_in_11.0/index.html index 4b6a7c2e..dd9685f3 100644 --- a/12.0/deploy_pro/ldap_in_11.0/index.html +++ b/12.0/deploy_pro/ldap_in_11.0/index.html @@ -1482,6 +1482,15 @@ + + +
  • + + + SSO and LDAP users use the same uid + + +
  • @@ -3734,6 +3743,15 @@ + + +
  • + + + SSO and LDAP users use the same uid + + +
  • @@ -4089,29 +4107,60 @@ After synchronization is complete, you can see the user's full name, department MULTI_LDAP_1_ADMIN_PASSWORD = 'Hello@123' MULTI_LDAP_1_PROVIDER = 'ldap1' MULTI_LDAP_1_LOGIN_ATTR = 'userPrincipalName' + +# Optional configs +MULTI_LDAP_1_USER_FIRST_NAME_ATTR = 'givenName' +MULTI_LDAP_1_USER_LAST_NAME_ATTR = 'sn' +MULTI_LDAP_1_USER_NAME_REVERSE = False +ENABLE_MULTI_LDAP_1_EXTRA_USER_INFO_SYNC = True + +MULTI_LDAP_1_FILTER = 'memberOf=CN=testgroup,OU=test,DC=seafile,DC=ren' +MULTI_LDAP_1_USE_PAGED_RESULT = False +MULTI_LDAP_1_FOLLOW_REFERRALS = True +ENABLE_MULTI_LDAP_1_USER_SYNC = True +ENABLE_MULTI_LDAP_1_GROUP_SYNC = True +MULTI_LDAP_1_SYNC_DEPARTMENT_FROM_OU = True + +MULTI_LDAP_1_USER_OBJECT_CLASS = 'person' +MULTI_LDAP_1_DEPT_ATTR = '' +MULTI_LDAP_1_UID_ATTR = '' +MULTI_LDAP_1_CONTACT_EMAIL_ATTR = '' +MULTI_LDAP_1_USER_ROLE_ATTR = '' +MULTI_LDAP_1_AUTO_REACTIVATE_USERS = True + +MULTI_LDAP_1_GROUP_OBJECT_CLASS = 'group' +MULTI_LDAP_1_GROUP_FILTER = '' +MULTI_LDAP_1_GROUP_MEMBER_ATTR = 'member' +MULTI_LDAP_1_GROUP_UUID_ATTR = 'objectGUID' +MULTI_LDAP_1_CREATE_DEPARTMENT_LIBRARY = False +MULTI_LDAP_1_DEPT_REPO_PERM = 'rw' +MULTI_LDAP_1_DEFAULT_DEPARTMENT_QUOTA = -2 +MULTI_LDAP_1_SYNC_GROUP_AS_DEPARTMENT = False +MULTI_LDAP_1_USE_GROUP_MEMBER_RANGE_QUERY = False +MULTI_LDAP_1_USER_ATTR_IN_MEMBERUID = 'uid' +MULTI_LDAP_1_DEPT_NAME_ATTR = '' ......

    Note: There are still some shared config options are used for all LDAP servers, as follows:

    -
    # Common basic config options
    -LDAP_USER_FIRST_NAME_ATTR = 'givenName'      # For update user's first name when login
    -LDAP_USER_LAST_NAME_ATTR = 'sn'              # For update user's last name when login
    -LDAP_USER_NAME_REVERSE = False               # Whether to reverse the user's first and last name
    -
    -# Common user sync options
    +
    # Common user sync options
     LDAP_SYNC_INTERVAL = 60
     IMPORT_NEW_USER = True                   # Whether to import new users when sync user
     ACTIVATE_USER_WHEN_IMPORT = True         # Whether to activate the user when importing new user
     DEACTIVE_USER_IF_NOTFOUND = False        # Set to "true" if you want to deactivate a user 
                                              # when he/she was deleted in AD server.
    -ENABLE_EXTRA_USER_INFO_SYNC = True       # Whether to enable sync of additional user information,
    -                                         # including user's full name, department, and Windows login name, etc.
     
     # Common group sync options
     DEL_GROUP_IF_NOT_FOUND = False           # Set to "true", sync process will delete the group if not found it in LDAP server.
     DEL_DEPARTMENT_IF_NOT_FOUND = False      # Set to "true", sync process will deleted the department if not found it in LDAP server.
     
    +

    SSO and LDAP users use the same uid

    +

    If you sync users from LDAP to Seafile, when the user login via SSO (ADFS or OAuth), you want Seafile to find the existing account for this user instead of creating a new one, you can set SSO_LDAP_USE_SAME_UID = True:

    +
    SSO_LDAP_USE_SAME_UID = True
    +
    + +

    Note, here the UID means the unique user ID, in LDAP it is the attribute you use for LDAP_LOGIN_ATTR (not LDAP_UID_ATTR), in ADFS it is uid attribute. You need make sure you use the same attribute for the two settings.

    Importing Roles from LDAP

    Seafile Pro Edition supports syncing roles from LDAP or Active Directory.

    To enable this feature, add below option to seahub_settings.py, e.g.

    diff --git a/12.0/search/search_index.json b/12.0/search/search_index.json index d5a72912..32a22b79 100644 --- a/12.0/search/search_index.json +++ b/12.0/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    Seafile is an open source cloud storage system for file sync, share and document collaboration.

    "},{"location":"#license","title":"LICENSE","text":"

    The different components of Seafile project are released under different licenses:

    • Seafile iOS client: Apache License v2
    • Seafile Android client: GPLv3
    • Desktop syncing client: GPLv2
    • Seafile Server core: AGPLv3
    • Seahub (Seafile server Web UI): Apache License v2
    "},{"location":"#contact-information","title":"Contact information","text":"
    • Twitter: @seafile https://twitter.com/seafile
    • Forum: https://forum.seafile.com
    "},{"location":"changelog/","title":"Changelog","text":""},{"location":"changelog/#changelogs","title":"Changelogs","text":"
    • Seafile Community Edition
    • Seafile Professional Edition
    • Seafile Sync Client
    • Seafile Drive Client (SeaDrive)
    • Seafile Android Client (Seadroid)
    • Seafile iOS Client
    "},{"location":"contribution/","title":"Contribution","text":""},{"location":"contribution/#licensing","title":"Licensing","text":"

    The different components of Seafile project are released under different licenses:

    • Seafile iOS client: Apache License v2
    • Seafile Android client: GPLv3
    • Desktop syncing client: GPLv2
    • Seafile Server core: AGPLv3
    • Seahub (Seafile server Web UI): Apache License v2
    "},{"location":"contribution/#discussion","title":"Discussion","text":"

    Forum: https://forum.seafile.com

    Follow us @seafile https://twitter.com/seafile

    "},{"location":"contribution/#report-a-bug","title":"Report a Bug","text":"
    • Please report a bug in our forum, this is a preferred way.
    • You can also report a bug in GitHub https://github.com/haiwen/seafile/issues?state=open
    "},{"location":"contribution/#code-style","title":"Code Style","text":"

    The source code of seafile is ISO/IEC 9899:1999 (E) (a.k.a. C99) compatible. Take a look at code standard.

    "},{"location":"roadmap/","title":"Roadmap","text":"

    Please check https://www.seafile.com/en/roadmap/

    "},{"location":"build_seafile/","title":"How to Build Seafile","text":"

    You can build Seafile from our source code package or from the Github repo directly.

    Client

    • Linux
    • Max OS X
    • Windows

    Server

    • Build Seafile server
    "},{"location":"build_seafile/linux/","title":"Linux","text":""},{"location":"build_seafile/linux/#preparation","title":"Preparation","text":"

    The following list is what you need to install on your development machine. You should install all of them before you build Seafile.

    Package names are according to Ubuntu 14.04. For other Linux distros, please find their corresponding names yourself.

    • autoconf/automake/libtool
    • libevent-dev ( 2.0 or later )
    • libcurl4-openssl-dev (1.0.0 or later)
    • libgtk2.0-dev ( 2.24 or later)
    • uuid-dev
    • intltool (0.40 or later)
    • libsqlite3-dev (3.7 or later)
    • valac (only needed if you build from git repo)
    • libjansson-dev
    • qtchooser
    • qtbase5-dev
    • libqt5webkit5-dev
    • qttools5-dev
    • qttools5-dev-tools
    • valac
    • cmake
    • python-simplejson (for seaf-cli)
    • libssl-dev
    sudo apt-get install autoconf automake libtool libevent-dev libcurl4-openssl-dev libgtk2.0-dev uuid-dev intltool libsqlite3-dev valac libjansson-dev cmake qtchooser qtbase5-dev libqt5webkit5-dev qttools5-dev qttools5-dev-tools libssl-dev\n

    For a fresh Fedora 20 / 23 installation, the following will install all dependencies via YUM:

    $ sudo yum install wget gcc libevent-devel openssl-devel gtk2-devel libuuid-devel sqlite-devel jansson-devel intltool cmake libtool vala gcc-c++ qt5-qtbase-devel qt5-qttools-devel qt5-qtwebkit-devel libcurl-devel openssl-devel\n
    "},{"location":"build_seafile/linux/#building","title":"Building","text":"

    First you should get the latest source of libsearpc/ccnet/seafile/seafile-client:

    Download the source tarball of the latest tag from

    • https://github.com/haiwen/libsearpc/tags (use v3.2-latest)
    • https://github.com/haiwen/seafile/tags
    • https://github.com/haiwen/seafile-client/tags

    For example, if the latest released seafile client is 8.0.0, then just use the v8.0.0 tags of the four projects. You should get four tarballs:

    • libsearpc-v3.2-latest.tar.gz
    • seafile-8.0.0.tar.gz
    • seafile-client-8.0.0.tar.gz
    # without alias wget= might not work\nshopt -s expand_aliases\n\nexport version=8.0.0\nalias wget='wget --content-disposition -nc'\nwget https://github.com/haiwen/libsearpc/archive/v3.2-latest.tar.gz\nwget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz \nwget https://github.com/haiwen/seafile/archive/v${version}.tar.gz\nwget https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz\n

    Now uncompress them:

    tar xf libsearpc-3.2-latest.tar.gz\ntar xf ccnet-${version}.tar.gz\ntar xf seafile-${version}.tar.gz\ntar xf seafile-client-${version}.tar.gz\n

    To build Seafile client, you need first build libsearpc and ccnet, seafile.

    "},{"location":"build_seafile/linux/#set-paths","title":"set paths","text":"
    export PREFIX=/usr\nexport PKG_CONFIG_PATH=\"$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH\"\nexport PATH=\"$PREFIX/bin:$PATH\"\n
    "},{"location":"build_seafile/linux/#libsearpc","title":"libsearpc","text":"
    cd libsearpc-3.2-latest\n./autogen.sh\n./configure --prefix=$PREFIX\nmake\nsudo make install\ncd ..\n
    "},{"location":"build_seafile/linux/#seafile","title":"seafile","text":"

    In order to support notification server, you need to build libwebsockets first.

    git clone --branch=v4.3.0 https://github.com/warmcat/libwebsockets\ncd libwebsockets\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\ncd ..\n

    You can set --enable-ws to no to disable notification server. After that, you can build seafile:

    cd seafile-${version}/\n./autogen.sh\n./configure --prefix=$PREFIX --disable-fuse\nmake\nsudo make install\ncd ..\n
    "},{"location":"build_seafile/linux/#seafile-client","title":"seafile-client","text":"
    cd seafile-client-${version}\ncmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .\nmake\nsudo make install\ncd ..\n
    "},{"location":"build_seafile/linux/#custom-prefix","title":"custom prefix","text":"

    when installing to a custom $PREFIX, i.e. /opt, you may need a script to set the path variables correctly

    cat >$PREFIX/bin/seafile-applet.sh <<END\n#!/bin/bash\nexport LD_LIBRARY_PATH=\"$PREFIX/lib:$LD_LIBRARY_PATH\"\nexport PATH=\"$PREFIX/bin:$PATH\"\nexec seafile-applet $@\nEND\ncat >$PREFIX/bin/seaf-cli.sh <<END\nexport LD_LIBRARY_PATH=\"$PREFIX/lib:$LD_LIBRARY_PATH\"\nexport PATH=\"$PREFIX/bin:$PATH\"\nexport PYTHONPATH=$PREFIX/lib/python2.7/site-packages\nexec seaf-cli $@\nEND\nchmod +x $PREFIX/bin/seafile-applet.sh $PREFIX/bin/seaf-cli.sh\n

    you can now start the client with $PREFIX/bin/seafile-applet.sh.

    "},{"location":"build_seafile/osx/","title":"macOS","text":""},{"location":"build_seafile/osx/#environment-setup","title":"Environment Setup","text":"

    The following setups are required for building and packaging Sync Client on macOS:

    • XCode 13.2 (or later)
      • After installing XCode, you can start XCode once so that it automatically installs the rest of the components.
    • Qt 6.2
    • MacPorts
      • Modify /opt/local/etc/macports/macports.conf to add configuration universal_archs arm64 x86_64. Specifies the architecture on which MapPorts is compiled.
      • Modify /opt/local/etc/macports/variants.conf to add configuration +universal. MacPorts installs universal versions of all ports.
      • Install other dependencies: sudo port install autoconf automake pkgconfig libtool glib2 libevent vala openssl git jansson cmake libwebsockets.
    • Certificates
      • Create certificate signing requests for certification, see https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request.
      • Create a Developer ID Application certificate and a Developer ID Installer certificate, see https://developer.apple.com/help/account/create-certificates/create-developer-id-certificates. Install them to the login keychain.
      • Install the Developer ID Intermediate Certificate (Developer ID - G2), from https://www.apple.com/certificateauthority/
    • dropDMG
    • bash environments
      • add following lines to the ~/.bash_profile file:
        export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig\nexport PATH=/opt/local/bin:/usr/local/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin:$PATH\nexport LDFLAGS=\"-L/opt/local/lib -L/usr/local/lib\"\nexport CFLAGS=\"-I/opt/local/include -I/usr/local/include\"\nexport CPPFLAGS=\"-I/opt/local/include -I/usr/local/include\"\nexport LD_LIBRARY_PATH=/opt/lib:/usr/local/lib:/opt/local/lib/:/usr/local/lib/:$LD_LIBRARY_PATH\n\nQT_BASE=$HOME/Qt/6.2.4/macos\nexport PATH=$QT_BASE/bin:$PATH\nexport PKG_CONFIG_PATH=$QT_BASE/lib/pkgconfig:$PKG_CONFIG_PATH\nexport NOTARIZE_APPLE_ID=\"Your notarize account\"\nexport NOTARIZE_PASSWORD=\"Your notarize password\"\nexport NOTARIZE_TEAM_ID=\"Your notarize team id\"\n
    "},{"location":"build_seafile/osx/#building-sync-client","title":"Building Sync Client","text":"

    Following directory structures are expected when building Sync Client:

    seafile-workspace/\nseafile-workspace/libsearpc/\nseafile-workspace/seafile/\nseafile-workspace/seafile-client/\n

    The source code of these projects can be downloaded at github.com/haiwen/libsearpc, github.com/haiwen/seafile, and github.com/haiwen/seafile-client.

    "},{"location":"build_seafile/osx/#building","title":"Building","text":"

    Note: the building commands have been included in the packaging script, you can skip building commands while packaging.

    To build libsearpc:

    $ cd seafile-workspace/libsearpc/\n$ ./autogen.sh\n$ ./configure --disable-compile-demo --enable-compile-universal=yes\n$ make\n$ make install\n

    To build seafile:

    $ cd seafile-workspace/seafile/\n$ ./autogen.sh\n$ ./configure --disable-fuse --enable-compile-universal=yes\n$ make\n$ make install\n

    To build seafile-client:

    $ cd seafile-workspace/seafile-client/\n$ cmake -GXcode -B. -S.\n$ xcodebuild -target seafile-applet -configuration Release\n
    "},{"location":"build_seafile/osx/#packaging","title":"Packaging","text":"
    1. Update the CERT_ID in seafile-workspace/seafile/scripts/build/build-mac-local-py3.py to the ID of Developer ID Application.
    2. Run the packaging script: python3 build-mac-local-py3.py --brand=\"\" --version=1.0.0 --nostrip --universal
    "},{"location":"build_seafile/rpi/","title":"How to Build Seafile Server Release Package","text":"

    From Seafile 11.0, you can build Seafile release package with seafile-build script. You can check the README.md file in the same folder for detailed instructions.

    The seafile-build.sh compatible with more platforms, including Raspberry Pi, arm-64, x86-64.

    Old version is below:

    Table of contents:

    • Setup the build environment
    • Install packages
    • Compile development libraries
    • Install Python libraries
    • Prepare source code
    • Fetch git tags and prepare source tarballs
    • Run the packaging script
    • Test the built package
    • Test a fresh install
    • Test upgrading
    "},{"location":"build_seafile/rpi/#setup-the-build-environment","title":"Setup the build environment","text":"

    Requirements:

    • A raspberry pi with raspian distribution installed.
    "},{"location":"build_seafile/rpi/#install-packages","title":"Install packages","text":"
    sudo apt-get install build-essential\nsudo apt-get install libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev re2c flex python-setuptools cmake\n
    "},{"location":"build_seafile/rpi/#compile-development-libraries","title":"Compile development libraries","text":""},{"location":"build_seafile/rpi/#libevhtp","title":"libevhtp","text":"

    libevhtp is a http server libary on top of libevent. It's used in seafile file server.

    git clone https://www.github.com/haiwen/libevhtp.git\ncd libevhtp\ncmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .\nmake\nsudo make install\n

    After compiling all the libraries, run ldconfig to update the system libraries cache:

    sudo ldconfig\n
    "},{"location":"build_seafile/rpi/#install-python-libraries","title":"Install python libraries","text":"

    Create a new directory /home/pi/dev/seahub_thirdpart:

    mkdir -p ~/dev/seahub_thirdpart\n

    Download these tarballs to /tmp/:

    • pytz
    • Django
    • django-statici18n
    • djangorestframework
    • django_compressor
    • jsonfield
    • django-post_office
    • gunicorn
    • flup
    • chardet
    • python-dateutil
    • six
    • django-picklefield
    • django-constance
    • jdcal
    • et_xmlfile
    • openpyxl
    • futures
    • django-formtools
    • qrcode

    Install all these libaries to /home/pi/dev/seahub_thirdpart:

    cd ~/dev/seahub_thirdpart\nexport PYTHONPATH=.\npip install -t ~/dev/seahub_thirdpart/ /tmp/pytz-2016.1.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/Django-1.8.10.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/django-statici18n-1.1.3.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/djangorestframework-3.3.2.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/django_compressor-1.4.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/jsonfield-1.0.3.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/django-post_office-2.0.6.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/gunicorn-19.4.5.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/flup-1.0.2.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/chardet-2.3.0.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/python-dateutil-1.5.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/six-1.9.0.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/django-picklefield-0.3.2.tar.gz\nwget -O /tmp/django_constance.zip https://github.com/haiwen/django-constance/archive/bde7f7c.zip\npip install -t ~/dev/seahub_thirdpart/ /tmp/django_constance.zip\npip install -t ~/dev/seahub_thirdpart/ /tmp/jdcal-1.2.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/et_xmlfile-1.0.1.tar.gz\npip install -t ~/dev/seahub_thirdpart/ /tmp/openpyxl-2.3.0.tar.gz\n
    "},{"location":"build_seafile/rpi/#prepare-seafile-source-code","title":"Prepare seafile source code","text":"

    To build seafile server, there are four sub projects involved:

    • libsearpc
    • ccnet-server
    • seafile-server
    • seahub

    The build process has two steps:

    • First, fetch the tags of each projects, and make a soruce tarball for each of them.
    • Then run a build-server.py script to build the server package from the source tarballs.
    "},{"location":"build_seafile/rpi/#fetch-git-tags-and-prepare-source-tarballs","title":"Fetch git tags and prepare source tarballs","text":"

    Seafile manages the releases in tags on github.

    Assume we are packaging for seafile server 6.0.1, then the tags are:

    • ccnet-server, seafile-server, and seahub would all have a v6.0.1-sever tag.
    • libsearpc would have the v3.0-latest tag (libsearpc has been quite stable and basically has no further development, so the tag is always v3.0-latest)

    First setup the PKG_CONFIG_PATH enviroment variable (So we don't need to make and make install libsearpc/ccnet/seafile into the system):

    export PKG_CONFIG_PATH=/home/pi/dev/seafile/lib:$PKG_CONFIG_PATH\nexport PKG_CONFIG_PATH=/home/pi/dev/libsearpc:$PKG_CONFIG_PATH\nexport PKG_CONFIG_PATH=/home/pi/dev/ccnet:$PKG_CONFIG_PATH\n
    "},{"location":"build_seafile/rpi/#libsearpc","title":"libsearpc","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/libsearpc.git\ncd libsearpc\ngit reset --hard v3.0-latest\n./autogen.sh\n./configure\nmake dist\n
    "},{"location":"build_seafile/rpi/#ccnet","title":"ccnet","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/ccnet-server.git\ncd ccnet\ngit reset --hard v6.0.1-server\n./autogen.sh\n./configure\nmake dist\n
    "},{"location":"build_seafile/rpi/#seafile","title":"seafile","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/seafile-server.git\ncd seafile\ngit reset --hard v6.0.1-server\n./autogen.sh\n./configure\nmake dist\n
    "},{"location":"build_seafile/rpi/#seahub","title":"seahub","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/seahub.git\ncd seahub\ngit reset --hard v6.0.1-server\n./tools/gen-tarball.py --version=6.0.1 --branch=HEAD\n
    "},{"location":"build_seafile/rpi/#seafobj","title":"seafobj","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/seafobj.git\ncd seafobj\ngit reset --hard v6.0.1-server\nmake dist\n
    "},{"location":"build_seafile/rpi/#seafdav","title":"seafdav","text":"
    cd ~/dev\ngit clone https://github.com/haiwen/seafdav.git\ncd seafdav\ngit reset --hard v6.0.1-server\nmake\n
    "},{"location":"build_seafile/rpi/#copy-the-source-tar-balls-to-the-same-folder","title":"Copy the source tar balls to the same folder","text":"
    mkdir ~/seafile-sources\ncp ~/dev/libsearpc/libsearpc-<version>-tar.gz ~/seafile-sources\ncp ~/dev/ccnet/ccnet-<version>-tar.gz ~/seafile-sources\ncp ~/dev/seafile/seafile-<version>-tar.gz ~/seafile-sources\ncp ~/dev/seahub/seahub-<version>-tar.gz ~/seafile-sources\n\ncp ~/dev/seafobj/seafobj.tar.gz ~/seafile-sources\ncp ~/dev/seafdav/seafdav.tar.gz ~/seafile-sources\n
    "},{"location":"build_seafile/rpi/#run-the-packaging-script","title":"Run the packaging script","text":"

    Now we have all the tarballs prepared, we can run the build-server.py script to build the server package.

    mkdir ~/seafile-server-pkgs\n~/dev/seafile/scripts/build-server.py --libsearpc_version=<libsearpc_version> --ccnet_version=<ccnet_version> --seafile_version=<seafile_version> --seahub_version=<seahub_version> --srcdir=  --thirdpartdir=/home/pi/dev/seahub_thirdpart --srcdir=/home/pi/seafile-sources --outputdir=/home/pi/seafile-server-pkgs\n

    After the script finisheds, we would get a seafile-server_6.0.1_pi.tar.gz in ~/seafile-server-pkgs folder.

    "},{"location":"build_seafile/rpi/#test-the-built-package","title":"Test the built package","text":""},{"location":"build_seafile/rpi/#test-a-fresh-install","title":"Test a fresh install","text":"

    Use the built seafile server package to go over the steps of Deploying Seafile with SQLite.

    The test should cover these steps at least:

    • The setup process is ok
    • After seafile.sh start and seahub.sh start, you can login from a browser.
    • Uploading/Downloading files through a web browser works correctly.
    • Seafile WebDAV server works correctly
    "},{"location":"build_seafile/rpi/#test-upgrading-from-a-previous-version","title":"Test upgrading from a previous version","text":"
    • Download the package of the previous version seafile server, and setup it.
    • Upgrading according to the manual
    • After the upgrade, check the functionality is ok:
    • Uploading/Downloading files through a web browser works correctly.
    • Seafile WebDAV server works correctly
    "},{"location":"build_seafile/server/","title":"Server development","text":"

    This is the document for deploying Seafile open source development environment in Ubuntu 2204 docker container.

    "},{"location":"build_seafile/server/#create-persistent-directories","title":"Create persistent directories","text":"

    Login a linux server as root user, then:

    mkdir -p /root/seafile-ce-docker/source-code\nmkdir -p /root/seafile-ce-docker/conf\nmkdir -p /root/seafile-ce-docker/logs\nmkdir -p /root/seafile-ce-docker/mysql-data\nmkdir -p /root/seafile-ce-docker/seafile-data/library-template\n
    "},{"location":"build_seafile/server/#run-a-container","title":"Run a container","text":"

    After install docker, start a container to deploy seafile open source development environment.

    docker run --mount type=bind,source=/root/seafile-ce-docker/source-code,target=/root/dev/source-code \\\n           --mount type=bind,source=/root/seafile-ce-docker/conf,target=/root/dev/conf \\\n           --mount type=bind,source=/root/seafile-ce-docker/logs,target=/root/dev/logs \\\n           --mount type=bind,source=/root/seafile-ce-docker/seafile-data,target=/root/dev/seafile-data \\\n           --mount type=bind,source=/root/seafile-ce-docker/mysql-data,target=/var/lib/mysql \\\n           -it -p 8000:8000 -p 8082:8082 -p 3000:3000 --name seafile-ce-env ubuntu:22.04 bash\n

    Note, the following commands are all executed in the seafile-ce-env docker container.

    "},{"location":"build_seafile/server/#update-source-and-install-dependencies","title":"Update Source and Install Dependencies.","text":"

    Update base system and install base dependencies:

    apt-get update && apt-get upgrade -y\n\napt-get install -y ssh libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libmysqlclient-dev libarchive-dev libtool libjansson-dev valac libfuse-dev python3-dateutil cmake re2c flex sqlite3 python3-pip python3-simplejson git libssl-dev libldap2-dev libonig-dev vim vim-scripts wget cmake gcc autoconf automake mysql-client librados-dev libxml2-dev curl sudo telnet netcat unzip netbase ca-certificates apt-transport-https build-essential libxslt1-dev libffi-dev libpcre3-dev libz-dev xz-utils nginx pkg-config poppler-utils libmemcached-dev sudo ldap-utils libldap2-dev libjwt-dev\n

    Install Node 16 from nodesource:

    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg\necho \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main\" | sudo tee /etc/apt/sources.list.d/nodesource.list\napt-get install -y nodejs\n

    Install other Python 3 dependencies:

    apt-get install -y python3 python3-dev python3-pip python3-setuptools python3-ldap\n\npython3 -m pip install --upgrade pip\n\npip3 install Django==4.2.* django-statici18n==2.3.* django_webpack_loader==1.7.* django_picklefield==3.1 django_formtools==2.4 django_simple_captcha==0.6.* djangosaml2==1.5.* djangorestframework==3.14.* python-dateutil==2.8.* pyjwt==2.6.* pycryptodome==3.16.* python-cas==1.6.* pysaml2==7.2.* requests==2.28.* requests_oauthlib==1.3.* future==0.18.* gunicorn==20.1.* mysqlclient==2.1.* qrcode==7.3.* pillow==10.2.* chardet==5.1.* cffi==1.15.1 captcha==0.5.* openpyxl==3.0.* Markdown==3.4.* bleach==5.0.* python-ldap==3.4.* sqlalchemy==2.0.18 redis mock pytest pymysql configparser pylibmc django-pylibmc nose exam splinter pytest-django\n
    "},{"location":"build_seafile/server/#install-mariadb-and-create-databases","title":"Install MariaDB and Create Databases","text":"
    apt-get install -y mariadb-server\nservice mariadb start\nmysqladmin -u root password your_password\n

    sql for create databases

    mysql -uroot -pyour_password -e \"CREATE DATABASE ccnet CHARACTER SET utf8;\"\nmysql -uroot -pyour_password -e \"CREATE DATABASE seafile CHARACTER SET utf8;\"\nmysql -uroot -pyour_password -e \"CREATE DATABASE seahub CHARACTER SET utf8;\"\n
    "},{"location":"build_seafile/server/#download-source-code","title":"Download Source Code","text":"
    cd ~/\ncd ~/dev/source-code\n\ngit clone https://github.com/haiwen/libevhtp.git\ngit clone https://github.com/haiwen/libsearpc.git\ngit clone https://github.com/haiwen/seafile-server.git\ngit clone https://github.com/haiwen/seafevents.git\ngit clone https://github.com/haiwen/seafobj.git\ngit clone https://github.com/haiwen/seahub.git\n\ncd libevhtp/\ngit checkout tags/1.1.7 -b tag-1.1.7\n\ncd ../libsearpc/\ngit checkout tags/v3.3-latest -b tag-v3.3-latest\n\ncd ../seafile-server\ngit checkout tags/v11.0.5-server -b tag-v11.0.5-server\n\ncd ../seafevents\ngit checkout tags/v11.0.5-server -b tag-v11.0.5-server\n\ncd ../seafobj\ngit checkout tags/v11.0.5-server -b tag-v11.0.5-server\n\ncd ../seahub\ngit checkout tags/v11.0.5-server -b tag-v11.0.5-server\n
    "},{"location":"build_seafile/server/#compile-and-install-seaf-server","title":"Compile and Install seaf-server","text":"
    cd ../libevhtp\ncmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .\nmake\nmake install\nldconfig\n\ncd ../libsearpc\n./autogen.sh\n./configure\nmake\nmake install\nldconfig\n\ncd ../seafile-server\n./autogen.sh\n./configure --disable-fuse\nmake\nmake install\nldconfig\n
    "},{"location":"build_seafile/server/#create-conf-files","title":"Create Conf Files","text":"
    cd ~/dev/conf\n\ncat > ccnet.conf  <<EOF\n[Database]\nENGINE = mysql\nHOST = localhost\nPORT = 3306\nUSER = root\nPASSWD = 123456\nDB = ccnet\nCONNECTION_CHARSET = utf8\nCREATE_TABLES = true\nEOF\n\ncat > seafile.conf  <<EOF\n[database]\ntype = mysql\nhost = localhost\nport = 3306\nuser = root\npassword = 123456\ndb_name = seafile\nconnection_charset = utf8\ncreate_tables = true\nEOF\n\ncat > seafevents.conf  <<EOF\n[DATABASE]\ntype = mysql\nusername = root\npassword = 123456\nname = seahub\nhost = localhost\nEOF\n\ncat > seahub_settings.py  <<EOF\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.mysql',\n        'NAME': 'seahub',\n        'USER': 'root',\n        'PASSWORD': '123456',\n        'HOST': 'localhost',\n        'PORT': '3306',\n    }\n}\nFILE_SERVER_ROOT = 'http://127.0.0.1:8082'\nSERVICE_URL = 'http://127.0.0.1:8000'\nEOF\n
    "},{"location":"build_seafile/server/#start-seaf-server","title":"Start seaf-server","text":"
    seaf-server -F /root/dev/conf -d /root/dev/seafile-data -l /root/dev/logs/seafile.log >> /root/dev/logs/seafile.log 2>&1 &\n
    "},{"location":"build_seafile/server/#start-seafevents-and-seahub","title":"Start seafevents and seahub","text":""},{"location":"build_seafile/server/#prepare-environment-variables","title":"Prepare environment variables","text":"
    export CCNET_CONF_DIR=/root/dev/conf\nexport SEAFILE_CONF_DIR=/root/dev/seafile-data\nexport SEAFILE_CENTRAL_CONF_DIR=/root/dev/conf\nexport SEAHUB_DIR=/root/dev/source-code/seahub\nexport SEAHUB_LOG_DIR=/root/dev/logs\nexport PYTHONPATH=/usr/local/lib/python3.10/dist-packages/:/usr/local/lib/python3.10/site-packages/:/root/dev/source-code/:/root/dev/source-code/seafobj/:/root/dev/source-code/seahub/thirdpart:$PYTHONPATH\n
    "},{"location":"build_seafile/server/#start-seafevents","title":"Start seafevents","text":"
    cd /root/dev/source-code/seafevents/\npython3 main.py --loglevel=debug --logfile=/root/dev/logs/seafevents.log --config-file /root/dev/conf/seafevents.conf >> /root/dev/logs/seafevents.log 2>&1 &\n
    "},{"location":"build_seafile/server/#start-seahub","title":"Start seahub","text":""},{"location":"build_seafile/server/#create-seahub-database-tables","title":"Create seahub database tables","text":"
    cd /root/dev/source-code/seahub/\npython3 manage.py migrate\n
    "},{"location":"build_seafile/server/#create-user","title":"Create user","text":"
    python3 manage.py createsuperuser\n
    "},{"location":"build_seafile/server/#start-seahub_1","title":"Start seahub","text":"
    python3 manage.py runserver 0.0.0.0:8000\n

    Then, you can visit http://127.0.0.1:8000/ to use Seafile.

    "},{"location":"build_seafile/server/#the-final-directory-structure","title":"The Final Directory Structure","text":""},{"location":"build_seafile/server/#more","title":"More","text":""},{"location":"build_seafile/server/#deploy-frontend-development-environment","title":"Deploy Frontend Development Environment","text":"

    For deploying frontend development enviroment, you need:

    1, checkout seahub to master branch

    cd /root/dev/source-code/seahub\n\ngit fetch origin master:master\ngit checkout master\n

    2, add the following configration to /root/dev/conf/seahub_settings.py

    import os\nPROJECT_ROOT = '/root/dev/source-code/seahub'\nWEBPACK_LOADER = {\n    'DEFAULT': {\n        'BUNDLE_DIR_NAME': 'frontend/',\n        'STATS_FILE': os.path.join(PROJECT_ROOT,\n                                   'frontend/webpack-stats.dev.json'),\n    }\n}\nDEBUG = True\n

    3, install js modules

    cd /root/dev/source-code/seahub/frontend\n\nnpm install\n

    4, npm run dev

    cd /root/dev/source-code/seahub/frontend\n\nnpm run dev\n

    5, start seaf-server and seahub

    "},{"location":"build_seafile/windows/","title":"Windows","text":""},{"location":"build_seafile/windows/#environment-setup","title":"Environment Setup","text":"

    The following setups are required for building and packaging Sync Client on Windows:

    • Visual Studio 2019
      • Desktop development with C++
        • MSVC v142
        • Windows 10 SDK (10.0.19041.0) (installed by default, not used)
        • Windows 10 SDK (10.0.18362.0)
      • Universal Windows Platform development
        • Windows 10 SDK (10.0.18362.0)
    • Qt 6.5
      • MSVC 2019 64-bit
      • Qt 5 Compatibility Module
      • Qt Positioning
      • Qt Serial Port
      • Qt WebChannel
      • Qt WebEngine
    • Qt VS Tools
    • vcpkg

      • curl[openssl]:x64-windows
      • getopt:x64-windows
      • glib:x64-windows
      • jansson:x64-windows
      • libevent:x64-windows
      • libwebsockets:x64-windows
      • openssl:x64-windows
      • pthreads:x64-windows
      • sqlite3:x64-windows
      • zlib:x64-windows
        # Example of the install command:\n$ ./vcpkg.exe install curl[core,openssl]:x64-windows\n
    • Python 3.7

    • wix
      • install to C:\\wix
    • Paraffin
      • copy Paraffin.exe to C:\\wix\\bin
    • Breakpad
    • Certificates

      • install to C:\\certs

      Note: certificates for Windows application are issued by third-party certificate authority.

    "},{"location":"build_seafile/windows/#breakpad","title":"Breakpad","text":"

    Support for Breakpad can be added by running following steps:

    • install gyp tool

      $ git clone --depth=1 git@github.com:chromium/gyp.git\n$ python setup.py install\n
    • compile breakpad

      $ git clone --depth=1 git@github.com:google/breakpad.git\n$ cd breakpad\n$ git clone https://github.com/google/googletest.git testing\n$ cd ..\n# create vs solution, this may throw an error \"module collections.abc has no attribute OrderedDict\", you should open the msvs.py and replace 'collections.abc' with 'collections'.\n$ gyp \u2013-no-circular-check breakpad\\src\\client\\windows\\breakpad_client.gyp\n
      • open breakpad_client.sln and configure C++ Language Standard to C++17 and C/C++ ---> Code Generation ---> Runtime Library to Multi-threaded DLL (/MD)
      • build breakpad
    • compile dump_syms tool

      create vs solution

      gyp \u2013-no-circular-check breakpad\\src\\tools\\windows\\tools_windows.gyp\n
      • open tools_windows.sln and build tools_windows
      • Insert #include in the source file about unique_ptr compilation error and recompile.
      • build dump_syms
      • Copy C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\Remote Debugger\\x64\\msdia140.dll to breakpad\\src\\tools\\windows\\Release.
    • copy VC merge modules

      copy C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Redist\\MSVC\\v142\\MergeModules\\MergeModules\\Microsoft_VC142_CRT_x64.msm C:\\packagelib\n
    "},{"location":"build_seafile/windows/#building-sync-client","title":"Building Sync Client","text":"

    Following directory structures are expected when building Sync Client:

    seafile-workspace/\nseafile-workspace/libsearpc/\nseafile-workspace/seafile/\nseafile-workspace/seafile-client/\nseafile-workspace/seafile-shell-ext/\n

    The source code of these projects can be downloaded at github.com/haiwen/libsearpc, github.com/haiwen/seafile, github.com/haiwen/seafile-client, and github.com/haiwen/seafile-shell-ext.

    "},{"location":"build_seafile/windows/#building","title":"Building","text":"

    Note: the building commands have been included in the packaging script, you can skip building commands while packaging.

    To build libsearpc:

    $ cd seafile-workspace/libsearpc/\n$ devenv libsearpc.sln /build \"Release|x64\"\n

    To build seafile

    $ cd seafile-workspace/seafile/\n$ devenv seafile.sln /build \"Release|x64\"\n$ devenv msi/custom/seafile_custom.sln /build \"Release|x64\"\n

    To build seafile-client

    $ cd seafile-workspace/seafile-client/\n$ devenv third_party/quazip/quazip.sln /build \"Release|x64\"\n$ devenv seafile-client.sln /build \"Release|x64\"\n

    To build seafile-shell-ext

    $ cd seafile-workspace/seafile-shell-ext/\n$ devenv extensions/seafile_ext.sln /build \"Release|x64\"\n$ devenv seadrive-thumbnail-ext/seadrive_thumbnail_ext.sln /build \"Release|x64\"\n
    "},{"location":"build_seafile/windows/#packaging","title":"Packaging","text":"
    1. Update the CERTFILE configure in seafile-workspace/seafile/scripts/build/build-msi-vs.py .
    2. Run commands:
      $ cd seafile-workspace/seafile-client/third_party/quazip\n$ devenv quazip.sln /build Release|x64\n$ cd seafile-workspace/seafile/scripts/build\n$ python build-msi-vs.py 1.0.0\n
    "},{"location":"changelog/changelog-for-seafile-professional-server-old/","title":"Seafile Professional Server Changelog (old)","text":""},{"location":"changelog/changelog-for-seafile-professional-server-old/#44","title":"4.4","text":"

    Note: Two new options are added in version 4.4, both are in seahub_settings.py

    • SHOW_TRAFFIC: default is True, set to False if you what to hide public link traffic in profile
    • SHARE_LINK_PASSWORD_MIN_LENGTH: default is 8

    This version contains no database table change.

    "},{"location":"changelog/changelog-for-seafile-professional-server-old/#449-20160229","title":"4.4.9 (2016.02.29)","text":"
    • [fix] Show \u201cout of quota\u201d instead of \u201cDERP\u201d in the case of out of quota when uploading files via web interface
    "},{"location":"changelog/changelog-for-seafile-professional-server-old/#448-20151217","title":"4.4.8 (2015.12.17)","text":"
    • [security] Fix password check for visiting a file in folder sharing link
    "},{"location":"changelog/changelog-for-seafile-professional-server-old/#447-20151120","title":"4.4.7 (2015.11.20)","text":"
    • [fix] Fix viewing PDF files via Office Web App
    • [fix, virus scan] Do not scanning deleted libraries in virus scan
    • [fix, virus scan] Fix showing the virus scan page when libraries containing scanned items are deleted
    • [virus scan] Add more debug information for virus scan
    • [fix] Clean cache when set users' name from web API
    • [fix] Fix a performance problem for generating picture thumbnails from folder sharing link
    "},{"location":"changelog/changelog-for-seafile-professional-server-old/#446-20151109","title":"4.4.6 (2015.11.09)","text":"
    +

    If you sync users from LDAP to Seafile, when the user login via SSO (ADFS or OAuth), you want Seafile to find the existing account for this user instead of creating a new one, you can set SSO_LDAP_USE_SAME_UID = True:

    +
    SSO_LDAP_USE_SAME_UID = True
    +
    + +

    Note, here the UID means the unique user ID, in LDAP it is the attribute you use for LDAP_LOGIN_ATTR (not LDAP_UID_ATTR), in ADFS it is uid attribute. You need make sure you use the same attribute for the two settings.

    Migrate LDAP records

    Run the following script to migrate users in LDAPImported to EmailUsers

    cd <install-path>/seafile-server-latest