From c74451d6bfbd17fb0f86157dfac443512760d75a Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Tue, 8 Jul 2025 14:35:52 +0800 Subject: [PATCH 1/2] add MD_FILE_COUNT_LIMIT --- manual/config/env.md | 4 ++++ manual/extension/metadata-server.md | 4 ++++ manual/repo/docker/ce/env | 3 +++ manual/repo/docker/ce/seafile-server.yml | 1 + manual/repo/docker/cluster/env | 3 +++ manual/repo/docker/cluster/seafile-server.yml | 1 + manual/repo/docker/md-server.yml | 2 ++ manual/repo/docker/metadata-server/env | 6 +++++- manual/repo/docker/metadata-server/md-server.yml | 2 ++ manual/repo/docker/pro/env | 3 +++ manual/repo/docker/pro/seafile-server.yml | 1 + manual/repo/k8s/ce/seafile-deployment.yaml | 5 +++++ manual/repo/k8s/ce/seafile-env.yaml | 3 +++ manual/repo/k8s/cluster/seafile-env.yaml | 3 +++ manual/repo/k8s/cluster/seafile-frontend-deployment.yaml | 5 +++++ manual/repo/k8s/pro/seafile-deployment.yaml | 5 +++++ manual/repo/k8s/pro/seafile-env.yaml | 3 +++ manual/setup/setup_ce_by_docker.md | 3 ++- manual/setup/setup_pro_by_docker.md | 1 + 19 files changed, 56 insertions(+), 2 deletions(-) diff --git a/manual/config/env.md b/manual/config/env.md index 8360c31d..30e4100e 100644 --- a/manual/config/env.md +++ b/manual/config/env.md @@ -116,6 +116,10 @@ For configurations about Metadata server in `.env`, please refer [here](../exten - `NOTIFICATION_SERVER_URL`: Used to do the connection between client (i.e., user's browser) and notification server. Default is `https://seafile.example.com/notification`. - `INNER_NOTIFICATION_SERVER_URL`: Used to do the connection between Seafile server and notification server. Default is `http://notification-server:8083`. +## Metadata server + +- `MD_FILE_COUNT_LIMIT`: The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. Default is `100000`. + ## Cluster init configuration - `CLUSTER_INIT_MODE`: (only valid in pro edition at deploying first time). Cluster initialization mode, in which the necessary configuration files for the service to run will be generated (but **the service will not be started**). If the configuration file already exists, no operation will be performed. The default value is `true`. When the configuration file is generated, ***be sure to set this item to `false`***. diff --git a/manual/extension/metadata-server.md b/manual/extension/metadata-server.md index 1b7f8415..aa9901cc 100644 --- a/manual/extension/metadata-server.md +++ b/manual/extension/metadata-server.md @@ -85,6 +85,8 @@ The following table is all the related environment variables with Metadata serve | `REDIS_PASSWORD` | Your *Redis* access password. | Optional | | `MD_STORAGE_TYPE` | Where the metadata storage in. Available options are `disk` (local storage) and `s3` | `disk` | | `S3_MD_BUCKET` | Your S3 bucket name for the bucket storing metadata | Required when using S3 (`MD_STORAGE_TYPE=s3`) | +| `MD_CHECK_UPDATE_INTERVAL` | The interval for updating metadata of the repository | `30m` | +| `MD_FILE_COUNT_LIMIT` | The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` | In addition, there are some environment variables **related to S3 authorization**, please refer to the part with `S3_` prefix in this [table](../setup/setup_pro_by_docker.md#downloading-and-modifying-env) (**the buckets name for Seafile are also needed**). @@ -106,6 +108,8 @@ To enable metadata server in Seafile, please add the following field in your `se METADATA_SERVER_URL = 'http://:8084' ``` + !!! note "Standalone deploy + ## Start service You can use following command to start metadata server (and the Seafile service also have to restart): diff --git a/manual/repo/docker/ce/env b/manual/repo/docker/ce/env index e6e3fb70..4df0a266 100644 --- a/manual/repo/docker/ce/env +++ b/manual/repo/docker/ce/env @@ -79,3 +79,6 @@ NOTIFICATION_SERVER_URL= ENABLE_SEAFILE_AI=false SEAFILE_AI_LLM_URL= SEAFILE_AI_LLM_KEY= + +## Metadata server +MD_FILE_COUNT_LIMIT=100000 diff --git a/manual/repo/docker/ce/seafile-server.yml b/manual/repo/docker/ce/seafile-server.yml index 1d0edd74..ded3dc02 100644 --- a/manual/repo/docker/ce/seafile-server.yml +++ b/manual/repo/docker/ce/seafile-server.yml @@ -78,6 +78,7 @@ services: - ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false} - SEAFILE_AI_SERVER_URL=${SEAFILE_AI_SERVER_URL:-http://seafile-ai:8888} - SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000} labels: caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} caddy.reverse_proxy: "{{upstreams 80}}" diff --git a/manual/repo/docker/cluster/env b/manual/repo/docker/cluster/env index 8966a097..f35ff358 100644 --- a/manual/repo/docker/cluster/env +++ b/manual/repo/docker/cluster/env @@ -56,6 +56,9 @@ INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL ENABLE_SEAFILE_AI=false SEAFILE_AI_SERVER_URL= +## Metadata server +MD_FILE_COUNT_LIMIT=100000 + ###################################### # Initial variables # # (Only valid in first-time startup) # diff --git a/manual/repo/docker/cluster/seafile-server.yml b/manual/repo/docker/cluster/seafile-server.yml index c4843c86..c38345fb 100644 --- a/manual/repo/docker/cluster/seafile-server.yml +++ b/manual/repo/docker/cluster/seafile-server.yml @@ -55,3 +55,4 @@ services: - ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false} - SEAFILE_AI_SERVER_URL=$SEAFILE_AI_SERVER_URL - SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000} diff --git a/manual/repo/docker/md-server.yml b/manual/repo/docker/md-server.yml index 83c6ff33..d1f87df7 100644 --- a/manual/repo/docker/md-server.yml +++ b/manual/repo/docker/md-server.yml @@ -18,6 +18,8 @@ services: - MD_PORT=${MD_PORT:-8084} - MD_LOG_LEVEL=${MD_LOG_LEVEL:-info} - MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB} + - MD_CHECK_UPDATE_INTERVAL=${MD_CHECK_UPDATE_INTERVAL:-30m} + - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000} - SEAF_SERVER_STORAGE_TYPE=${SEAF_SERVER_STORAGE_TYPE:-} - MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-disk} - S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-} diff --git a/manual/repo/docker/metadata-server/env b/manual/repo/docker/metadata-server/env index a230449a..0d465c84 100644 --- a/manual/repo/docker/metadata-server/env +++ b/manual/repo/docker/metadata-server/env @@ -33,4 +33,8 @@ S3_SSE_C_KEY= # for Redis REDIS_HOST= REDIS_PORT=6379 -REDIS_PASSWORD= \ No newline at end of file +REDIS_PASSWORD= + +# for md-server configuration +MD_CHECK_UPDATE_INTERVAL=30m +MD_FILE_COUNT_LIMIT=100000 \ No newline at end of file diff --git a/manual/repo/docker/metadata-server/md-server.yml b/manual/repo/docker/metadata-server/md-server.yml index 49d152db..d2726e0e 100644 --- a/manual/repo/docker/metadata-server/md-server.yml +++ b/manual/repo/docker/metadata-server/md-server.yml @@ -18,6 +18,8 @@ services: - MD_PORT=${MD_PORT:-8084} - MD_LOG_LEVEL=${MD_LOG_LEVEL:-info} - MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB} + - MD_CHECK_UPDATE_INTERVAL=${MD_CHECK_UPDATE_INTERVAL:-30m} + - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000} - SEAF_SERVER_STORAGE_TYPE=${SEAF_SERVER_STORAGE_TYPE:-} - MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-disk} - S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-} diff --git a/manual/repo/docker/pro/env b/manual/repo/docker/pro/env index 25576b58..efc2edf4 100644 --- a/manual/repo/docker/pro/env +++ b/manual/repo/docker/pro/env @@ -121,3 +121,6 @@ NOTIFICATION_SERVER_URL= ENABLE_SEAFILE_AI=false SEAFILE_AI_LLM_URL= SEAFILE_AI_LLM_KEY= + +## Metadata server +MD_FILE_COUNT_LIMIT=100000 diff --git a/manual/repo/docker/pro/seafile-server.yml b/manual/repo/docker/pro/seafile-server.yml index 484f1093..6e5e95ff 100644 --- a/manual/repo/docker/pro/seafile-server.yml +++ b/manual/repo/docker/pro/seafile-server.yml @@ -90,6 +90,7 @@ services: - ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false} - SEAFILE_AI_SERVER_URL=${SEAFILE_AI_SERVER_URL:-http://seafile-ai:8888} - SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000} labels: caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} caddy.reverse_proxy: "{{upstreams 80}}" diff --git a/manual/repo/k8s/ce/seafile-deployment.yaml b/manual/repo/k8s/ce/seafile-deployment.yaml index fa49e82c..45968553 100644 --- a/manual/repo/k8s/ce/seafile-deployment.yaml +++ b/manual/repo/k8s/ce/seafile-deployment.yaml @@ -136,6 +136,11 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_AI_SERVER_URL + - name: MD_FILE_COUNT_LIMIT + valueFrom: + configMapKeyRef: + name: seafile-env + key: MD_FILE_COUNT_LIMIT - name: JWT_PRIVATE_KEY valueFrom: secretKeyRef: diff --git a/manual/repo/k8s/ce/seafile-env.yaml b/manual/repo/k8s/ce/seafile-env.yaml index 3a7fc5d3..b8cfb428 100644 --- a/manual/repo/k8s/ce/seafile-env.yaml +++ b/manual/repo/k8s/ce/seafile-env.yaml @@ -42,6 +42,9 @@ data: ENABLE_SEAFILE_AI: "false" SEAFILE_AI_SERVER_URL: "" + # Matedata server + MD_FILE_COUNT_LIMIT: "100000" + # Init ## for Seafile admin INIT_SEAFILE_ADMIN_EMAIL: "" \ No newline at end of file diff --git a/manual/repo/k8s/cluster/seafile-env.yaml b/manual/repo/k8s/cluster/seafile-env.yaml index 2355dff9..237d1631 100644 --- a/manual/repo/k8s/cluster/seafile-env.yaml +++ b/manual/repo/k8s/cluster/seafile-env.yaml @@ -62,3 +62,6 @@ data: # Seafile AI ENABLE_SEAFILE_AI: "false" SEAFILE_AI_SERVER_URL: "" + + # Matedata server + MD_FILE_COUNT_LIMIT: "100000" diff --git a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml index 0c79b7da..33bf6e03 100644 --- a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml @@ -192,6 +192,11 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_AI_SERVER_URL + - name: MD_FILE_COUNT_LIMIT + valueFrom: + configMapKeyRef: + name: seafile-env + key: MD_FILE_COUNT_LIMIT - name: JWT_PRIVATE_KEY valueFrom: secretKeyRef: diff --git a/manual/repo/k8s/pro/seafile-deployment.yaml b/manual/repo/k8s/pro/seafile-deployment.yaml index ac2877a3..41df6e06 100644 --- a/manual/repo/k8s/pro/seafile-deployment.yaml +++ b/manual/repo/k8s/pro/seafile-deployment.yaml @@ -186,6 +186,11 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_AI_SERVER_URL + - name: MD_FILE_COUNT_LIMIT + valueFrom: + configMapKeyRef: + name: seafile-env + key: MD_FILE_COUNT_LIMIT - name: JWT_PRIVATE_KEY valueFrom: secretKeyRef: diff --git a/manual/repo/k8s/pro/seafile-env.yaml b/manual/repo/k8s/pro/seafile-env.yaml index c19cb448..a5dbee14 100644 --- a/manual/repo/k8s/pro/seafile-env.yaml +++ b/manual/repo/k8s/pro/seafile-env.yaml @@ -54,6 +54,9 @@ data: ENABLE_SEAFILE_AI: "false" SEAFILE_AI_SERVER_URL: "" + # Matedata server + MD_FILE_COUNT_LIMIT: "100000" + # Init ## for Seafile admin INIT_SEAFILE_ADMIN_EMAIL: "" diff --git a/manual/setup/setup_ce_by_docker.md b/manual/setup/setup_ce_by_docker.md index 09e19680..1fdda873 100644 --- a/manual/setup/setup_ce_by_docker.md +++ b/manual/setup/setup_ce_by_docker.md @@ -58,7 +58,8 @@ The following fields merit particular attention: | `MEMCACHED_PORT` | Memcached server port | `11211` | | `TIME_ZONE` | Time zone | `UTC` | | `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` | -| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) | +| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) | +| `MD_FILE_COUNT_LIMIT` | (only valid when deployed [metadata server](../extension/metadata-server.md)). The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` | | `INIT_SEAFILE_ADMIN_EMAIL` | Admin username | `me@example.com` (Recommend modifications) | | `INIT_SEAFILE_ADMIN_PASSWORD` | Admin password | `asecret` (Recommend modifications) | | `NON_ROOT` | Run Seafile container without a root user | `false` | diff --git a/manual/setup/setup_pro_by_docker.md b/manual/setup/setup_pro_by_docker.md index 80a0ebf0..bdae8754 100644 --- a/manual/setup/setup_pro_by_docker.md +++ b/manual/setup/setup_pro_by_docker.md @@ -89,6 +89,7 @@ The following fields merit particular attention: | `S3_SSE_C_KEY` | A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. | (none) | | `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` | | `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) | +| `MD_FILE_COUNT_LIMIT` | (only valid when deployed [metadata server](../extension/metadata-server.md)). The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` | | `NON_ROOT` | Run Seafile container without a root user | `false` | !!! success "Easier to configure S3 for Seafile and its components" From 5c7db05b30afe4ef1b9596dbadca39ccf232f33b Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Tue, 8 Jul 2025 14:38:10 +0800 Subject: [PATCH 2/2] remove redundant sentences --- manual/extension/metadata-server.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/manual/extension/metadata-server.md b/manual/extension/metadata-server.md index aa9901cc..186a6acc 100644 --- a/manual/extension/metadata-server.md +++ b/manual/extension/metadata-server.md @@ -108,8 +108,6 @@ To enable metadata server in Seafile, please add the following field in your `se METADATA_SERVER_URL = 'http://:8084' ``` - !!! note "Standalone deploy - ## Start service You can use following command to start metadata server (and the Seafile service also have to restart):