This is an automated email from the ASF dual-hosted git repository.

jimin pushed a commit to branch docusaurus
in repository https://gitbox.apache.org/repos/asf/incubator-seata-website.git


The following commit(s) were added to refs/heads/docusaurus by this push:
     new aacd08bd54f doc: add Docker usage instructions for namingserver (#1033)
aacd08bd54f is described below

commit aacd08bd54fb275f2d58d805a1d73a015022d4ce
Author: Shuxin Pan <[email protected]>
AuthorDate: Sun Oct 19 10:41:24 2025 +0800

    doc: add Docker usage instructions for namingserver (#1033)
---
 .../version-v2.5/user/registry/namingserver.md     | 102 ++++++++++++++++++++
 .../version-v2.5/user/registry/namingserver.md     | 105 ++++++++++++++++++++-
 2 files changed, 206 insertions(+), 1 deletion(-)

diff --git 
a/i18n/en/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
 
b/i18n/en/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
index a65f85dbd3e..ae72c0c36c8 100644
--- 
a/i18n/en/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
+++ 
b/i18n/en/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
@@ -30,6 +30,108 @@ For Windows, run:
 bin\seata-namingserver.bat
 ```
 
+### Running Namingserver with Docker
+
+#### Pull the Image
+```shell
+docker pull apache/seata-naming-server:latest
+```
+
+#### Quick Start
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  apache/seata-naming-server:latest
+```
+
+**Important**: If you don't configure the console password, the system will 
automatically generate a random password at startup and display it in the logs. 
Use the following command to view it:
+```shell
+docker logs seata-naming-server | grep "auto-generated password"
+```
+
+#### Start with Environment Variables
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  -p 10055:10055 \
+  -e SERVER_PORT=8081 \
+  -e SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ= \
+  -e SEATA_SECURITY_TOKEN_VALIDITY=1800000 \
+  -v ./logs:/logs/seata \
+  apache/seata-naming-server:latest
+```
+
+#### Start with Custom Configuration File
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  -v /path/to/application.yml:/seata-namingserver/conf/application.yml \
+  -v ./logs:/logs/seata \
+  apache/seata-naming-server:latest
+```
+
+#### Start with Docker Compose
+
+Create a `docker-compose.yml` file:
+```yaml
+version: "3"
+
+services:
+  seata-naming-server:
+    image: apache/seata-naming-server:latest
+    container_name: seata-naming-server
+    hostname: seata-naming-server
+    ports:
+      - "8081:8081"
+      - "10055:10055"
+    environment:
+      - SERVER_PORT=8081
+      - SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ=
+      - SEATA_SECURITY_TOKEN_VALIDITY=1800000
+    volumes:
+      - ./logs:/logs/seata
+      # Optional: mount custom configuration file
+      # - ./conf/application.yml:/seata-namingserver/conf/application.yml
+    restart: unless-stopped
+```
+
+Start the service:
+```shell
+docker-compose up -d
+```
+
+View logs:
+```shell
+docker-compose logs -f seata-naming-server
+```
+
+Stop the service:
+```shell
+docker-compose down
+```
+
+#### Docker Environment Variables
+
+| Environment Variable | Description | Default Value |
+|---------------------|-------------|---------------|
+| SERVER_PORT | Namingserver HTTP port | 8081 |
+| SEATA_SECURITY_SECRETKEY | JWT Token signing key (Base64 encoded) | Built-in 
key |
+| SEATA_SECURITY_TOKEN_VALIDITY | Token validity period (milliseconds) | 
1800000 (30 minutes) |
+| LOG_HOME | Log storage path | `${user.home}/logs/seata` |
+
+**Note**: Console username and password configuration are not supported 
through environment variables and must be configured in the `application.yml` 
file.
+
+#### Generate Security Key
+
+The JWT key must be a Base64-encoded string. You can generate one using the 
following commands:
+```shell
+# Generate a random key
+openssl rand -base64 32
+
+# Or convert a custom string to Base64
+echo -n "MyCustomSecretKeyForSeataJWT2024" | base64
+```
+
 ## Quick Start
 
 Setting up Seata with namingserver as the registry is straightforward, 
involving configurations on both client and server sides.
diff --git 
a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
 
b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
index 5b4b4845a1d..32d62c7aa10 100644
--- 
a/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
+++ 
b/i18n/zh-cn/docusaurus-plugin-content-docs/version-v2.5/user/registry/namingserver.md
@@ -10,7 +10,7 @@ Namingserver 是 Seata 原生的注册中心.
 
 ## 预备工作
 
-从[链接](https://seata.apache.org/download/seata-server/)下载namingserver的发行包)下载seata的二进制压缩包
+从[链接](https://seata.apache.org/download/seata-server/)下载seata的二进制压缩包
 
 ### 编译器运行namingserver
 
@@ -27,6 +27,109 @@ windows环境运行
 ```shell
 bin\seata-namingserver.bat
 ```
+
+### Docker 运行 namingserver
+
+#### 拉取镜像
+```shell
+docker pull apache/seata-naming-server:latest
+```
+
+#### 快速启动
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  apache/seata-naming-server:latest
+```
+
+**重要提示**:如果不配置控制台密码,系统会在启动时自动生成一个随机密码并在日志中显示。使用以下命令查看:
+```shell
+docker logs seata-naming-server | grep "auto-generated password"
+```
+
+#### 使用环境变量启动
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  -p 10055:10055 \
+  -e SERVER_PORT=8081 \
+  -e SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ= \
+  -e SEATA_SECURITY_TOKEN_VALIDITY=1800000 \
+  -v ./logs:/logs/seata \
+  apache/seata-naming-server:latest
+```
+
+#### 使用自定义配置文件启动
+```shell
+docker run -d --name seata-naming-server \
+  -p 8081:8081 \
+  -v /path/to/application.yml:/seata-namingserver/conf/application.yml \
+  -v ./logs:/logs/seata \
+  apache/seata-naming-server:latest
+```
+
+#### 使用 Docker Compose 启动
+
+创建 `docker-compose.yml` 文件:
+```yaml
+version: "3"
+
+services:
+  seata-naming-server:
+    image: apache/seata-naming-server:latest
+    container_name: seata-naming-server
+    hostname: seata-naming-server
+    ports:
+      - "8081:8081"
+      - "10055:10055"
+    environment:
+      - SERVER_PORT=8081
+      - SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ=
+      - SEATA_SECURITY_TOKEN_VALIDITY=1800000
+    volumes:
+      - ./logs:/logs/seata
+      # 可选:挂载自定义配置文件
+      # - ./conf/application.yml:/seata-namingserver/conf/application.yml
+    restart: unless-stopped
+```
+
+启动服务:
+```shell
+docker-compose up -d
+```
+
+查看日志:
+```shell
+docker-compose logs -f seata-naming-server
+```
+
+停止服务:
+```shell
+docker-compose down
+```
+
+#### Docker 环境变量说明
+
+| 环境变量 | 说明 | 默认值 |
+|---------|------|--------|
+| SERVER_PORT | Namingserver HTTP 端口 | 8081 |
+| SEATA_SECURITY_SECRETKEY | JWT Token 签名密钥(Base64 编码) | 内置密钥 |
+| SEATA_SECURITY_TOKEN_VALIDITY | Token 有效期(毫秒) | 1800000(30分钟) |
+| LOG_HOME | 日志存储路径 | `${user.home}/logs/seata` |
+
+
+**注意**:控制台账户和密码配置不支持通过环境变量设置,必须在 `application.yml` 配置文件中配置。
+
+#### 生成安全密钥
+
+JWT 密钥必须是 Base64 编码的字符串,可使用以下命令生成:
+```shell
+# 生成随机密钥
+openssl rand -base64 32
+
+# 或将自定义字符串转为 Base64
+echo -n "MyCustomSecretKeyForSeataJWT2024" | base64
+```
 ## 快速上手
 
 Seata 使用 namingserver 作为注册中心的操作步骤非常简单,分为在client端的配置以及在server端的配置


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to