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 61a723d43..52df4fc97 100644
--- a/en/self-host/quick-start/docker-compose.mdx
+++ b/en/self-host/quick-start/docker-compose.mdx
@@ -24,7 +24,6 @@ Make sure your machine meets the following minimum system requirements.
| Linux distributions | Docker 19.03+
Docker Compose 1.28+ | For installation instructions, see [Install Docker Engine](https://docs.docker.com/engine/install/) and [Install Docker Compose](https://docs.docker.com/compose/install/). |
| Windows with WSL 2 enabled | Docker Desktop | Store source code and data bound to Linux containers in the Linux file system rather than Windows.
For installation instructions, see [Install Docker Desktop on Windows](https://docs.docker.com/desktop/windows/install/#wsl-2-backend). |
-
## Deploy and Start
@@ -34,6 +33,7 @@ Make sure your machine meets the following minimum system requirements.
```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
```
+
@@ -42,27 +42,24 @@ Make sure your machine meets the following minimum system requirements.
```bash
cd dify/docker
```
-
- 2. Copy the example environment configuration file:
-
- ```bash
- cp .env.example .env
- ```
- 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
```
+
-
- Run `docker compose version` to check your Docker Compose version.
-
+
+ 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.
+
The following containers will be started:
@@ -87,12 +84,20 @@ Make sure your machine meets the following minimum system requirements.
✔ Container docker-plugin_daemon-1 Started 3.2s
✔ Container docker-nginx-1 Started 3.4s
```
-
- 4. Verify that all containers are running successfully:
- ```bash
- docker compose ps
- ```
+ 3. Verify that all containers are running successfully:
+
+
+
+ ```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:
@@ -110,6 +115,7 @@ Make sure your machine meets the following minimum system requirements.
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
```
+
@@ -139,10 +145,19 @@ 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:
-```bash
-docker compose down
-docker compose up -d
-```
+
+
+ ```bash macOS / Linux / WSL
+ ./dify-compose down
+ ./dify-compose up -d
+ ```
+
+ ```powershell Windows PowerShell
+ .\dify-compose.ps1 down
+ .\dify-compose.ps1 up -d
+ ```
+
+
For more information, see [environment variables](/en/self-host/configuration/environments).
@@ -154,6 +169,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
+
diff --git a/en/self-host/quick-start/faqs.mdx b/en/self-host/quick-start/faqs.mdx
index d92b17eec..ae6d81a5a 100644
--- a/en/self-host/quick-start/faqs.mdx
+++ b/en/self-host/quick-start/faqs.mdx
@@ -27,6 +27,7 @@ unzip dify.zip && rm dify.zip
Alternatively, download the ZIP on another device and transfer it manually.
**To upgrade**:
+
```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