这是用户在 2024-5-7 8:59 为 https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx?_ga=2.51711023.782... 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
Articles with the tag:
带有标签的文章:
Close 关闭
Changelog 更新日志
Close 关闭
Try in the cloud
Try in the cloud
Help Center
ONLYOFFICE Docs Community Edition for Docker

Installing ONLYOFFICE Docs Community Edition for Docker on a local server
在本地服务器上为 Docker 安装 ONLYOFFICE Docs 社区版

ONLYOFFICE Docs v8.0 ONLYOFFICE Docs changelog
ONLYOFFICE Docs 更新日志

Version 8.0.1 版本 8.0.1

Release date: 26/02/2024 发布日期:26/02/2024

Version 8.0.0 版本 8.0.0

Release date: 30/01/2024 发布日期:30/01/2024

Version 7.5.1 版本 7.5.1

Release date: 11/08/2023 发布日期:11/08/2023

Version 7.5.0 版本 7.5.0

Release date: 10/17/2023 发布日期:10/17/2023

Version 7.4.1 版本 7.4.1

Release date: 07/31/2023 发布日期:07/31/2023

Version 7.4.0 版本 7.4.0

Release date: 06/13/2023 发布日期:06/13/2023

Version 7.3.3 版本 7.3.3

Release date: 03/15/2023 发布日期:03/15/2023

Version 7.3.2 版本 7.3.2

Release date: 02/14/2023 发布日期:02/14/2023

Version 7.3.0 版本 7.3.0

Release date: 01/31/2023 发布日期:01/31/2023

Version 7.2.2 版本 7.2.2

Release date: 12/20/2022 发布日期:2022 年 12 月 20 日

Version 7.2.1 版本 7.2.1

Release date: 10/21/2022 发布日期:2022 年 10 月 21 日

Version 7.2.0 版本 7.2.0

Release date: 09/22/2022 发布日期:2022 年 9 月 22 日

Version 7.1.1 版本 7.1.1

Release date: 06/02/2022 发布日期:06/02/2022

Version 7.1.0 版本 7.1.0

Release date: 05/12/2022 发布日期:2022 年 5 月 12 日

Version 7.0.1 版本 7.0.1

Release date: 02/22/2022 发布日期:2022 年 2 月 22 日

Version 7.0.0 版本 7.0.0

Release date: 01/18/2022 发布日期:01/18/2022

Version 6.4.2 版本 6.4.2

Release date: 10/14/2021 发布日期:2021 年 10 月 14 日

Version 6.4.1 版本 6.4.1

Release date: 09/28/2021 发布日期:2021 年 09 月 28 日

Version 6.4.0 版本 6.4.0

Release date: 08/26/2021 发布日期:2021 年 08 月 26 日

Version 6.3.2 版本 6.3.2

Release date: 08/10/2021 发布日期:2021 年 08 月 10 日

Version 6.3.1 版本 6.3.1

Release date: 06/08/2021 发布日期:06/08/2021

Version 6.3.0 版本 6.3.0

Release date: 05/20/2021 发布日期:2021 年 5 月 20 日

Version 6.2.2 版本 6.2.2

Release date: 04/19/2021 发布日期:2021 年 4 月 19 日

Version 6.2.1 版本 6.2.1

Release date: 03/31/2021 发布日期:03/31/2021

Version 6.2.0 版本 6.2.0

Release date: 03/01/2021 发布日期:03/01/2021

Version 6.1.1 版本 6.1.1

Release date: 01/28/2021 发布日期:01/28/2021

Version 6.1.0 版本 6.1.0

Release date: 12/02/2020 发布日期:12/02/2020

Version 6.0.2 版本 6.0.2

Release date: 11/12/2020 发布日期:11/12/2020

Version 6.0.1 版本 6.0.1

Release date: 10/28/2020 发布日期:2020 年 10 月 28 日

Version 6.0.0 版本 6.0.0

Release date: 10/14/2020 发布日期:2020 年 10 月 14 日

Version 5.6.5 版本 5.6.5

Release date: 09/21/2020 发布日期:2020 年 9 月 21 日

Version 5.6.4 版本 5.6.4

Release date: 09/08/2020 发布日期:09/08/2020

Version 5.6.3 版本 5.6.3

