{"id":550,"date":"2020-06-13T05:57:58","date_gmt":"2020-06-12T21:57:58","guid":{"rendered":"https:\/\/freeapp.sbs\/blog\/?p=550"},"modified":"2025-04-01T16:44:44","modified_gmt":"2025-04-01T07:44:44","slug":"qcbjyu6nqawetfj","status":"publish","type":"post","link":"https:\/\/eternalsphere.net\/echoes\/index.php\/2020\/06\/13\/qcbjyu6nqawetfj\/","title":{"rendered":"Installing Document Server for Docker on a local server"},"content":{"rendered":"<p>\u539f\u6587\uff1a<a href=\"https:\/\/helpcenter.onlyoffice.com\/server\/docker\/document\/docker-installation.aspx\">https:\/\/helpcenter.onlyoffice.com\/server\/docker\/document\/docker-installation.aspx<\/a><\/p>\n<div class=\"video_ground video_trips\">\n<h2 id=\"introduction\">Introduction<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<p><b>Document Server<\/b>\u00a0is 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.<\/p>\n<p><b>Functionality<\/b><\/p>\n<ul>\n<li>Document Editor<\/li>\n<li>Spreadsheet Editor<\/li>\n<li>Presentation Editor<\/li>\n<li>Documents application for iOS and Android<\/li>\n<li>Collaborative editing<\/li>\n<li>Hieroglyph support<\/li>\n<li>Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML<\/li>\n<\/ul>\n<div class=\"community_display\">\n<p>Integrating it with\u00a0<b>Community Server<\/b>\u00a0you will be able to:<\/p>\n<ul>\n<li>view and edit files stored on Drive, Box, Dropbox, OneDrive, OwnCloud connected to ONLYOFFICE;<\/li>\n<li>share files;<\/li>\n<li>embed documents on a website;<\/li>\n<li>manage access rights to documents.<\/li>\n<\/ul>\n<\/div>\n<p>This guide will show you how to install\u00a0<b>Document Server<\/b>\u00a0Docker version to your machine.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"SystemRequirements\">System requirements<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<ul>\n<li>\n<div class=\"sysreq_title sysreq_cpu\">CPU<\/div>\n<div class=\"sysreq_descr sysreq_cpu\">dual core\u00a0<b>2 GHz<\/b>\u00a0or better<\/div>\n<\/li>\n<li>\n<div class=\"sysreq_title sysreq_ram\">RAM<\/div>\n<div class=\"sysreq_descr sysreq_ram\"><b>2 GB<\/b>\u00a0or more<\/div>\n<\/li>\n<li>\n<div class=\"sysreq_title sysreq_hdd\">HDD<\/div>\n<div class=\"sysreq_descr sysreq_hdd\">at least\u00a0<b>40 GB<\/b>\u00a0of free space<\/div>\n<\/li>\n<li>\n<div class=\"sysreq_title sysreq_add_hard\">Additional requirements<\/div>\n<div class=\"sysreq_descr sysreq_add_hard\">at least\u00a0<b>4 GB<\/b>\u00a0of swap<\/div>\n<\/li>\n<li>\n<div class=\"sysreq_title sysreq_os\">OS<\/div>\n<div class=\"sysreq_descr sysreq_os\"><b>amd64<\/b>\u00a0Linux distribution with kernel version\u00a0<b>3.10<\/b>\u00a0or later<\/div>\n<\/li>\n<li>\n<div class=\"sysreq_title sysreq_add_soft\">Additional requirements<\/div>\n<ul class=\"sysreq_add_soft\">\n<li class=\"sysreq_block\"><b>Docker<\/b>: version\u00a0<b>1.10<\/b>\u00a0or later<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h2 id=\"Installing\">Installing Document Server<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<div class=\"notehelp\">You need the latest Docker version installed. If you do not have it, please see the\u00a0<a href=\"http:\/\/docs.docker.com\/installation\/#installation\" target=\"_blank\" rel=\"noopener noreferrer\">Installation section<\/a>\u00a0on Docker website to learn how to get it.<\/div>\n<div class=\"notehelp\">Docker specifies Google DNS servers by default. If your\u00a0<b>Document Server<\/b>\u00a0is 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\u00a0<code>\/etc\/default\/docker<\/code>\u00a0file and change the IP address in the following line to the IP address of a DNS server in your local network:<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">docker_OPTS<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"--dns 8.8.8.8\"<\/span><\/code><\/pre>\n<p>For the RPM based operating systems like CentOS, the configuration file can be located here:\u00a0<code>\/etc\/docker\/daemon.json<\/code><\/p>\n<\/div>\n<p>After you have Docker installed, run it and execute the following command:<\/p>\n<div class=\"community_display\">\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">sudo docker run <\/span><span class=\"pun\">-<\/span><span class=\"pln\">i <\/span><span class=\"pun\">-<\/span><span class=\"pln\">t <\/span><span class=\"pun\">-<\/span><span class=\"pln\">d <\/span><span class=\"pun\">-<\/span><span class=\"pln\">p <\/span><span class=\"lit\">80<\/span><span class=\"pun\">:<\/span><span class=\"lit\">80<\/span> <span class=\"pun\">--<\/span><span class=\"pln\">restart<\/span><span class=\"pun\">=<\/span><span class=\"pln\">always onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">documentserver<\/span><\/code><\/pre>\n<\/div>\n<p class=\"community_display\">Use this command if you wish to install\u00a0<b>Document Server<\/b>\u00a0separately. To install\u00a0<b>Document Server<\/b>\u00a0integrated with\u00a0<b>Community<\/b>\u00a0and\u00a0<b>Mail Servers<\/b>, refer to the corresponding instructions below.<\/p>\n<div class=\"notehelp\">By default\u00a0<b>Document Server<\/b>\u00a0listens to the incoming connections using port\u00a0<b>80<\/b>. Starting with version\u00a0<b>4.3<\/b>\u00a0you can change the port for\u00a0<b>Document Server<\/b>\u00a0if you plan to use it instead of the default one. This can be easily done changing the mapping port during the installation:<\/p>\n<div class=\"community_display\">\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">sudo docker run <\/span><span class=\"pun\">-<\/span><span class=\"pln\">i <\/span><span class=\"pun\">-<\/span><span class=\"pln\">t <\/span><span class=\"pun\">-<\/span><span class=\"pln\">d <\/span><span class=\"pun\">-<\/span><span class=\"pln\">p <\/span><span class=\"pun\">&lt;<\/span><span class=\"pln\">PORT_NUMBER<\/span><span class=\"pun\">&gt;:<\/span><span class=\"lit\">80<\/span> <span class=\"pun\">--<\/span><span class=\"pln\">restart<\/span><span class=\"pun\">=<\/span><span class=\"pln\">always onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">documentserver<\/span><\/code><\/pre>\n<\/div>\n<p>Where\u00a0<code>&lt;PORT_NUMBER&gt;<\/code>\u00a0is the number of port you want\u00a0<b>Document Server<\/b>\u00a0to use.<\/div>\n<p>This will install\u00a0<b>Document Server<\/b>\u00a0and all the dependencies it needs (the list of what is being done by the script can be found\u00a0<a href=\"https:\/\/github.com\/ONLYOFFICE\/Docker-DocumentServer\/blob\/master\/Dockerfile\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>).<\/p>\n<\/div>\n<\/div>\n<h2 id=\"StoringData\">Storing data outside containers<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<p>All the data are stored in the specially-designated directories,\u00a0<b>data volumes<\/b>, at the following location:<\/p>\n<ul>\n<li><code>\/var\/log\/onlyoffice<\/code>\u00a0for\u00a0<b>Document Server<\/b>\u00a0logs<\/li>\n<li><code>\/var\/www\/onlyoffice\/Data<\/code>\u00a0for certificates<\/li>\n<li><code>\/var\/lib\/onlyoffice<\/code>\u00a0for file cache<\/li>\n<li><code>\/var\/lib\/postgresql<\/code>\u00a0for database<\/li>\n<\/ul>\n<div class=\"notehelp nh_important\"><span class=\"important_notice_label\">We recommend<\/span>We strongly recommend that you store the data outside the Docker containers on the host machine as it allows you to easily update\u00a0<b>Document Server<\/b>\u00a0once the new version is released without losing your data.<\/div>\n<p>To get access to your data located outside the container, you need to mount the volumes. It can be done by specifying the\u00a0<b>-v<\/b>\u00a0option in the docker run command.<\/p>\n<div class=\"community_display\">\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">sudo docker run <\/span><span class=\"pun\">-<\/span><span class=\"pln\">i <\/span><span class=\"pun\">-<\/span><span class=\"pln\">t <\/span><span class=\"pun\">-<\/span><span class=\"pln\">d <\/span><span class=\"pun\">-<\/span><span class=\"pln\">p <\/span><span class=\"lit\">80<\/span><span class=\"pun\">:<\/span><span class=\"lit\">80<\/span> <span class=\"pun\">--<\/span><span class=\"pln\">restart<\/span><span class=\"pun\">=<\/span><span class=\"pln\">always \\\n    <\/span><span class=\"pun\">-<\/span><span class=\"pln\">v <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">logs<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">log<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice  \\\n    <\/span><span class=\"pun\">-<\/span><span class=\"pln\">v <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">www<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">Data<\/span><span class=\"pln\">  \\\n    <\/span><span class=\"pun\">-<\/span><span class=\"pln\">v <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">lib<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">lib<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice \\\n    <\/span><span class=\"pun\">-<\/span><span class=\"pln\">v <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">db<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">lib<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">postgresql  onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">documentserver<\/span><\/code><\/pre>\n<\/div>\n<div class=\"notehelp\">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.<\/div>\n<p>Normally, you do not need to store container data because the container operation does not depend on its state. Saving data will be useful:<\/p>\n<ul>\n<li>for easy access to container data, such as logs;<\/li>\n<li>to remove the limit on the size of the data inside the container;<\/li>\n<li>when using services launched outside the container such as PostgreSQL, Redis, RabbitMQ.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h2 id=\"RunningHTTPS\">Running Document Server using HTTPS<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<div class=\"community_display\">\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">sudo docker run <\/span><span class=\"pun\">-<\/span><span class=\"pln\">i <\/span><span class=\"pun\">-<\/span><span class=\"pln\">t <\/span><span class=\"pun\">-<\/span><span class=\"pln\">d <\/span><span class=\"pun\">-<\/span><span class=\"pln\">p <\/span><span class=\"lit\">443<\/span><span class=\"pun\">:<\/span><span class=\"lit\">443<\/span> <span class=\"pun\">--<\/span><span class=\"pln\">restart<\/span><span class=\"pun\">=<\/span><span class=\"pln\">always \\\n<\/span><span class=\"pun\">-<\/span><span class=\"pln\">v <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">:<\/span><span class=\"str\">\/var\/<\/span><span class=\"pln\">www<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">Data<\/span><span class=\"pln\">  onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">documentserver<\/span><\/code><\/pre>\n<\/div>\n<p>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.<\/p>\n<p>To secure the application via SSL basically two things are needed:<\/p>\n<ul>\n<li><b>Private key (.key)<\/b><\/li>\n<li><b>SSL certificate (.crt)<\/b><\/li>\n<\/ul>\n<p>So you need to create and install the following files:<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"str\">\/app\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key\n<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">crt<\/span><\/code><\/pre>\n<p>When using CA certified certificates, these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself. Skip the following section if you are have CA certified SSL certificates.<\/p>\n<h5>Generation of self signed certificates<\/h5>\n<p>Generation of self-signed SSL certificates involves a simple 3 step procedure<\/p>\n<h6><b>STEP 1<\/b>: Create the server private key<\/h6>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">openssl genrsa <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">out<\/span><span class=\"pln\"> onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key <\/span><span class=\"lit\">2048<\/span><\/code><\/pre>\n<h6><b>STEP 2<\/b>: Create the certificate signing request (CSR)<\/h6>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">openssl req <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">new<\/span> <span class=\"pun\">-<\/span><span class=\"pln\">key onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">out<\/span><span class=\"pln\"> onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">csr<\/span><\/code><\/pre>\n<h6><b>STEP 3<\/b>: Sign the certificate using the private key and CSR<\/h6>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">openssl x509 <\/span><span class=\"pun\">-<\/span><span class=\"pln\">req <\/span><span class=\"pun\">-<\/span><span class=\"pln\">days <\/span><span class=\"lit\">365<\/span> <span class=\"pun\">-<\/span><span class=\"kwd\">in<\/span><span class=\"pln\"> onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">csr <\/span><span class=\"pun\">-<\/span><span class=\"pln\">signkey onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">out<\/span><span class=\"pln\"> onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">crt<\/span><\/code><\/pre>\n<p>You have now generated an SSL certificate that&#8217;s valid for 365 days.<\/p>\n<h5>Strengthening the server security<\/h5>\n<p>This section provides you with instructions to\u00a0<a href=\"https:\/\/raymii.org\/s\/tutorials\/Strong_SSL_Security_On_nginx.html\" target=\"_blank\" rel=\"noopener noreferrer\">strengthen your server security<\/a>.<\/p>\n<p>To achieve this you need to generate stronger DHE parameters.<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">openssl dhparam <\/span><span class=\"pun\">-<\/span><span class=\"kwd\">out<\/span><span class=\"pln\"> dhparam<\/span><span class=\"pun\">.<\/span><span class=\"pln\">pem <\/span><span class=\"lit\">2048<\/span><\/code><\/pre>\n<h5>Installation of the SSL certificates<\/h5>\n<p>Out of the four files generated above, you need to install the\u00a0<code>onlyoffice.key<\/code>,\u00a0<code>onlyoffice.crt<\/code>\u00a0and\u00a0<code>dhparam.pem<\/code>\u00a0files 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).<\/p>\n<p>The default path that the onlyoffice application is configured to look for the SSL certificates is at\u00a0<code>\/var\/www\/onlyoffice\/Data\/certs<\/code>, this can however be changed using the\u00a0<code>SSL_KEY_PATH<\/code>,\u00a0<code>SSL_CERTIFICATE_PATH<\/code>\u00a0and\u00a0<code>SSL_DHPARAM_PATH<\/code>\u00a0configuration options.<\/p>\n<p>The\u00a0<code>\/var\/www\/onlyoffice\/Data\/<\/code>\u00a0path is the path of the data store, which means that you have to create a folder named certs inside\u00a0<code>\/app\/onlyoffice\/DocumentServer\/data\/<\/code>\u00a0and copy the files into it and as a measure of security you will update the permission on the\u00a0<code>onlyoffice.key<\/code>\u00a0file to only be readable by the owner.<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">mkdir <\/span><span class=\"pun\">-<\/span><span class=\"pln\">p <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs\ncp onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">\ncp onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">crt <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">\ncp dhparam<\/span><span class=\"pun\">.<\/span><span class=\"pln\">pem <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">\nchmod <\/span><span class=\"lit\">400<\/span> <span class=\"pun\">\/<\/span><span class=\"pln\">app<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">\/<\/span><span class=\"typ\">DocumentServer<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">data<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">certs<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">onlyoffice<\/span><span class=\"pun\">.<\/span><span class=\"pln\">key<\/span><\/code><\/pre>\n<p>And restart Docker container:<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">sudo docker restart <\/span><span class=\"pun\">{{<\/span><span class=\"pln\">DOCUMENT_SERVER_ID<\/span><span class=\"pun\">}}<\/span><\/code><\/pre>\n<p>You are now just one step away from having our application secured.<\/p>\n<h5>Available configuration parameters<\/h5>\n<div class=\"notehelp\">Please refer the docker run command options for the\u00a0<code>--env-file<\/code>\u00a0flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.<\/div>\n<p>Below is the complete list of parameters that can be set using environment variables.<\/p>\n<ul>\n<li><b>ONLYOFFICE_HTTPS_HSTS_ENABLED<\/b>: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to\u00a0<code>true<\/code>.<\/li>\n<li><b>ONLYOFFICE_HTTPS_HSTS_MAXAGE<\/b>: Advanced configuration option for setting the HSTS max-age in the onlyoffice NGINX vHost configuration. Applicable only when SSL is in use. Defaults to\u00a0<code>31536000<\/code>.<\/li>\n<li><b>SSL_CERTIFICATE_PATH<\/b>: The path to the SSL certificate to use. Defaults to\u00a0<code>\/var\/www\/onlyoffice\/Data\/certs\/onlyoffice.crt<\/code>.<\/li>\n<li><b>SSL_KEY_PATH<\/b>: The path to the SSL certificate private key. Defaults to\u00a0<code>\/var\/www\/onlyoffice\/Data\/certs\/onlyoffice.key<\/code>.<\/li>\n<li><b>SSL_DHPARAM_PATH<\/b>: The path to the Diffie-Hellman parameter. Defaults to\u00a0<code>\/var\/www\/onlyoffice\/Data\/certs\/dhparam.pem<\/code>.<\/li>\n<li><b>SSL_VERIFY_CLIENT<\/b>: Enable verification of client certificates using the\u00a0<code>CA_CERTIFICATES_PATH file<\/code>. Defaults to\u00a0<code>false<\/code>.<\/li>\n<li><b>POSTGRESQL_SERVER_HOST<\/b>: The IP address or the name of the host where the PostgreSQL server is running.<\/li>\n<li><b>POSTGRESQL_SERVER_PORT<\/b>: The PostgreSQL server port number.<\/li>\n<li><b>POSTGRESQL_SERVER_DB_NAME<\/b>: The name of a PostgreSQL database to be created on the image startup.<\/li>\n<li><b>POSTGRESQL_SERVER_USER<\/b>: The new user name with superuser permissions for the PostgreSQL account.<\/li>\n<li><b>POSTGRESQL_SERVER_PASS<\/b>: The password set for the PostgreSQL account.<\/li>\n<li><b>AMQP_SERVER_URL<\/b>: The\u00a0<a href=\"http:\/\/www.rabbitmq.com\/uri-spec.html\" target=\"_blank\" rel=\"noopener noreferrer\">AMQP URL<\/a>\u00a0to connect to the message broker server.<\/li>\n<li><b>AMQP_SERVER_TYPE<\/b>: The message broker type. Supported values are\u00a0<code>rabbitmq<\/code>\u00a0or\u00a0<code>activemq<\/code>. Defaults to\u00a0<code>rabbitmq<\/code>.<\/li>\n<li><b>REDIS_SERVER_HOST<\/b>: The IP address or the name of the host where the Redis server is running.<\/li>\n<li><b>REDIS_SERVER_PORT<\/b>: The Redis server port number.<\/li>\n<li><b>NGINX_WORKER_PROCESSES<\/b>: Defines the number of NGINX worker processes.<\/li>\n<li><b>NGINX_WORKER_CONNECTIONS<\/b>: Sets the maximum number of simultaneous connections that can be opened by a NGINX worker process.<\/li>\n<li><b>JWT_ENABLED<\/b>: Specifies the enabling the JSON web token validation by\u00a0<b>Document Server<\/b>. Defaults to\u00a0<code>false<\/code>.<\/li>\n<li><b>JWT_SECRET<\/b>: Defines the secret key to validate the JSON web token in the request to\u00a0<b>Document Server<\/b>. Defaults to\u00a0<code>secret<\/code>.<\/li>\n<li><b>JWT_HEADER<\/b>: Defines the HTTP header that will be used to send the JSON web token. Defaults to\u00a0<code>Authorization<\/code>.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"community_display\">\n<h2 id=\"IntegratedInstallation\">Installing Document Server integrated with Community and Mail Servers<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<p><b>Document Server<\/b>\u00a0is a part of\u00a0<b>ONLYOFFICE Community Edition<\/b>\u00a0that comprises also\u00a0<b>Community Server<\/b>\u00a0and\u00a0<b>Mail Server<\/b>. In case you want to install all of them and integrate with each other, read\u00a0<a href=\"https:\/\/helpcenter.onlyoffice.com\/server\/docker\/document\/install-integrated.aspx\">these instructions<\/a>.<\/p>\n<\/div>\n<\/div>\n<h2 id=\"AlternativeInstallation\">Alternative ways to install Document Server<\/h2>\n<div class=\"block_of_step\">\n<div class=\"screen_text\">\n<p>Alternatively, you can use an automatic installation script to install the whole\u00a0<b>Community Edition<\/b>\u00a0at once. For the mail server correct work you need to specify its hostname\u00a0<code>yourdomain.com<\/code>.<\/p>\n<h6><b>STEP 1<\/b>: Download the installation script file<\/h6>\n<p>Assuming you have docker-compose installed, execute the following command:<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">wget https<\/span><span class=\"pun\">:<\/span><span class=\"com\">\/\/download.onlyoffice.com\/install\/opensource-install.sh<\/span><\/code><\/pre>\n<h6><b>STEP 2<\/b>: Install Community Edition<\/h6>\n<p>Run the following command to do that:<\/p>\n<pre class=\"prettyprint prettyprinted\"><code><span class=\"pln\">bash opensource<\/span><span class=\"pun\">-<\/span><span class=\"pln\">install<\/span><span class=\"pun\">.<\/span><span class=\"pln\">sh <\/span><span class=\"pun\">-<\/span><span class=\"pln\">md yourdomain<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><\/code><\/pre>\n<p>Or you can use\u00a0<a href=\"https:\/\/docs.docker.com\/compose\/install\/#installing-compose\" target=\"_blank\" rel=\"noopener noreferrer\">docker-compose<\/a>\u00a0to install\u00a0<b>Document Server<\/b>. See the\u00a0<a href=\"https:\/\/helpcenter.onlyoffice.com\/server\/docker\/document\/docker-compose.aspx\">instructions here<\/a>\u00a0on how to do that.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1ahttps:\/\/helpcenter.onlyoffice.com\/server\/docker\/document\/docker-installation.aspx Introduction Document Server\u00a0is 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. Functionality Document Editor Spreadsheet Editor Presentation Editor Documents application for iOS and Android Collaborative editing Hieroglyph &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-550","post","type-post","status-publish","format-standard","hentry","category-m3fjs7w9sd6njwr"],"_links":{"self":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/comments?post=550"}],"version-history":[{"count":1,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/550\/revisions"}],"predecessor-version":[{"id":2216,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/550\/revisions\/2216"}],"wp:attachment":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/media?parent=550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/categories?post=550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/tags?post=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}