请教一下社区版从12升级13清理冗余配置项的疑惑。

说明文档如下:

4.2 清理配置文件中的冗余配置项:

打开 /opt/seafile-data/seafile/conf/seafile.conf 并删除 [memcached][database][commit_object_backend][fs_object_backend][block_backend]

如果上述部分在 .env 中已配置。

打开 /opt/seafile-data/seafile/conf/seahub_settings.py 并删除 DATABASES = {...}CAHCES = {...}

在大多数情况下, seafile.conf 仅包含 Seafile 文件服务器的侦听端口 8082

要从seafile.conf和settings.py中删除一些内容担心升级失败无法使用,强请教以下几个文件修改结果是不是这样:

seafile.conf

[fileserver]
port = 8082

seahub_settings.py

SECRET_KEY = “*************”
SERVICE_URL = “http://www.ext.com:60000

COMPRESS_CACHE_BACKEND = ‘locmem’

TIME_ZONE = ‘Asia/Shanghai’
FILE_SERVER_ROOT = ‘http://www.ext.com:60000/seafhttp’

.env

COMPOSE_FILE=‘seafile-server.yml,seadoc.yml’
COMPOSE_PATH_SEPARATOR=‘,’

SEAFILE_IMAGE=seafileltd/seafile-mc:13.0-latest
SEAFILE_DB_IMAGE=mariadb:10.11
SEAFILE_MEMCACHED_IMAGE=memcached:1.6.29

SEAFILE_VOLUME=/opt/seafile-data
SEAFILE_MYSQL_VOLUME=/opt/seafile-mysql/db

SEAFILE_MYSQL_DB_HOST=db
INIT_SEAFILE_MYSQL_ROOT_PASSWORD=*****
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD=*****

TIME_ZONE=Asia/Shanghai

JWT_PRIVATE_KEY=*************

SEAFILE_SERVER_HOSTNAME=www.ext.com:60000
SEAFILE_SERVER_PROTOCOL=http

INIT_SEAFILE_ADMIN_EMAIL=admin@ext.com
INIT_SEAFILE_ADMIN_PASSWORD=*****

SEADOC_IMAGE=seafileltd/sdoc-server:2.0-latest
SEADOC_VOLUME=/opt/seadoc-data

ENABLE_SEADOC=true

NOTIFICATION_SERVER_IMAGE=seafileltd/notification-server:13.0-latest
NOTIFICATION_SERVER_VOLUME=/opt/notification-data

Cache

CACHE_PROVIDER=redis

Redis

REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=*****

SEAF_SERVER_STORAGE_TYPE=

这一行也可以删除,现在13.0数据库和缓存配置都从.env文件中读取,所以配置文件中的相关配置是可以删除的

感谢您的热心回复。

这个内部缓存保留,是不是更优解呢,

尝试了一下升级,容器可以正常部署启动。但是页面打不开。

Sorry, but the requested page is unavailable due to a server hiccup.

Our engineers have been notified, so check back later.

然后查看seahub.log发现连接被拒绝。

redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.

尝试在seafile.yml中,将redis端口映射,然后.env中的host写IP地址(127.0.0.1 192.168.0.200虚拟机IP)无法解决问题,虽然局域网其他电脑 telnet 192.168.0.200 6379可以通。

然后查看日志。

发现seafile-mointor.log

[2025-08-29 19:34:19] Start seafevents.main
/opt/seafile/seafile-server-13.0.8/seahub/seahub/settings.py:1134: SyntaxWarning: invalid escape sequence ‘\w’
match = re.search(‘^EXTRA_(\w+)’, attr)

seahub.log报错日志:

Traceback (most recent call last):
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 277, in connect
sock = self.retry.call_with_retry(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/retry.py”, line 62, in call_with_retry
return do()
^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 278, in
lambda: self._connect(), lambda error: self.disconnect(error)
^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 639, in _connect
raise err
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 627, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/django/core/handlers/exception.py”, line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/django/utils/deprecation.py”, line 133, in call
response = self.process_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/seahub/base/middleware.py”, line 105, in process_request
cur_note = cache.get(‘CUR_TOPINFO’) if cache.get(‘CUR_TOPINFO’) else
^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/django/core/cache/backends/redis.py”, line 187, in get
return self._cache.get(key, default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/django/core/cache/backends/redis.py”, line 99, in get
value = client.get(key)
^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/commands/core.py”, line 1821, in get
return self.execute_command(“GET”, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/client.py”, line 545, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 1074, in get_connection
connection.connect()
File “/opt/seafile/seafile-server-13.0.8/seahub/thirdpart/redis/connection.py”, line 283, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.