Release date: 08/17/2020 发布日期:2020 年 8 月 17 日

Version 5.6.2 版本 5.6.2

Release date: 08/07/2020 发布日期:08/07/2020

Version 5.6.1 版本 5.6.1

Release date: 08/05/2020 发布日期:08/05/2020

Version 5.6.0 版本 5.6.0

Release date: 07/29/2020 发布日期:2020 年 07 月 29 日

Version 5.5.3 版本 5.5.3

Release date: 05/22/2020 发布日期:2020 年 5 月 22 日

Version 5.5.1

Release date: 04/09/2020

Version 5.5.0

Release date: 03/05/2020

Version 5.4.2

Release date: 11/27/2019

Version 5.4.1

Release date: 10/02/2019

Version 5.4.0

Release date: 09/03/2019

Version 5.3.4

Release date: 07/16/2019

Version 5.3.2

Release date: 06/24/2019

Version 5.3.1

Release date: 06/06/2019

Version 5.3.0

Release date: 05/28/2019

Version 5.2.8

Release date: 02/05/2019

Version 5.2.7

Release date: 01/16/2019

Version 5.2.6

Release date: 12/25/2018

Version 5.2.4

Release date: 12/12/2018

Version 5.2.3

Release date: 10/31/2018

Version 5.2.2

Release date: 10/05/2018

Version 5.2.0

Release date: 09/28/2018

Version 5.1.5

Release date: 07/18/2018

Version 5.1.4

Release date: 05/24/2018

Version 5.1.3

Release date: 04/27/2018

Version 5.1.2

Release date: 04/11/2018

Version 5.1.1

Release date: 04/05/2018

Version 5.1.0

Release date: 03/28/2018

Version 5.0.7

Release date: 01/16/2018

Version 5.0.6

Release date: 12/11/2017

Version 5.0.5

Release date: 11/28/2017

Version 5.0.4

Release date: 11/14/2017

Version 5.0.3

Release date: 11/02/2017

Version 5.0.2 SaaS only

Release date: 10/13/2017

Version 5.0.1 SaaS only

Release date: 10/05/2017

Version 5.0.0 SaaS only

Release date: 09/23/2017

Version 4.4.4

Release date: 09/13/2017

Windows-only release

See changelog on GitHub

Version 4.4.3

Release date: 08/14/2017

Version 4.4.2

Release date: 07/24/2017

Version 4.4.1

Release date: 07/05/2017

Version 4.3.6

Release date: 06/14/2017

Version 4.3.5

Release date: 06/05/2017

Version 4.3.4

Release date: 05/16/2017

Version 4.3.3

Release date: 04/28/2017

Version 4.3.2

Release date: 04/17/2017

Version 4.3.1

Release date: 04/06/2017

Version 4.3.0

Release date: 04/03/2017

Version 4.2.11

Release date: 03/13/2017

Version 4.2.10

Release date: 02/20/2017

Version 4.2.9

Release date: 02/14/2017

Version 4.2.8

Release date: 02/06/2017

Version 4.2.7

Release date: 02/01/2017

Version 4.2.5

Release date: 01/16/2017

Version 4.2.4

Release date: 01/09/2017

Version 4.2.3

Release date: 12/23/2016

Version 4.2.2

Release date: 12/21/2016

Version 4.2.1

Release date: 12/06/2016

Version 4.2.0

Release date: 12/01/2016

Version 4.1.8

Release date: 11/03/2016

Version 4.1.7

Release date: 11/01/2016

Version 4.1.6

Release date: 10/26/2016

Version 4.1.5

Release date: 10/13/2016

Version 4.1.4

Release date: 10/07/2016

Version 4.1.3

Release date: 09/28/2016

Version 4.1.2

Release date: 09/22/2016

Version 4.0.3

Release date: 08/04/2016

Version 4.0.2

Release date: 08/03/2016

Introduction 介绍

Community Edition allows you to install ONLYOFFICE Docs on your local server and integrate online editors with ONLYOFFICE collaboration platform or other popular systems.
社区版允许您在本地服务器上安装 ONLYOFFICE Docs,并将在线编辑器与 ONLYOFFICE 协作平台或其他流行系统集成。

