From 4c87ba3790e0ed7e0aa69f31665bd75d4cf22d6c Mon Sep 17 00:00:00 2001 From: Stream Date: Thu, 30 Apr 2026 05:00:46 +0800 Subject: [PATCH 1/2] docs: adapt for the new start script --- en/self-host/configuration/environments.mdx | 8 +-- en/self-host/quick-start/docker-compose.mdx | 58 +++++++++++---------- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/en/self-host/configuration/environments.mdx b/en/self-host/configuration/environments.mdx index 046091438..ff75ed717 100644 --- a/en/self-host/configuration/environments.mdx +++ b/en/self-host/configuration/environments.mdx @@ -141,9 +141,9 @@ If you use your own reverse proxy, forward `Upgrade` and `Connection` headers on ### SECRET_KEY -Default: (pre-filled in `.env.example`; must be replaced for production) +Default: generated into `.env` by the Docker Compose wrapper. -Used for session cookie signing, JWT authentication tokens, file URL signatures (HMAC-SHA256), and encrypting third-party OAuth credentials (AES-256). Generate a strong key before first launch: +Used for session cookie signing, JWT authentication tokens, file URL signatures (HMAC-SHA256), and encrypting third-party OAuth credentials (AES-256). The Docker Compose wrapper generates a strong key before first launch. For manual deployments, generate one with: ```bash openssl rand -base64 42 @@ -1046,7 +1046,7 @@ Dify sends emails for account invitations, password resets, login codes, and Hum | Variable | Default | Description | |---|---|---| -| `MAIL_TYPE` | `resend` | Mail provider: `resend`, `smtp`, or `sendgrid`. | +| `MAIL_TYPE` | (empty) | Mail provider: `resend`, `smtp`, or `sendgrid`. Leave empty to disable email sending. | | `MAIL_DEFAULT_SEND_FROM` | (empty) | Default "From" address for all outgoing emails. Required. | @@ -1614,4 +1614,4 @@ The plugin daemon can store plugin packages in different storage backends. Confi | `PLUGIN_VOLCENGINE_TOS_REGION` | (empty) | Volcengine TOS region. | - \ No newline at end of file + diff --git a/en/self-host/quick-start/docker-compose.mdx b/en/self-host/quick-start/docker-compose.mdx index c0a6fff05..7fb07d3c3 100644 --- a/en/self-host/quick-start/docker-compose.mdx +++ b/en/self-host/quick-start/docker-compose.mdx @@ -43,31 +43,23 @@ Make sure your machine meets the following minimum system requirements. cd dify/docker ``` - 2. Copy the example environment configuration file: - - ```bash - cp .env.example .env - ``` - - When the frontend and backend run on different subdomains, set `COOKIE_DOMAIN` to the site's top-level domain (e.g., `example.com`) and set `NEXT_PUBLIC_COOKIE_DOMAIN` to `1` in the `.env` file. - - The frontend and backend must be under the same top-level domain to share authentication cookies. - - - 3. Start the containers using the command that matches your Docker Compose version: + 2. Start the containers: - ```bash Docker Compose V2 - docker compose up -d + ```bash macOS / Linux / WSL + ./dify-compose up -d ``` - ```bash Docker Compose V1 - docker-compose up -d + ```powershell Windows PowerShell + .\dify-compose.ps1 up -d ``` + + The wrapper creates `.env` if one does not exist and writes a generated `SECRET_KEY` to it. Press Enter to use the default deployment, or answer `y` to edit `.env` first. Use `.env.example` as the full environment variable reference. - - Run `docker compose version` to check your Docker Compose version. - + When the frontend and backend run on different subdomains, set `COOKIE_DOMAIN` to the site's top-level domain (e.g., `example.com`) and set `NEXT_PUBLIC_COOKIE_DOMAIN` to `1` in the `.env` file. + + The frontend and backend must be under the same top-level domain to share authentication cookies. + The following containers will be started: @@ -93,11 +85,16 @@ Make sure your machine meets the following minimum system requirements. ✔ Container docker-nginx-1 Started 3.4s ``` - 4. Verify that all containers are running successfully: + 3. Verify that all containers are running successfully: - ```bash - docker compose ps - ``` + + ```bash macOS / Linux / WSL + ./dify-compose ps + ``` + ```powershell Windows PowerShell + .\dify-compose.ps1 ps + ``` + You should see output similar to the following, with each container in the `Up` or `healthy` status: @@ -145,8 +142,15 @@ Make sure your machine meets the following minimum system requirements. Modify the environment variable values in your local `.env` file, then restart Dify to apply the changes: ``` -docker compose down -docker compose up -d +./dify-compose down +./dify-compose up -d +``` + +On Windows PowerShell, run: + +```powershell +.\dify-compose.ps1 down +.\dify-compose.ps1 up -d ``` @@ -159,6 +163,6 @@ Upgrade steps may vary between releases. Refer to the upgrade guide for your tar - After upgrading, check whether the `.env.example` file has changed and update your local `.env` file accordingly. + After upgrading, review changes to `.env.default` and `.env.example`. Keep only local overrides in `.env`. - \ No newline at end of file + From e963f739410f0133098d68c102556a4df30159fe Mon Sep 17 00:00:00 2001 From: Stream Date: Thu, 7 May 2026 17:22:53 +0800 Subject: [PATCH 2/2] docs: remove translation changes --- ja/self-host/quick-start/docker-compose.mdx | 21 ++++++++------------- ja/self-host/quick-start/faqs.mdx | 1 - zh/self-host/quick-start/docker-compose.mdx | 12 ++++-------- zh/self-host/quick-start/faqs.mdx | 1 - 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/ja/self-host/quick-start/docker-compose.mdx b/ja/self-host/quick-start/docker-compose.mdx index a45ee07c1..07bc4c0ea 100644 --- a/ja/self-host/quick-start/docker-compose.mdx +++ b/ja/self-host/quick-start/docker-compose.mdx @@ -20,11 +20,11 @@ sidebarTitle: Docker Compose ### ソフトウェア -| オペレーティングシステム | 必要なソフトウェア | 備考 | -| :--- | :--- | :--- | -| macOS 10.14 以降 | Docker Desktop | 2 vCPU 以上、8 GiB 以上のメモリを割り当てます。



