Docker Seafile - LDAP User

Hello, I try to replace my old seafile native server with a new seafile docker installation.
What config do I need to edit, to enable an LDAP Integration?

I read from different guides ccnet.conf or - I can’t find neither.

ChatGPT said, I need to edit this file inside the docker container, but from my understanding the container gets deleted when I pull a new version? So any configuration in the container is temporary, right?

The documentation in our manual for LDAP integration is the same for Docker based installation or binary installation.

What ChatGPT said is not right.

1 Like

Hello, I found the file.

I try to test the configuration, like they describe it.

cd seafile-server-latest
./pro/ ldapsync --test

But I don’t have this folder.

sudo find / -type f -name ""

I tried it with the inside the var directory, but get multiple errors. Is it even possible to test if the LDAP configuration works with docker?

With Docker deployment, you can use this command:

docker exec -it seafile /opt/seafile/seafile-server-latest/pro/ ldapsync

We have updated the document accordingly.

1 Like

Hi, thanks again - I have configured the file /opt/seafile-data/seafile/conf/ccnet.conf, and now I can see the users in my Docker seafile.

But I am not able to log in with these new synchronized users, do you have any idea why this could be, or is there possibly a log file where I can find any information why the user can’t log in?



ENGINE = mysql
HOST = db
PORT = 3306
USER = seafile
DB = ccnet_db

HOST = ldap://IP-Address/
BASE = ou=ou01,dc=domain,dc=de;ou=ou02,dc=domain,dc=de
FILTER = memberOf=CN=Seafile,OU=GROUP,OU=ou01,DC=domain,DC=de



Hello, I am stuck on the problem that Seafile syncs the users via LDAP, but you can not log in with these LDAP users in Seafile.

I have made the configuration in /opt/seafile-data/seafile/conf/ccnet.conf.

I have now read through the documentation again and realized that the configuration was made in the documentation in

I have now tried to configure the same configuration as described in the documentation in and to leave ccnet.conf alone.

Unfortunately the LDAP sync does not work at all, it does not seem to register this at all. Do you have any other ideas?

root@server:/opt/seafile# docker exec -it seafile /opt/seafile/seafile-server-latest/pro/ ldapsync
[04/23/2024 16:33:06] [INFO] [seafevents] database: mysql, name: seahub_db
[04/23/2024 16:33:06] [INFO] LDAP section is not set, disable ldap sync.

Here is the configuration in

# -*- coding: utf-8 -*-
SECRET_KEY = "b''"
SERVICE_URL = "http://URL"

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '',
        'USER': '',
        'PASSWORD': '',
        'HOST': 'db',
        'PORT': '3306',
        'OPTIONS': {'charset': 'utf8mb4'},

    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': 'memcached:11211',
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
TIME_ZONE = 'Europe/Berlin'

# LDAP Configuration
LDAP_SERVER_URL = 'ldap://IP of LDAP Server'       # The URL of LDAP server
LDAP_BASE_DN = 'ou=XXX,dc=XXXXXX,dc=XX;ou=XXXXXXXX,dc=XXXXXX,dc=XX'   # The root node of users who can 
                                             # log in to Seafile in the LDAP server
LDAP_ADMIN_DN = 'USER@DOMAIN.COM'  # DN of the administrator used 
                                             # to query the LDAP server for information.
                                             # For OpenLDAP, it maybe cn=admin,dc=example,dc=com
LDAP_PROVIDER = 'ldap'                       # Identify the source of the user, used in 
                                             # the table social_auth_usersocialauth, defaults to 'ldap'
LDAP_LOGIN_ATTR = 'mail'        # User's attribute used to log in to Seafile.
                                             # It should be a unique identifier for the user in LDAP server.
                                             # Learn more about this id from the descriptions at begining of this section.
LDAP_CONTACT_EMAIL_ATTR = ''                 # LDAP user's contact_email attribute
LDAP_USER_ROLE_ATTR = ''                     # LDAP user's role attribute
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
LDAP_FILTER = 'memberOf=CN=XXXXXXXXX,OU=XXXXXXX,OU=XXX,DC=XXXXX,DC=XX'  # Additional filter conditions,
                                                                 # users who meet the filter conditions can log in, otherwise they cannot log in
# Basic configuration items
# ldap user sync options.
LDAP_SYNC_INTERVAL = 30                  # LDAP sync task period, in minutes
ENABLE_LDAP_USER_SYNC = True             # Whether to enable user sync
LDAP_USER_OBJECT_CLASS = 'person'        # This is the name of the class used to search for user objects. 
                                         # In Active Directory, it's usually "person". The default value is "person".
LDAP_DEPT_ATTR = ''                      # LDAP user's department info
LDAP_UID_ATTR = ''                       # LDAP user's login_id attribute
                                         # In Active Directory, it's usually "sAMAccountName".
LDAP_AUTO_REACTIVATE_USERS = True        # Whether to auto activate deactivated user
LDAP_USE_PAGED_RESULT = False            # Whether to use pagination extension
                                         # It is useful when you have more than 1000 users in LDAP server.

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 = True        # 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.

What Seafile version do you use? LDAP sync is pro edition only feature, you need to use Seafile pro edition 11.0.x version (which is now still a beta version).

1 Like


right now I’m using seafile-pro-server SEAFILE_VERSION=10.0.13.
I will pull the Seafile Docker Version 11 and try again.

I have taken a look at the version.
In Seafile I have the version “latest”.

On github I couldn’t find a version 11 that I can manually add to the .yml file?

The link you posted is not official Seafile docker image.

For latest version of 11.0, you can use seafile-pro-mc:11.0-latest for pro edition.

1 Like

You are a godsend! Thank you, it works!!