ONLYOFFICE Docs is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
ONLYOFFICE Docs 是一个在线办公套件,包括文本、电子表格和演示文稿的查看器和编辑器,完全兼容 Office Open XML 格式:.docx、.xlsx、.pptx,并实现实时协作编辑。

Functionality 功能

  • Document Editor 文档编辑器
  • Spreadsheet Editor 电子表格编辑器
  • Presentation Editor 演示编辑器
  • Mobile web viewers 移动网络浏览器
  • Collaborative editing 协作编辑
  • Hieroglyph support 汉字支持
  • Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML
    支持所有流行的格式:DOC,DOCX,TXT,ODT,RTF,ODP,EPUB,ODS,XLS,XLSX,CSV,PPTX,HTML

See the detailed list of features available for ONLYOFFICE Docs Community Edition.
查看仅适用于 ONLYOFFICE Docs 社区版的详细功能列表。

Integrating it with ONLYOFFICE Groups you will be able to:
将其与 ONLYOFFICE Groups 集成,您将能够:

  • share files; 共享文件;
  • manage access rights to documents;
    管理文档访问权限;
  • embed documents on a website;
    在网站上嵌入文档;
  • view and edit files stored on Drive, Box, Dropbox, OneDrive, OwnCloud connected to ONLYOFFICE.
    查看和编辑存储在与 ONLYOFFICE 连接的 Drive、Box、Dropbox、OneDrive、OwnCloud 上的文件。

This guide will show you how to install ONLYOFFICE Docs Community Edition Docker version to your machine.
本指南将向您展示如何将 ONLYOFFICE Docs 社区版 Docker 版本安装到您的计算机上。

System requirements 系统要求

  • CPU
    dual core 2 GHz or better

    CPU 双核 2 GHz 或更高
  • RAM
    4 GB or more

    RAM 4 GB 或更多
  • HDD
    at least 40 GB of free space

    HDD 至少 40 GB 的可用空间
  • SWAP
    at least 4 GB, but depends of the host OS. More is better

    至少交换 4 GB,但取决于主机操作系统。越多越好
  • OS
    amd64 Linux distribution with kernel version 3.10 or later

    OS amd64 Linux 发行版,内核版本为 3.10 或更高
  • Additional requirements 额外要求
    • Docker: any version supported by Docker team
      Docker:由 Docker 团队支持的任何版本

Installing ONLYOFFICE Docs
安装 ONLYOFFICE Docs

You need the latest Docker version installed. If you do not have it, please see the Installation section on Docker website to learn how to get it.
您需要安装最新版本的 Docker。如果您没有安装,请查看 Docker 网站上的安装部分,了解如何获取它。
Docker specifies Google DNS servers by default. If your ONLYOFFICE Docs is not going to have access to the Internet, we recommend that you change the default Docker DNS address to the address of your local DNS server. To do that go to the /etc/default/docker file and change the IP address in the following line to the IP address of a DNS server in your local network:
Docker 默认指定 Google DNS 服务器。如果您的 ONLYOFFICE Docs 不需要访问互联网,我们建议您将默认的 Docker DNS 地址更改为本地 DNS 服务器的地址。要做到这一点,请转到 /etc/default/docker 文件,并将以下行中的 IP 地址更改为本地网络中 DNS 服务器的 IP 地址:
docker_OPTS="--dns 8.8.8.8"

For the RPM based operating systems like CentOS:
对于基于 RPM 的操作系统,如 CentOS:

  1. Create the /etc/docker/daemon.json configuration file with the following contents:
    使用以下内容创建 /etc/docker/daemon.json 配置文件:
    { "dns" : [ "8.8.8.8" ] }
    
  2. Restart the Docker service:
    重新启动 Docker 服务
    
    sudo systemctl restart docker.service
    

After you have Docker installed, run it and execute the following command:
安装 Docker 后,运行它并执行以下命令:

sudo docker run -i -t -d -p 80:80 --restart=always -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
Important 重要 Starting from version 7.2, we added a random generation of JWT secret. If JWT secret is not specified with the environment variable, it leads to its re-generation during every VMs or physical server reboot, so there might be problems in integrations. To avoid this issue, specify your own value in -e JWT_SECRET=my_jwt_secret.
从版本 7.2 开始,我们添加了 JWT 密钥的随机生成。如果没有使用环境变量指定 JWT 密钥,则在每次 VM 或物理服务器重新启动时会导致其重新生成,因此可能会在集成中出现问题。为了避免此问题,请在 -e JWT_SECRET=my_jwt_secret 中指定您自己的值。

