diff --git a/en/getting-started/install-self-hosted/docker-compose.mdx b/en/getting-started/install-self-hosted/docker-compose.mdx index 01182549..4ad946ba 100644 --- a/en/getting-started/install-self-hosted/docker-compose.mdx +++ b/en/getting-started/install-self-hosted/docker-compose.mdx @@ -45,8 +45,7 @@ title: Deploy with Docker Compose Clone the Dify source code to your local machine: ```bash -# Assuming current latest version is 0.15.3 -git clone https://github.com/langgenius/dify.git --branch 0.15.3 +git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git ``` ### Starting Dify diff --git a/en/getting-started/install-self-hosted/faqs.mdx b/en/getting-started/install-self-hosted/faqs.mdx index fcbc0ea9..22fdb50b 100644 --- a/en/getting-started/install-self-hosted/faqs.mdx +++ b/en/getting-started/install-self-hosted/faqs.mdx @@ -87,12 +87,50 @@ docker-compose restart Modify the `UPLOAD_FILE_SIZE_LIMIT` parameter in the `.env` file to adjust the default limit. Additionally, you should also sync the `NGINX_CLIENT_MAX_BODY_SIZE` parameter value to avoid potential issues. -{/* -Contributing Section -DO NOT edit this section! -It will be automatically generated by the script. -*/} +### 8. How to create a backup before upgrading? +Before upgrading, it is recommended to back up your current `dify` directory to prevent any potential data loss. You can create a backup with the following command: + +```bash +cp -r dify "dify.bak.$(date +%Y%m%d%H%M%S)" +``` + +This will create a timestamped backup copy, making it easy to restore if needed. + +### 9. How to install an older version of the Community Edition? + +In some cases, you may want to install a specific older version of the Community Edition, you can use the `--branch` flag to do this. For example, to install version `0.15.3`: + +```bash +git clone https://github.com/langgenius/dify.git --branch 0.15.3 +``` + +This will clone the repository at that version, and the rest of the setup is the same as installing the latest version. + +### 10. How to install the Community Edition using a ZIP archive? + +If you're on a network-restricted server or unable to use `git` for any reason, you can install Dify using a ZIP archive: + +```bash +wget -O dify.zip "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r '.zipball_url')" +unzip dify.zip && rm dify.zip +``` + +The remaining installation steps are the same as in the standard setup. Alternatively, you can download the ZIP archive on another device and manually upload it to the target server. + +To upgrade later, download the latest archive and synchronize it with your existing installation: + +```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 +rsync -a dify-latest/ dify/ +rm -rf dify-latest/ +cd dify/docker +docker compose pull +docker compose up -d +``` + +Make sure to back up your existing data before upgrading. Refer to [Question 8](#8) for details. --- [Edit this page](https://github.com/langgenius/dify-docs/edit/main/en/getting-started/install-self-hosted/faqs.mdx) | [Report an issue](https://github.com/langgenius/dify-docs/issues/new?title=Documentation%20Issue%3A%20&body=%23%23%20Issue%20Description%0A%3C%21--%20Please%20briefly%20describe%20the%20issue%20you%20found%20--%3E%0A%0A%23%23%20Page%20Link%0Ahttps%3A%2F%2Fgithub.com%2Flanggenius%2Fdify-docs%2Fblob%2Fmain%2Fen/getting-started/install-self-hosted%2Ffaqs.mdx%0A%0A%23%23%20Suggested%20Changes%0A%3C%21--%20If%20you%20have%20specific%20suggestions%20for%20changes%2C%20please%20describe%20them%20here%20--%3E%0A%0A%3C%21--%20Thank%20you%20for%20helping%20improve%20our%20documentation%21%20--%3E)