手順は [Mac 用 Docker Desktop のインストール](https://docs.docker.com/desktop/mac/install/) を参照してください。 | -| Linux | Docker 19.03+ / Docker Compose 1.28+ | 手順は以下を参照してください。



[Docker Engine のインストール](https://docs.docker.com/engine/install/) / [Docker Compose のインストール](https://docs.docker.com/compose/install/) | -| Windows (WSL 2) | Docker Desktop | ソースコードとデータは Linux ファイルシステムに保存します。



手順は [Windows 用 Docker Desktop のインストール](https://docs.docker.com/desktop/windows/install/#wsl-2-backend) を参照してください。 | +| オペレーティングシステム | 必要なソフトウェア | 備考 | +| :----------------------------- | :---------------------------------------- | :----- | +| macOS 10.14 以降 | Docker Desktop | Docker 仮想マシンを最低 2 つの仮想 CPU と 8 GiB のメモリで設定してください。



インストール手順については、[Mac 用 Docker Desktop のインストール](https://docs.docker.com/desktop/mac/install/) を参照してください。 | +| Linux ディストリビューション | Docker 19.03+



Docker Compose 1.28+ | インストール手順については、[Docker Engine のインストール](https://docs.docker.com/engine/install/) および [Docker Compose のインストール](https://docs.docker.com/compose/install/) を参照してください。 | +| WSL 2 が有効な Windows | Docker Desktop | Linux コンテナにバインドされるソースコードやデータは、Windows ファイルシステムではなく、Linux ファイルシステムに保存してください。



インストール手順については、[Windows 用 Docker Desktop のインストール](https://docs.docker.com/desktop/windows/install/#wsl-2-backend) を参照してください。 | ## デプロイと起動 @@ -35,7 +35,6 @@ sidebarTitle: Docker Compose ```bash git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git ``` - @@ -44,7 +43,7 @@ sidebarTitle: Docker Compose ```bash cd dify/docker ``` - + 2. 環境設定ファイルの例をコピーします: ```bash @@ -54,15 +53,12 @@ sidebarTitle: Docker Compose 3. お使いの Docker Compose バージョンに合わせたコマンドでコンテナを起動します: - ```bash Docker Compose V2 docker compose up -d ``` - ```bash Docker Compose V1 docker-compose up -d ``` - @@ -92,7 +88,7 @@ sidebarTitle: Docker Compose ✔ Container docker-plugin_daemon-1 Started 3.2s ✔ Container docker-nginx-1 Started 3.4s ``` - + 4. すべてのコンテナが正常に動作しているか確認します: ```bash @@ -115,7 +111,6 @@ sidebarTitle: Docker Compose docker-worker-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker 26 seconds ago Up 22 seconds 5001/tcp docker-worker_beat-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker_beat 26 seconds ago Up 22 seconds 5001/tcp ``` - @@ -162,4 +157,4 @@ docker compose up -d アップグレード後、`.env.example` ファイルが変更されているかどうかを確認し、それに応じてローカルの `.env` ファイルを更新してください。 - + \ No newline at end of file diff --git a/ja/self-host/quick-start/faqs.mdx b/ja/self-host/quick-start/faqs.mdx index 15c4ab348..7a3a969cc 100644 --- a/ja/self-host/quick-start/faqs.mdx +++ b/ja/self-host/quick-start/faqs.mdx @@ -29,7 +29,6 @@ unzip dify.zip && rm dify.zip または、別のデバイスで ZIP をダウンロードして手動で転送することもできます。 **アップグレードするには**: - ```bash wget -O dify-latest.zip "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r '.zipball_url')" unzip dify-latest.zip && rm dify-latest.zip diff --git a/zh/self-host/quick-start/docker-compose.mdx b/zh/self-host/quick-start/docker-compose.mdx index 987009957..a02556ba5 100644 --- a/zh/self-host/quick-start/docker-compose.mdx +++ b/zh/self-host/quick-start/docker-compose.mdx @@ -26,6 +26,7 @@ sidebarTitle: Docker Compose | Linux 平台 | Docker 19.03+



Docker Compose 1.28+ | 安装说明请参阅 [Docker 引擎安装指南](https://docs.docker.com/engine/install/) 和 [Docker Compose 安装指南](https://docs.docker.com/compose/install/)。 | | 启用了 WSL 2 的 Windows | Docker Desktop | 建议将源代码和绑定到 Linux 容器的数据存储在 Linux 文件系统中,而不是 Windows 文件系统中。



安装说明请参阅 [Windows 版 Docker Desktop 安装指南](https://docs.docker.com/desktop/windows/install/#wsl-2-backend)。 | + ## 部署并启动 @@ -35,7 +36,6 @@ sidebarTitle: Docker Compose ```bash git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git ``` - @@ -44,7 +44,7 @@ sidebarTitle: Docker Compose ```bash cd dify/docker ``` - + 2. 复制示例环境配置文件: ```bash @@ -54,15 +54,12 @@ sidebarTitle: Docker Compose 3. 根据你的 Docker Compose 版本选择相应命令启动容器: - ```bash Docker Compose V2 docker compose up -d ``` - ```bash Docker Compose V1 docker-compose up -d ``` - @@ -92,7 +89,7 @@ sidebarTitle: Docker Compose ✔ Container docker-plugin_daemon-1 Started 3.2s ✔ Container docker-nginx-1 Started 3.4s ``` - + 4. 验证所有容器是否成功运行: ```bash @@ -115,7 +112,6 @@ sidebarTitle: Docker Compose docker-worker-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker 26 seconds ago Up 22 seconds 5001/tcp docker-worker_beat-1 langgenius/dify-api:1.10.1 "/bin/bash /entrypoi…" worker_beat 26 seconds ago Up 22 seconds 5001/tcp ``` - @@ -162,4 +158,4 @@ docker compose up -d 升级后,请检查 `.env.example` 文件是否有变更,并相应更新你的本地 `.env` 文件。 - + \ No newline at end of file diff --git a/zh/self-host/quick-start/faqs.mdx b/zh/self-host/quick-start/faqs.mdx index f18236c52..61cf4a1de 100644 --- a/zh/self-host/quick-start/faqs.mdx +++ b/zh/self-host/quick-start/faqs.mdx @@ -29,7 +29,6 @@ unzip dify.zip && rm dify.zip 或者,在另一台设备上下载 ZIP 文件并手动传输。 **升级方法**: - ```bash wget -O dify-latest.zip "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r '.zipball_url')" unzip dify-latest.zip && rm dify-latest.zip