If you are not going to use JWT in your installation, use -e JWT_ENABLED=false.
如果您不打算在安装中使用 JWT,请使用 -e JWT_ENABLED=false

Use this command if you wish to install ONLYOFFICE Docs separately. To install ONLYOFFICE Docs integrated with ONLYOFFICE Groups and ONLYOFFICE Mail, refer to the corresponding instructions below.
如果您希望单独安装 ONLYOFFICE Docs,请使用此命令。要安装与 ONLYOFFICE Groups 和 ONLYOFFICE Mail 集成的 ONLYOFFICE Docs,请参考下面的相应说明。

By default ONLYOFFICE Docs listens to the incoming connections using port 80. Starting from version 4.3, you can change the port for ONLYOFFICE Docs if you plan to use it instead of the default one. This can be easily done changing the mapping port during the installation:
默认情况下,ONLYOFFICE Docs 使用端口 80 监听传入连接。从版本 4.3 开始,如果您打算使用 ONLYOFFICE Docs 而不是默认端口,则可以更改 ONLYOFFICE Docs 的端口。这可以通过在安装过程中更改映射端口来轻松完成:
sudo docker run -i -t -d -p <PORT_NUMBER>:80 --restart=always -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
Where <PORT_NUMBER> is the number of port you want ONLYOFFICE Docs to use.
其中 <PORT_NUMBER> 是您希望 ONLYOFFICE Docs 使用的端口号。

This will install ONLYOFFICE Docs and all the dependencies it needs (the list of what is being done by the script can be found here).
这将安装 ONLYOFFICE Docs 及其所需的所有依赖项(脚本执行的操作列表可在此处找到)。

Storing data outside containers
将数据存储在容器外

All the data are stored in the specially-designated directories, data volumes, at the following location:
所有数据存储在专门指定的目录中,即数据卷,位置如下:

  • /var/log/onlyoffice for ONLYOFFICE Docs logs
    仅用于 ONLYOFFICE Docs 日志 /var/log/onlyoffice
  • /var/www/onlyoffice/Data for certificates 证书 /var/www/onlyoffice/Data
  • /var/lib/onlyoffice for file cache 文件缓存 /var/lib/onlyoffice
  • /var/lib/postgresql for database 数据库 /var/lib/postgresql
We recommend 我们建议 We strongly recommend that you store the data outside the Docker containers on the host machine as it allows you to easily update ONLYOFFICE Docs once the new version is released without losing your data.
我们强烈建议您将数据存储在主机机器上的 Docker 容器之外,这样一来,一旦新版本发布,您就可以轻松更新 ONLYOFFICE Docs,而不会丢失数据。

To get access to your data located outside the container, you need to mount the volumes. It can be done by specifying the -v option in the docker run command.
要访问容器外部的数据,您需要挂载卷。可以通过在 docker run 命令中指定-v 选项来实现。

sudo docker run -i -t -d -p 80:80 --restart=always \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
Please note, that in case you are trying to mount the folders which are not yet created, these folders will be created but the access to them will be limited. You will need to change their access rights manually.
请注意,如果您尝试挂载尚未创建的文件夹,这些文件夹将被创建,但对它们的访问将受到限制。您需要手动更改它们的访问权限。

Normally, you do not need to store container data because the container operation does not depend on its state. Saving data will be useful:
通常情况下,您不需要存储容器数据,因为容器操作不依赖于其状态。保存数据会很有用:

  • for easy access to container data, such as logs;
    为了方便访问容器数据,比如日志;
  • to remove the limit on the size of the data inside the container;
    以消除容器内数据大小的限制;
  • when using services launched outside the container such as PostgreSQL, Redis, RabbitMQ.
    当使用在容器外启动的服务,如 PostgreSQL、Redis、RabbitMQ 时。

Running ONLYOFFICE Docs using HTTPS
仅使用 HTTPS 运行 ONLYOFFICE Docs

sudo docker run -i -t -d -p 443:443 --restart=always \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

Access to the onlyoffice application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, self signed certificates can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
可以使用 SSL 来保护对 OnlyOffice 应用程序的访问,以防止未经授权的访问。虽然 CA 认证的 SSL 证书可以通过 CA 进行信任验证,但自签名证书也可以提供相同级别的信任验证,只要每个客户端采取一些额外步骤来验证您网站的身份。以下提供了实现此目的的说明。

To secure the application via SSL basically two things are needed:
为了通过 SSL 保护应用程序,基本上需要两样东西:

  • Private key (.key) 私钥(.key)
  • SSL certificate (.crt) SSL 证书(.crt)

So you need to create and install the following files:
所以您需要创建并安装以下文件:

/app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
/app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt

When using CA certified certificates (e.g Let's Encrypt), these files are provided to you by the CA. If you are using self-signed certificates, you need to generate these files yourself.
当使用 CA 认证的证书(例如 Let's Encrypt)时,这些文件由 CA 提供给您。如果您使用自签名证书,则需要自行生成这些文件。

Switching ONLYOFFICE Docs to HTTPS using certbot
使用 certbot 将 ONLYOFFICE Docs 切换到 HTTPS

The easiest way to switch ONLYOFFICE Docs to HTTPS is to automatically get Let's Encrypt SSL Certificates using certbot.
将 ONLYOFFICE Docs 切换到 HTTPS 的最简单方法是使用 certbot 自动获取 Let's Encrypt SSL 证书。

Run the ONLYOFFICE Docs Docker container specifying ports 80 and 443 and setting your own values for the variables:
运行 ONLYOFFICE Docs Docker 容器,指定端口 80 和 443,并为变量设置您自己的值:

sudo docker run -i -t -d -p 80:80 -p 443:443 --restart=always \
    -e LETS_ENCRYPT_DOMAIN=yourdomain.com -e LETS_ENCRYPT_MAIL=email@example.com -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

Where: 在哪里:

  • LETS_ENCRYPT_DOMAIN - a domain name to use for the certificate.
    LETSENCRYPT_DOMAIN - 用于证书的域名。
  • LETS_ENCRYPT_MAIL - an email used for registration and recovery contact.
    LETS_ENCRYPT_MAIL - 用于注册和恢复联系的电子邮件。

The letsencrypt.org CA-signed certificate will be automatically generated and installed to your server. Now your ONLYOFFICE Docs should be available at the https://yourdomain.com address.
letsencrypt.org CA 签名的证书将自动生成并安装到您的服务器上。现在,您的 ONLYOFFICE Docs 应该可以通过 https://yourdomain.com 地址访问。

Generation of self signed certificates
生成自签名证书

Generation of self-signed SSL certificates involves a simple 3 step procedure
生成自签名 SSL 证书涉及一个简单的 3 步过程

STEP 1: Create the server private key
步骤 1:创建服务器私钥
openssl genrsa -out onlyoffice.key 2048
STEP 2: Create the certificate signing request (CSR)
步骤 2:创建证书签名请求(CSR)
openssl req -new -key onlyoffice.key -out onlyoffice.csr
STEP 3: Sign the certificate using the private key and CSR
步骤 3:使用私钥和 CSR 签署证书
openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt

You have now generated an SSL certificate that's valid for 365 days.
您现在已生成了一个有效期为 365 天的 SSL 证书。

Strengthening the server security
加强服务器安全性

This section provides you with instructions to strengthen your server security.
本节为您提供了加强服务器安全性的指导。

To achieve this you need to generate stronger DHE parameters.
要实现这一目标,您需要生成更强大的 DHE 参数。

openssl dhparam -out dhparam.pem 2048
Installation of the SSL certificates
SSL 证书安装

Out of the four files generated above, you need to install the onlyoffice.key, onlyoffice.crt and dhparam.pem files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
在上面生成的四个文件中,您需要在 onlyoffice 服务器上安装 onlyoffice.keyonlyoffice.crtdhparam.pem 文件。不需要 CSR 文件,但请确保安全备份该文件(以防将来需要)。

The default path that the onlyoffice application is configured to look for the SSL certificates is at /var/www/onlyoffice/Data/certs, this can however be changed using the SSL_KEY_PATH, SSL_CERTIFICATE_PATH and SSL_DHPARAM_PATH configuration options.
onlyoffice 应用程序配置的默认路径用于查找 SSL 证书的位置是 /var/www/onlyoffice/Data/certs ,但可以使用 SSL_KEY_PATHSSL_CERTIFICATE_PATHSSL_DHPARAM_PATH 配置选项进行更改。

The /var/www/onlyoffice/Data/ path is the path of the data store, which means that you have to create a folder named certs inside /app/onlyoffice/DocumentServer/data/ and copy the files into it and as a measure of security you will update the permission on the onlyoffice.key file to only be readable by the owner.
/var/www/onlyoffice/Data/ 路径是数据存储路径,这意味着您必须在 /app/onlyoffice/DocumentServer/data/ 中创建一个名为 certs 的文件夹,并将文件复制到其中,并作为安全措施,您将更新 onlyoffice.key 文件的权限,使其只能被所有者读取。

mkdir -p /app/onlyoffice/DocumentServer/data/certs
cp onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/
cp onlyoffice.crt /app/onlyoffice/DocumentServer/data/certs/
cp dhparam.pem /app/onlyoffice/DocumentServer/data/certs/
chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key

And restart Docker container:
重新启动 Docker 容器:

sudo docker restart {{DOCUMENT_SERVER_ID}}

You are now just one step away from having our application secured.
您现在离我们的应用程序安全仅一步之遥。

Available configuration parameters
可用的配置参数
Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.
请参考 docker run 命令选项 --env-file 标志,您可以在单个文件中指定所有必需的环境变量。这将避免您编写一个可能很长的 docker run 命令。

Below is the complete list of parameters that can be set using environment variables.
以下是可以使用环境变量设置的参数的完整列表。

  • ONLYOFFICE_HTTPS_HSTS_ENABLED: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to true.
    ONLYOFFICE_HTTPS_HSTS_ENABLED:用于关闭 HSTS 配置的高级配置选项。仅在使用 SSL 时适用。默认为 true
  • ONLYOFFICE_HTTPS_HSTS_MAXAGE: Advanced configuration option for setting the HSTS max-age in the onlyoffice NGINX vHost configuration. Applicable only when SSL is in use. Defaults to 31536000.
    ONLYOFFICE_HTTPS_HSTS_MAXAGE: 用于设置 onlyoffice NGINX vHost 配置中 HSTS 最大年龄的高级配置选项。仅在使用 SSL 时适用。默认为 31536000
  • SSL_CERTIFICATE_PATH: The path to the SSL certificate to use. Defaults to /var/www/onlyoffice/Data/certs/tls.crt.
    SSL_CERTIFICATE_PATH: 要使用的 SSL 证书路径。默认为 /var/www/onlyoffice/Data/certs/tls.crt
  • SSL_KEY_PATH: The path to the SSL certificate private key. Defaults to /var/www/onlyoffice/Data/certs/tls.key.
    SSL_KEY_PATH: SSL 证书私钥的路径。默认为 /var/www/onlyoffice/Data/certs/tls.key
  • SSL_DHPARAM_PATH: The path to the Diffie-Hellman parameter. Defaults to /var/www/onlyoffice/Data/certs/dhparam.pem.
    SSL_DHPARAM_PATH: Diffie-Hellman 参数的路径。默认为 /var/www/onlyoffice/Data/certs/dhparam.pem
  • SSL_VERIFY_CLIENT: Enable verification of client certificates using the CA_CERTIFICATES_PATH file. Defaults to false.
    SSL_VERIFY_CLIENT: 启用使用 CA_CERTIFICATES_PATH file 验证客户端证书。默认为 false
  • DB_TYPE: The database type. Supported values are postgres, mariadb or mysql. Defaults to postgres.
    DB_TYPE:数据库类型。支持的值为 postgresmariadbmysql 。默认为 postgres
  • DB_HOST: The IP address or the name of the host where the database server is running.
    DB_HOST: 数据库服务器运行的 IP 地址或主机名。
  • DB_PORT: The database server port number.
    DB_PORT: 数据库服务器端口号。
  • DB_NAME: The name of a database to be created on the image startup.
    DB_NAME: 在镜像启动时要创建的数据库名称。
  • DB_USER: The new user name with superuser permissions for the database account.
    DB_USER: 具有数据库帐户超级用户权限的新用户名。
  • DB_PWD: The password set for the database account.
    DB_PWD: 为数据库帐户设置的密码。
  • AMQP_URI: The AMQP URI to connect to the message broker server.
    AMQP_URI: 用于连接到消息代理服务器的 AMQP URI。
  • AMQP_TYPE: The message broker type. Supported values are rabbitmq or activemq. Defaults to rabbitmq.
    AMQP_TYPE: 消息代理类型。支持的值为 rabbitmqactivemq 。默认为 rabbitmq
  • REDIS_SERVER_HOST: The IP address or the name of the host where the Redis server is running.
    REDIS_SERVER_HOST: Redis 服务器运行的 IP 地址或主机名。
  • REDIS_SERVER_PORT: The Redis server port number.
    REDIS_SERVER_PORT: Redis 服务器端口号。
  • REDIS_SERVER_PASS: The Redis server password. The password is not set by default.
    REDIS_SERVER_PASS:Redis 服务器密码。默认情况下未设置密码。
  • NGINX_WORKER_PROCESSES: Defines the number of NGINX worker processes.
    NGINX_WORKER_PROCESSES:定义 NGINX 工作进程的数量。
  • NGINX_WORKER_CONNECTIONS: Sets the maximum number of simultaneous connections that can be opened by a NGINX worker process.
    NGINX_WORKER_CONNECTIONS:设置 NGINX 工作进程可以打开的最大同时连接数。
  • SECURE_LINK_SECRET: Defines secret for the nginx config directive secure_link_md5. Defaults to random string.
    SECURE_LINK_SECRET: 定义 nginx 配置指令 secure_link_md5 的密钥。默认为 random string
  • JWT_ENABLED: Specifies the enabling the JSON web token validation by ONLYOFFICE Docs. Defaults to true.
    JWT_ENABLED: 指定是否启用 ONLYOFFICE Docs 的 JSON Web 令牌验证。默认为 true
  • JWT_SECRET: Defines the secret key to validate the JSON web token in the request to ONLYOFFICE Docs. Defaults to random value.
    JWT_SECRET: 定义用于验证发送到 ONLYOFFICE Docs 的请求中的 JSON Web 令牌的密钥。默认为随机值。
  • JWT_HEADER: Defines the HTTP header that will be used to send the JSON web token. Defaults to Authorization.
    JWT_HEADER: 定义用于发送 JSON Web 令牌的 HTTP 标头。默认为 Authorization
  • JWT_IN_BODY: Specifies the enabling the token validation in the request body to the ONLYOFFICE Docs. Defaults to false.
    JWT_IN_BODY: 指定在请求体中启用令牌验证以连接到 ONLYOFFICE Docs。默认为 false
  • ALLOW_META_IP_ADDRESS: Defines if it is allowed to connect meta IP address or not. Defaults to false.
    ALLOW_META_IP_ADDRESS: 定义是否允许连接到元 IP 地址。默认为 false
  • ALLOW_PRIVATE_IP_ADDRESS: Defines if it is allowed to connect private IP address or not. Defaults to false.
    ALLOW_PRIVATE_IP_ADDRESS: 定义是否允许连接私有 IP 地址。默认为 false
  • WOPI_ENABLED: Specifies the enabling the wopi handlers. Defaults to false.
    WOPI_ENABLED: 指定启用 wopi 处理程序。默认为 false
  • USE_UNAUTHORIZED_STORAGE: Set to true if using self-signed certificates for your storage server, e.g. Nextcloud. Defaults to false.
    USE_UNAUTHORIZED_STORAGE: 如果您的存储服务器(例如 Nextcloud)使用自签名证书,请设置为 true 。默认为 false
  • GENERATE_FONTS: When true, regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to true.
    生成字体:当 true 时,在每次启动时重新生成字体列表、字体缩略图等。默认为 true
  • METRICS_ENABLED: Specifies the enabling StatsD for ONLYOFFICE Docs. Defaults to false.
    METRICS_ENABLED: 指定是否启用 ONLYOFFICE Docs 的 StatsD。默认为 false
  • METRICS_HOST: Defines StatsD listening host. Defaults to localhost.
    METRICS_HOST: 定义 StatsD 监听主机。默认为 localhost
  • METRICS_PORT: Defines StatsD listening port. Defaults to 8125.
    METRICS_PORT: 定义 StatsD 监听端口。默认为 8125
  • METRICS_PREFIX: Defines StatsD metrics prefix for backend services. Defaults to ds..
    METRICS_PREFIX: 为后端服务定义 StatsD 指标前缀。默认为 ds.
  • LETS_ENCRYPT_DOMAIN: Defines the domain for Let's Encrypt certificate.
    LETS_ENCRYPT_DOMAIN: 定义 Let's Encrypt 证书的域名。
  • LETS_ENCRYPT_MAIL: Defines the domain administrator mail address for Let's Encrypt certificate.
    LETSENCRYPT_MAIL:为 Let's Encrypt 证书定义域管理员邮件地址。

Installing ONLYOFFICE Docs integrated with ONLYOFFICE Groups and ONLYOFFICE Mail
安装仅包含 ONLYOFFICE Docs 集成的 ONLYOFFICE Groups 和 ONLYOFFICE Mail

ONLYOFFICE Docs is a part of ONLYOFFICE Workspace that comprises also ONLYOFFICE Community Server, ONLYOFFICE Control Panel and ONLYOFFICE Mail. In case you want to install all of them and integrate with each other, read these instructions.
ONLYOFFICE Docs 是 ONLYOFFICE Workspace 的一部分,还包括 ONLYOFFICE Community Server、ONLYOFFICE Control Panel 和 ONLYOFFICE Mail。如果您想安装它们并使它们相互集成,请阅读这些说明。

Alternative ways to install ONLYOFFICE Docs
安装 ONLYOFFICE Docs 的替代方法

Alternatively, you can use an automatic installation script to install the whole Workspace at once. For the mail server correct work you need to specify its hostname yourdomain.com.
或者,您可以使用自动安装脚本一次性安装整个 Workspace。为了使邮件服务器正常工作,您需要指定其主机名 yourdomain.com

STEP 1: Download the installation script file
步骤 1:下载安装脚本文件

Execute the following command:
执行以下命令:

wget https://download.onlyoffice.com/install/workspace-install.sh
    
STEP 2: Install Workspace
第二步:安装工作区

Run the following command to do that:
运行以下命令来执行此操作:

bash workspace-install.sh -md yourdomain.com
    

Or you can use docker-compose to install ONLYOFFICE Docs. See the instructions here on how to do that.
或者您可以使用 docker-compose 安装 ONLYOFFICE Docs。请参阅此处的说明以了解如何操作。

ONLYOFFICE Docs ipv6 setup
ONLYOFFICE Docs IPv6 设置

Works and is supported only for Linux hosts
仅适用于 Linux 主机并得到支持

Docker does not currently provide ipv6 addresses to containers by default. This function is experimental now.
Docker 目前默认情况下不会为容器提供 ipv6 地址。此功能目前处于实验阶段。

To set up interaction via ipv6, you need to enable support for this feature in your Docker. For this you need:
要通过 ipv6 设置交互,您需要在 Docker 中启用对此功能的支持。为此,您需要:

  • create the /etc/docker/daemon.json file with the following content:
    创建包含以下内容的 /etc/docker/daemon.json 文件:
    {
    "ipv6": true,
    "fixed-cidr-v6": "2001:db8:abc1::/64"
    }
  • restart docker with the following command: systemctl restart docker
    使用以下命令重新启动 docker: systemctl restart docker

After that, all running containers receive an ipv6 address and have an inet6 interface.
之后,所有正在运行的容器都会获得一个 IPv6 地址,并拥有一个 inet6 接口。

You can check your default bridge network and see the field there EnableIPv6=true. A new ipv6 subnet will also be added.
您可以检查您的默认桥接网络,并查看那里的字段 EnableIPv6=true 。还将添加一个新的 IPv6 子网。

For more information, visit the official Docker manual site
有关更多信息,请访问官方 Docker 手册网站

How to deploy ONLYOFFICE Docs on your server using Docker
Close
Download  下载 Host on your own server
在您自己的服务器上托管
Available for  可用于
Docker, Windows and Linux
Docker,Windows 和 Linux