# OnlyOffice

Aplicativo de edição e colaboração

# OnlyOffice Workspace

Aplicativos de colaboração

# Instalação e Configurações OnlyOffice Workspace

Link: [https://helpcenter.onlyoffice.com/workspace/installation/workspace-install-docker-compose.aspx](https://helpcenter.onlyoffice.com/workspace/installation/workspace-install-docker-compose.aspx)

Em 02/04/2026

#### Installing ONLYOFFICE Workspace Community using Docker Compose

#### Introduction<button class="anchor-copy-btn" title="Copy link to section"></button>

If you need to quickly install the **ONLYOFFICE Workspace Community**, then the installation via Docker Compose will suit you. Please, follow the steps below to launch all components of **ONLYOFFICE Workspace Community** at once.

<div id="bkmrk-" style="text-align: justify;"><div class="sc-293ceaa4-0 eOwGAp"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--1"></div></div></div></div>#### Step 1. Install Docker Compose<button class="anchor-copy-btn" title="Copy link to section"></button>

Visit the official [Docker Compose](https://docs.docker.com/compose/install/#installing-compose) page and follow the installation instructions.

<div id="bkmrk--2" style="text-align: justify;"><div class="sc-293ceaa4-0 eOwGAp"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--3"></div></div></div></div>#### Step 2. Clone the GitHub repository<button class="anchor-copy-btn" title="Copy link to section"></button>

After Docker Compose has been installed, need to clone the [GitHub repository](https://github.com/ONLYOFFICE/Docker-CommunityServer/):

```
git clone https://github.com/ONLYOFFICE/Docker-CommunityServer<button class="copy-code-btn"></button>
```

<div id="bkmrk--4" style="text-align: justify;"><div class="sc-293ceaa4-0 eOwGAp"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--5"></div></div></div></div>#### Step 3. Install ONLYOFFICE Workspace Community<button class="anchor-copy-btn" title="Copy link to section"></button>

Then you need to switch to the repository folder:

```
cd Docker-CommunityServer<button class="copy-code-btn"></button>
```

For the mail server correct work, open one of the files depending on the product you use:

<div id="bkmrk-docker-compose.group" style="text-align: justify;"><div class="sc-293ceaa4-0 eOwGAp"><div class="raw-html-embed"><div class="gs_content">- [docker-compose.groups.yml file](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.groups.yml) for Community Server (distributed as ONLYOFFICE Groups)
- [docker-compose.workspace.yml file](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace.yml) for ONLYOFFICE Workspace Community
- [docker-compose.workspace\_enterprise.yml file](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace_enterprise.yml) for ONLYOFFICE Workspace Enterprise

</div></div></div></div>For working on Ubuntu 22.04 and Debian 11 or later, you need to use docker-compose versions v2.16.0 or later and uncomment the cgroup line in the yml file.

Then replace the `${MAIL_SERVER_HOSTNAME}` variable with your own hostname for the **Mail Server**. After that, assuming you have docker-compose installed, execute the following command specifying the necessary yml file:

```
docker-compose -f docker-compose.workspace.yml up -d<button class="copy-code-btn"></button>
```

To find out more options of **ONLYOFFICE Workspace Community** installation using Docker, visit [this](https://helpcenter.onlyoffice.com/workspace/installation/workspace-install-docker.aspx) page.

<div id="bkmrk--6" style="text-align: justify;"><div class="sc-293ceaa4-0 eOwGAp"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--7"></div></div></div></div>##### Host ONLYOFFICE Workspace on your own server

##### [Download](https://www.onlyoffice.com/download-workspace?from=helpcenter)

# Instalação e Configurações OnlyOffice Workspace Github

Link: [https://github.com/ONLYOFFICE/Docker-CommunityServer](https://github.com/ONLYOFFICE/Docker-CommunityServer)  
git clone [https://github.com/ONLYOFFICE/Docker-CommunityServer.git](https://github.com/ONLYOFFICE/Docker-CommunityServer.git)

**Última versão do OnlyOffice Workspace v4.17.0.1936 publicada em 30/10/2024**

[![https://www.onlyoffice.com/](https://camo.githubusercontent.com/4629f71377a0504a8fb26d8c530d379ea04f7011afadf7ab06a67c71c2c4c6bf/68747470733a2f2f7374617469632d7777772e6f6e6c796f66666963652e636f6d2f696d616765732f6c6f676f5f736d616c6c2e737667)](https://www.onlyoffice.com/)

---

[Website](https://www.onlyoffice.com/) | [ONLYOFFICE Workspace](https://www.onlyoffice.com/workspace.aspx) | [Documentation](https://helpcenter.onlyoffice.com/) | [API](https://api.onlyoffice.com/) | [About](https://www.onlyoffice.com/about.aspx)

[![https://www.facebook.com/ONLYOFFICE-833032526736775/](https://camo.githubusercontent.com/52a364bca2c5d33b8afb1f3fa6ab51d43e8142343754506f9f33c0a28118089c/68747470733a2f2f646f776e6c6f61642e6f6e6c796f66666963652e636f6d2f6173736574732f6c6f676f2f6f70656e736f757263652f66622e706e67)](https://www.facebook.com/ONLYOFFICE-833032526736775/) [![https://twitter.com/ONLY_OFFICE](https://camo.githubusercontent.com/fac0e9dcb8533b9f1541f8283f2847dc87720214bde21163a8cc433cad8a1a3b/68747470733a2f2f646f776e6c6f61642e6f6e6c796f66666963652e636f6d2f6173736574732f6c6f676f2f6f70656e736f757263652f74772e706e67)](https://twitter.com/ONLY_OFFICE) [![https://www.youtube.com/user/onlyofficeTV](https://camo.githubusercontent.com/7206e8429dbdce7aa4f98d3a627c60d61f04d77beaead7bb5a1060f672861b9c/68747470733a2f2f646f776e6c6f61642e6f6e6c796f66666963652e636f6d2f6173736574732f6c6f676f2f6f70656e736f757263652f79742e706e67)](https://www.youtube.com/user/onlyofficeTV) [![https://www.instagram.com/the_onlyoffice/](https://camo.githubusercontent.com/1007fc3373061185ac5b18d03971fb2c5b68a3b20271ecb119544b580f35e27f/68747470733a2f2f646f776e6c6f61642e6f6e6c796f66666963652e636f6d2f6173736574732f6c6f676f2f6f70656e736f757263652f696e2e706e67)](https://www.instagram.com/the_onlyoffice/)

[![http://www.apache.org/licenses/LICENSE-2.0](https://camo.githubusercontent.com/1e81c0e32e30a3ae85bc358476be25930966d94a44292390c2c77e8f3a0759ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d41706163686525323076322e302d677265656e2e7376673f7374796c653d666c6174)](http://www.apache.org/licenses/LICENSE-2.0) [![https://github.com/ONLYOFFICE/CommunityServer/releases](https://camo.githubusercontent.com/93967043688e6f7943f512e12d64e9f74f5b63585d525b0e8cce143134f953da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d31312e302e302d626c75652e737667)](https://github.com/ONLYOFFICE/CommunityServer/releases)

- [Overview](https://github.com/ONLYOFFICE/Docker-CommunityServer#overview)
- [Functionality](https://github.com/ONLYOFFICE/Docker-CommunityServer#functionality)
- [Recommended System Requirements](https://github.com/ONLYOFFICE/Docker-CommunityServer#recommended-system-requirements)
- [Installing Prerequisites](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-prerequisites)
- [Installing MySQL](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-mysql)
- [Installing Community Server](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-community-server)
- [Configuring Docker Image](https://github.com/ONLYOFFICE/Docker-CommunityServer#configuring-docker-image)
    - [Storing Data](https://github.com/ONLYOFFICE/Docker-CommunityServer#storing-data)
    - [Running ONLYOFFICE Community Server on Different Port](https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-on-different-port)
    - [Exposing Additional Ports](https://github.com/ONLYOFFICE/Docker-CommunityServer#exposing-additional-ports)
    - [Running ONLYOFFICE Community Server using HTTPS](https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-using-https)
        - [Using the automatically generated Let's Encrypt SSL Certificates](https://github.com/ONLYOFFICE/Docker-CommunityServer#using-the-automatically-generated-lets-encrypt-ssl-certificates)
        - [Generation of Self Signed Certificates](https://github.com/ONLYOFFICE/Docker-CommunityServer#generation-of-self-signed-certificates)
        - [Strengthening the Server Security](https://github.com/ONLYOFFICE/Docker-CommunityServer#strengthening-the-server-security)
        - [Installation of the SSL Certificates](https://github.com/ONLYOFFICE/Docker-CommunityServer#installation-of-the-ssl-certificates)
        - [Available Configuration Parameters](https://github.com/ONLYOFFICE/Docker-CommunityServer#available-configuration-parameters)
- [Installing ONLYOFFICE Workspace](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-onlyoffice-workspace)
- [Upgrading ONLYOFFICE Community Server](https://github.com/ONLYOFFICE/Docker-CommunityServer#upgrading-onlyoffice-community-server)
- [Connecting Your Own Modules](https://github.com/ONLYOFFICE/Docker-CommunityServer#connecting-your-own-modules)
- [Project Information](https://github.com/ONLYOFFICE/Docker-CommunityServer#project-information)
- [User Feedback and Support](https://github.com/ONLYOFFICE/Docker-CommunityServer#user-feedback-and-support)

## Overview

<div class="markdown-heading" dir="auto" id="bkmrk--4" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#overview)</div>ONLYOFFICE Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and email correspondence, all in one place.

Starting from version 11.0 Community Server, is distributed as ONLYOFFICE Groups on terms of Apache License.

## Functionality

<div class="markdown-heading" dir="auto" id="bkmrk--6" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#functionality)</div>- Cross platform solution: Linux, Windows
- Document management
- Integration with Google Drive, Box, Dropbox, OneDrive, OwnCloud
- File sharing
- Document embedding
- Access rights management
- Customizable CRM
- Web-to-lead form
- Invoicing system
- Project Management
- Gantt Chart
- Milestones, task dependencies and subtasks
- Time tracking
- Automated reports
- Blogs, forums, polls, wiki
- Calendar
- Email Aggregator
- People module (employee database)
- Support of more than 20 languages

Community Server (distributed as ONLYOFFICE Groups) is a part of **ONLYOFFICE Workspace** that also includes [Document Server (distributed as ONLYOFFICE Docs)](https://github.com/ONLYOFFICE/DocumentServer), [Mail Server](https://github.com/ONLYOFFICE/Docker-MailServer), [Talk (instant messaging app)](https://github.com/ONLYOFFICE/XMPPServer).

Control Panel for administrating **ONLYOFFICE Workspace** can be found in [this repo](https://github.com/ONLYOFFICE/ControlPanel).

## Recommended System Requirements

<div class="markdown-heading" dir="auto" id="bkmrk--8" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#recommended-system-requirements)</div>- **RAM**: 4 GB or more
- **CPU**: dual-core 2 GHz or higher
- **Swap file**: at least 2 GB
- **HDD**: at least 2 GB of free space
- **Distributive**: 64-bit Red Hat, CentOS or other compatible distributive with kernel version 3.8 or later, 64-bit Debian, Ubuntu or other compatible distributive with kernel version 3.8 or later
- **Docker**: version 1.9.0 or later

## Installing Prerequisites

<div class="markdown-heading" dir="auto" id="bkmrk--10" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-prerequisites)</div>Before you start **ONLYOFFICE Community Server**, you need to create the following folders:

1. For MySQL server

```
sudo mkdir -p "/app/onlyoffice/mysql/conf.d";
sudo mkdir -p "/app/onlyoffice/mysql/data";
sudo mkdir -p "/app/onlyoffice/mysql/initdb";

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--12" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>2. For **Community Server** data and logs

```
sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
sudo mkdir -p "/app/onlyoffice/CommunityServer/letsencrypt";

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--13" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>3. For **Document server** data and logs

```
sudo mkdir -p "/app/onlyoffice/DocumentServer/data";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs";

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--14" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>4. And for **Mail Server** data and logs

```
sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
sudo mkdir -p "/app/onlyoffice/MailServer/logs";

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--15" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>5. For **Control Panel**:

```
sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--16" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Then create the `onlyoffice` network:

```
sudo docker network create --driver bridge onlyoffice

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--17" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>## Installing MySQL

<div class="markdown-heading" dir="auto" id="bkmrk--18" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-mysql)</div>After that you need to create MySQL server Docker container. Create the configuration file:

```
echo "[mysqld]
sql_mode = 'NO_ENGINE_SUBSTITUTION'
max_connections = 1000
max_allowed_packet = 1048576000
group_concat_max_len = 2048" > /app/onlyoffice/mysql/conf.d/onlyoffice.cnf

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--20" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Create the SQL script which will generate the users and issue the rights to them. The `onlyoffice_user` is required for **ONLYOFFICE Community Server**, and the `mail_admin` is required for **ONLYOFFICE Mail Server** in case it is going to be installed:

```
echo "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'my-secret-pw';
CREATE USER IF NOT EXISTS 'onlyoffice_user'@'%' IDENTIFIED WITH mysql_native_password BY 'onlyoffice_pass';
CREATE USER IF NOT EXISTS 'mail_admin'@'%' IDENTIFIED WITH mysql_native_password BY 'Isadmin123';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'onlyoffice_user'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'mail_admin'@'%';
FLUSH PRIVILEGES;" > /app/onlyoffice/mysql/initdb/setup.sql

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--21" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>*Please note, that the above script will set permissions to access SQL server from any domains (`%`). If you want to limit the access, you can specify hosts which will have access to SQL server.*

Now you can create MySQL container setting MySQL version to 8.0.29:

```
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_DATABASE=onlyoffice \
 mysql:8.0.29

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--22" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>## Installing Community Server

<div class="markdown-heading" dir="auto" id="bkmrk--23" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-community-server)</div>Use this command to install **ONLYOFFICE Community Server**:

```
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
 -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
 onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--25" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>## Configuring Docker Image

<div class="markdown-heading" dir="auto" id="bkmrk--26" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#configuring-docker-image)</div>### Storing Data

<div class="markdown-heading" dir="auto" id="bkmrk--28" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#storing-data)</div>All the data are stored in the specially-designated directories, **data volumes**, at the following location:

- **/var/log/onlyoffice** for ONLYOFFICE Community Server logs
- **/var/www/onlyoffice/Data** for ONLYOFFICE Community Server data
- **/etc/letsencrypt** for information on generated certificates

To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command.

```
sudo docker run -i -t -d -p 80:80 --cgroupns=host \
    -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
    -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
	-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
    -v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--30" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data.

### Running ONLYOFFICE Community Server on Different Port

<div class="markdown-heading" dir="auto" id="bkmrk--31" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-on-different-port)</div>To change the port, use the -p command. E.g.: to make your portal accessible via port 8080 execute the following command:

```
sudo docker run -i -t -d --privileged -p 8080:80 --cgroupns=host \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--33" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>### Exposing Additional Ports

<div class="markdown-heading" dir="auto" id="bkmrk--34" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#exposing-additional-ports)</div>The container ports to be exposed for **incoming connections** are the folloing:

- **80** for plain HTTP
- **443** when HTTPS is enabled (see below)
- **5222** for XMPP-compatible instant messaging client (for ONLYOFFICE Talk correct work)

You can expose ports by specifying the '-p' option in the docker run command.

```
sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--36" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>For **outgoing connections** you need to expose the following ports:

- **80** for HTTP
- **443** for HTTPS

Additional ports to be exposed for the mail client correct work:

- **25** for SMTP
- **465** for SMTPS
- **143** for IMAP
- **993** for IMAPS
- **110** for POP3
- **995** for POP3S

### Running ONLYOFFICE Community Server using HTTPS

<div class="markdown-heading" dir="auto" id="bkmrk--37" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-using-https)</div>```
sudo docker run -i -t -d -p 80:80  -p 443:443 \
    -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
    -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--39" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>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, a 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.

To secure the application via SSL basically two things are needed:

- **Private key (.key)**
- **SSL certificate (.crt)**

So you need to create and install the following files:

```
    /app/onlyoffice/CommunityServer/data/certs/onlyoffice.key
    /app/onlyoffice/CommunityServer/data/certs/onlyoffice.crt

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--40" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>When using CA certified certificates (e.g. [Let's Encrypt](https://letsencrypt.org/), these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself.

#### Using the automatically generated Let's Encrypt SSL Certificates

<div class="markdown-heading" dir="auto" id="bkmrk--41" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#using-the-automatically-generated-lets-encrypt-ssl-certificates)</div>```
sudo docker exec -it onlyoffice-community-server bash
bash /var/www/onlyoffice/Tools/letsencrypt.sh yourdomain.com subdomain1.yourdomain.com subdomain2.yourdomain.com

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--43" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Where `yourdomain.com` is the address of the domain where your ONLYOFFICE Workspace is installed, and `subdomain1.yourdomain.com` and `subdomain2.yourdomain.com` (and any other subdomains separated with a space) are the subdomains for the main domain which you use.

The script will automatically create and install the letsencrypt.org CA-signed certificate to your server and restart the NGINX service for the changes to take effect.

Now your portal should be available using the `https://` address.

#### Generation of Self Signed Certificates

<div class="markdown-heading" dir="auto" id="bkmrk--44" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#generation-of-self-signed-certificates)</div>Generation of self-signed SSL certificates involves a simple 3 step procedure.

**STEP 1**: Create the server private key

```
openssl genrsa -out onlyoffice.key 2048
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--46" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>**STEP 2**: Create the certificate signing request (CSR)

```
openssl req -new -key onlyoffice.key -out onlyoffice.csr
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--47" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>**STEP 3**: Sign the certificate using the private key and CSR

```
openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--48" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>You have now generated an SSL certificate that's valid for 365 days.

#### Strengthening the server security

<div class="markdown-heading" dir="auto" id="bkmrk--49" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#strengthening-the-server-security)</div>This section provides you with instructions to [strengthen your server security](https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html). To achieve this you need to generate stronger DHE parameters.

```
openssl dhparam -out dhparam.pem 2048
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--51" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>#### Installation of the SSL Certificates

<div class="markdown-heading" dir="auto" id="bkmrk--52" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#installation-of-the-ssl-certificates)</div>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).

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.

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/CommunityServer/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.

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

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--54" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>You are now just one step away from having our application secured.

#### Available Configuration Parameters

<div class="markdown-heading" dir="auto" id="bkmrk--55" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#available-configuration-parameters)</div>*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.*

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\_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`.
- **SSL\_CERTIFICATE\_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.crt`.
- **SSL\_KEY\_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.key`.
- **SSL\_DHPARAM\_PATH**: The path to the Diffie-Hellman parameter. Defaults to `/var/www/onlyoffice/Data/certs/dhparam.pem`.
- **SSL\_VERIFY\_CLIENT**: Enable verification of client certificates using the `CA_CERTIFICATES_PATH` file. Defaults to `false`
- **MYSQL\_SERVER\_HOST**: The IP address or the name of the host where the server is running.
- **MYSQL\_SERVER\_PORT**: The port number.
- **MYSQL\_SERVER\_DB\_NAME**: The name of a MySQL database to be created on image startup.
- **MYSQL\_SERVER\_USER**: The new user name with superuser permissions for the MySQL account.
- **MYSQL\_SERVER\_PASS**: The password set for the MySQL account.

## Installing ONLYOFFICE Workspace

<div class="markdown-heading" dir="auto" id="bkmrk--57" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-onlyoffice-workspace)</div>ONLYOFFICE Community Server is a part of ONLYOFFICE Community Edition that comprises also Document Server and Mail Server. To install them, follow these easy steps:

**STEP 1**: Create the `onlyoffice` network.

```
docker network create --driver bridge onlyoffice
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--59" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Then launch containers on it using the 'docker run --net onlyoffice' option:

**STEP 2**: Install MySQL.

Follow [these steps](https://github.com/ONLYOFFICE/Docker-CommunityServer#installing-mysql) to install MySQL server.

**STEP 3**: Generate JWT Secret

JWT secret defines the secret key to validate the JSON Web Token in the request to the **ONLYOFFICE Document Server**. You can specify it yourself or easily get it using the command:

```
JWT_SECRET=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 32);

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--60" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>**STEP 4**: Install ONLYOFFICE Document Server.

```
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \
 -e JWT_ENABLED=true \
 -e JWT_SECRET=${JWT_SECRET} \
 -e JWT_HEADER=AuthorizationJwt \
 -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
 -v /app/onlyoffice/DocumentServer/fonts:/usr/share/fonts/truetype/custom \
 -v /app/onlyoffice/DocumentServer/forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten \
 onlyoffice/documentserver
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--61" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>To learn more, refer to the [ONLYOFFICE Document Server documentation](https://github.com/ONLYOFFICE/Docker-DocumentServer "ONLYOFFICE Document Server documentation").

**STEP 5**: Install ONLYOFFICE Mail Server.

For the mail server correct work you need to specify its hostname 'yourdomain.com'. To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/Docker-MailServer "ONLYOFFICE Mail Server documentation").

```
sudo docker run --init --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
 -e MYSQL_SERVER=onlyoffice-mysql-server \
 -e MYSQL_SERVER_PORT=3306 \
 -e MYSQL_ROOT_USER=root \
 -e MYSQL_ROOT_PASSWD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver \
 -v /app/onlyoffice/MailServer/data:/var/vmail \
 -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
 -v /app/onlyoffice/MailServer/logs:/var/log \
 -h yourdomain.com \
 onlyoffice/mailserver
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--62" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>The additional parameters for mail server are available [here](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.yml#L75).

**STEP 6**: Install ONLYOFFICE Control Panel

```
docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-control-panel \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
-v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice onlyoffice/controlpanel
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--63" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>**STEP 7**: Install ONLYOFFICE Community Server

```
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
 -e DOCUMENT_SERVER_JWT_ENABLED=true \
 -e DOCUMENT_SERVER_JWT_SECRET=${JWT_SECRET} \
 -e DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt \
 -e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
 -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
 -e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
 -e MAIL_SERVER_DB_PORT=3306 \
 -e MAIL_SERVER_DB_USER=root \
 -e MAIL_SERVER_DB_PASS=my-secret-pw \
 -e CONTROL_PANEL_PORT_80_TCP=80 \
 -e CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
 -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
 onlyoffice/communityserver
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--64" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command:

```
MAIL_SERVER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server)

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--65" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Alternatively, you can use an automatic installation script to install ONLYOFFICE Workspace at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.

**STEP 1**: Download the ONLYOFFICE Workspace Docker script file

```
wget https://download.onlyoffice.com/install/workspace-install.sh
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--66" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>**STEP 2**: Install ONLYOFFICE Workspace executing the following command:

```
workspace-install.sh -md yourdomain.com
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--67" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Or use [docker-compose](https://docs.docker.com/compose/install "docker-compose").

First you need to clone this [GitHub repository](https://github.com/ONLYOFFICE/Docker-CommunityServer/):

```
git clone https://github.com/ONLYOFFICE/Docker-CommunityServer
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--68" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>After that switch to the repository folder:

```
cd Docker-CommunityServer
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--69" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>For the mail server correct work, you need to set a variable with your own hostname for the **Mail Server**:

```
export MAIL_SERVER_HOSTNAME="your-own-hostname"
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--70" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>After that, assuming you have docker-compose version 2.16.0 or later installed, execute the following command:

```
docker-compose -f docker-compose.workspace_enterprise.yml up -d
```

<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" id="bkmrk--71" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>The instructions for running ONLYOFFICE Workspace Enterprise Edition are used as an example, if you need to run a different version, specify a different file:

- [docker-compose.groups.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.groups.yml) for Community Server (distributed as ONLYOFFICE Groups)
- [docker-compose.workspace.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace.yml) for ONLYOFFICE Workspace Community Edition
- [docker-compose.workspace\_enterprise.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace_enterprise.yml) for ONLYOFFICE Workspace Enterprise Edition

## Upgrading ONLYOFFICE Community Server

<div class="markdown-heading" dir="auto" id="bkmrk--72" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#upgrading-onlyoffice-community-server)</div>To upgrade to a newer release, please follow these easy steps:

**STEP 1**: Make sure that all the container volumes are mounted following the **Storing Data** section instructions:

```
sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' {{COMMUNITY_SERVER_ID}} 

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--74" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>where {{COMMUNITY\_SERVER\_ID}} stands for a container name or ID

**STEP 2** Remove the current container sudo docker rm -f {{COMMUNITY\_SERVER\_ID}}

**STEP 3** Remove the current image sudo docker rmi -f $(sudo docker images | grep onlyoffice/communityserver | awk '{ print $3 }')

**STEP 4** Run the new image with the same map paths

```
sudo docker run -i -t -d --privileged -p 80:80 --cgroupns=host \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
-e MYSQL_SERVER_USER=onlyoffice_user \
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice  \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--75" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>*This will update **Community Server** container only and will not connect **Document Server** and **Mail Server** to it. You will need to use the additional parameters (like those used during installation) to connect them.*

Or you can use ONLYOFFICE Workspace script file to upgrade your current installation:

```
bash workspace-install.sh -u true

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--76" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>It will update all the installed components automatically. If you want to update **Community Server** only, use the following command:

```
bash workspace-install.sh -u true -cv 9.1.0.393 -ids false -ims false

```

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" id="bkmrk--77" style="box-sizing: border-box; overflow: auto !important; position: relative !important; margin-bottom: 16px; background-color: rgb(21, 27, 35); justify-content: space-between; display: flex; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div style="box-sizing: border-box;">  
</div></div>Where `9.1.0.393` is the number of **Community Server** version which you are going to update to.

## Connecting Your Own Modules

<div class="markdown-heading" dir="auto" id="bkmrk--78" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#connecting-your-own-modules)</div>You can now create your own modules and connect them to ONLYOFFICE Community Server. See [this instruction](https://helpcenter.onlyoffice.com/installation/groups-custom-modules.aspx) for more details.

## Project Information

<div class="markdown-heading" dir="auto" id="bkmrk--80" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#project-information)</div>Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerCS "https://www.onlyoffice.com?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerCS")

Code repository: [https://github.com/ONLYOFFICE/CommunityServer](https://github.com/ONLYOFFICE/CommunityServer "https://github.com/ONLYOFFICE/CommunityServer")

License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)

ONLYOFFICE Workspace: [https://www.onlyoffice.com/workspace.aspx](https://www.onlyoffice.com/workspace.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerCS)

## User feedback and support

<div class="markdown-heading" dir="auto" id="bkmrk--82" style="box-sizing: border-box; position: relative; color: rgb(240, 246, 252); font-family: 'Mona Sans VF', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Backtick Fix', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">[<svg aria-hidden="true" class="octicon octicon-link" data-component="Octicon" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>](https://github.com/ONLYOFFICE/Docker-CommunityServer#user-feedback-and-support)</div>If you have any problems with or questions about this image, please visit our official forum to find answers to your questions: [dev.onlyoffice.org](http://dev.onlyoffice.org/) or you can ask and answer ONLYOFFICE development questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/onlyoffice).

# OnlyOffice DocSpace

Suite Colaboração OnlyOffice

# Instalação e Configuração OnlyOffice DocSpace

Link: [https://helpcenter.onlyoffice.com/docspace/installation/docspace-community-running-docker.aspx](https://helpcenter.onlyoffice.com/docspace/installation/docspace-community-running-docker.aspx)

### **Running ONLYOFFICE DocSpace in Docker**

#### Introduction<button class="anchor-copy-btn" title="Copy link to section"></button>

**ONLYOFFICE DocSpace** is a document hub where you can connect users and documents in one place to boost collaboration.

This guide will show you how to run **ONLYOFFICE DocSpace** on your machine using **Docker**.

<div id="bkmrk-this-guide-deploys-a" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk-this-guide-deploys-a-1"><div class="notehelp nh_notice">This guide deploys a development/testing build of **ONLYOFFICE DocSpace** and is **not intended for production use**. This build serves over plain HTTP only, ships without identity/OAuth services, and runs a reduced feature set. For production deployments, use the [production version of ONLYOFFICE DocSpace](https://www.onlyoffice.com/download.aspx#docspace-enterprise).</div></div><div class="gs_content">  
</div></div></div></div>#### Overview<button class="anchor-copy-btn" title="Copy link to section"></button>

Unlike the standard multi-container deployment, this build runs all **ONLYOFFICE DocSpace** services inside a single container instead of as separate per-service containers. The full stack consists of the following containers:

<div id="bkmrk-container-role-onlyo" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content"><table><tbody><tr><th>Container</th><th>Role</th></tr><tr><td>**onlyoffice-docspace**</td><td>All **ONLYOFFICE DocSpace** services (consolidated)</td></tr><tr><td>**onlyoffice-document-server**</td><td>Document Server (editors)</td></tr><tr><td>**onlyoffice-mysql-server**</td><td>MySQL database</td></tr><tr><td>**onlyoffice-opensearch**</td><td>OpenSearch</td></tr></tbody></table>

</div></div></div></div>Compared to the standard multi-container deployment, this build has the following differences:

<div id="bkmrk-all-onlyoffice-docsp" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk-all-onlyoffice-docsp-1">- All **ONLYOFFICE DocSpace** services are consolidated into a single container.
- Simplified search.
- No thumbnail generation.
- HTTP only, no TLS/HTTPS support out of the box.
- No identity/OAuth services.

</div><div class="gs_content gs_submenu">  
</div></div></div></div>##### System requirements

<div id="bkmrk-cpu%3A-at-least-6-core" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content gs_submenu" id="bkmrk-cpu%3A-at-least-6-core-1">- **CPU**: at least **6-core** (**8-core** recommended)
- **RAM**: at least **12 GB** (**16 GB** recommended)
- **HDD**: at least **40 GB** of free space
- **OS**: **amd64** Linux distribution with kernel version **3.10** or later
- **Additional requirements**: 
    - at least **6 GB** of swap
    - **Docker Engine** with the **Compose** plugin (`docker compose` command)

</div><div class="gs_content">  
</div></div></div></div>#### Cloning the repository<button class="anchor-copy-btn" title="Copy link to section"></button>

Clone the `DocSpace-buildtools` repository using the following command:

```
git clone https://github.com/ONLYOFFICE/DocSpace-buildtools.git<button class="copy-code-btn"></button>
```

Once the repository is cloned, change into the Compose directory:

```
cd DocSpace-buildtools/install/docker/community<button class="copy-code-btn"></button>
```

<div id="bkmrk-" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--1"></div><div class="gs_content">  
</div></div></div></div>#### Running prebuilt images<button class="anchor-copy-btn" title="Copy link to section"></button>

To start **ONLYOFFICE DocSpace** in detached mode using the prebuilt images, run the following command:

```
docker compose up -d<button class="copy-code-btn"></button>
```

Once the containers are up and running, open a browser and enter **http://localhost** or **http://your-ip-address** in the address bar to access **ONLYOFFICE DocSpace**.

<div id="bkmrk--2" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--3"></div><div class="gs_content">  
</div></div></div></div>#### Building images from source<button class="anchor-copy-btn" title="Copy link to section"></button>

Use this option if you want to build the **ONLYOFFICE DocSpace** images yourself or test changes from a specific branch.

Build and start the containers using the following command:

```
docker compose up -d --build<button class="copy-code-btn"></button>
```

<div id="bkmrk-by-default%2C-the-imag" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content"><div class="notehelp nh_notice">By default, the images are built from the **master** branch. To build from another branch, specify the `GIT_BRANCH` build argument: `GIT_BRANCH=your-branch docker compose up -d --build`.</div></div></div></div></div>Once the build is complete and the containers are running, open **http://localhost** or **http://your-ip-address** in your browser to access **ONLYOFFICE DocSpace**.

<div id="bkmrk--4" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--5"></div><div class="gs_content">  
</div></div></div></div>#### Running with SSL<button class="anchor-copy-btn" title="Copy link to section"></button>

**ONLYOFFICE DocSpace** supports both **Let's Encrypt** and custom SSL certificates.

##### Using a Let's Encrypt certificate

To run **ONLYOFFICE DocSpace** with a **Let's Encrypt** certificate, run the following command, specifying your own domain, email, and portal URL:

```
SSL_MODE="letsencrypt" \
SSL_DOMAIN="example.com,portal.example.com,api.example.com" \
SSL_EMAIL="admin@example.com" \
APP_URL_PORTAL="https://example.com/" \
docker compose \
  -f docker-compose.yml \
  -f ssl.yml \
  up -d<button class="copy-code-btn"></button>
```

The following parameters are used:

<div id="bkmrk-ssl_mode-%E2%80%93-the-ssl-c" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content">- **SSL\_MODE** – the SSL certificate mode.
- **SSL\_DOMAIN** – one or more domains separated by commas.
- **SSL\_EMAIL** – the email address used for the **Let's Encrypt** registration.
- **APP\_URL\_PORTAL** – the public HTTPS URL of your portal.

</div></div></div></div>##### Using a custom or private CA certificate

If you are using a self-signed certificate or a certificate issued by a private Certificate Authority (CA), the **ONLYOFFICE Document Server** must also trust this certificate.

Uncomment the following volume in the `docker-compose.yml` file:

```
services:
   onlyoffice-document-server:
     volumes:
       - ${CERTIFICATE_PATH}:/var/www/onlyoffice/Data/certs/extra-ca-certs.pem<button class="copy-code-btn"></button>
```

Then specify the certificate path on the host and run the following command:

```
SSL_MODE="custom" \
SSL_DOMAIN="example.com" \
SSL_CERT_PATH="/etc/nginx/certs/fullchain.crt" \
SSL_KEY_PATH="/etc/nginx/certs/private.key" \
CERTIFICATE_PATH="./config/nginx/certs/fullchain.crt" \
APP_URL_PORTAL="https://example.com/" \
docker compose \
  -f docker-compose.yml \
  -f ssl.yml \
  up -d<button class="copy-code-btn"></button>
```

<div id="bkmrk-certificate_path-mus" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content"><div class="notehelp nh_notice">`CERTIFICATE_PATH` must point to the certificate file **on the Docker host**, not to the path inside the container. This option is typically required only for self-signed certificates or certificates issued by a private CA. Certificates issued by public CAs (for example, **Let's Encrypt**, **DigiCert**, or **GoDaddy**) usually do not require this additional configuration.</div></div></div></div></div>The following parameters are used:

<div id="bkmrk-ssl_mode-%E2%80%93-the-ssl-c-1" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content">- **SSL\_MODE** – the SSL certificate mode (**custom**).
- **SSL\_DOMAIN** – the portal domain name.
- **SSL\_CERT\_PATH** – the path to the SSL certificate.
- **SSL\_KEY\_PATH** – the path to the private key.
- **APP\_URL\_PORTAL** – the public HTTPS URL of your portal.

<div class="notehelp nh_notice">By default, the `ssl.yml` configuration mounts the local `./config/nginx/certs` directory to `/etc/nginx/certs` inside the container.</div></div></div></div></div>Once the containers are up and running, open your portal address, for example **https://example.com/**, in a browser to access **ONLYOFFICE DocSpace**.

<div id="bkmrk--6" style="text-align: justify;"><div class="sc-3de437ab-0 ieiOhq"><div class="raw-html-embed"><div class="gs_content" id="bkmrk--7"></div></div></div></div>### Host ONLYOFFICE DocSpace on your own server or use it in the cloud

<div class="sc-3013e88c-0 eiSsny download-area" id="bkmrk-get-it-nowuse-in-the"><div class="download-wrapper"><div class="download-content"><div class="download-buttons" style="text-align: justify;">[Get it now](https://www.onlyoffice.com/download-docspace?from=helpcenter)[Use in the cloud](https://www.onlyoffice.com/docspace-registration?from=helpcenter)</div></div></div></div>

# OnlyOffice Apps

Link: https://hub.docker.com/r/onlyoffice/apps

# Instalação e Configuração OnlyOffice Apps

Link: [https://hub.docker.com/r/onlyoffice/apps/tags](https://hub.docker.com/r/onlyoffice/apps/tags)

Página para atualização da versão DocSpace para a versão OnlyOffice Apps.

# OnlyOffice Community Server

# Instalação e Configuração OnlyOffice Community Server

Link: [https://hub.docker.com/r/onlyoffice/communityserver](https://hub.docker.com/r/onlyoffice/communityserver)

Em 20/10/2026

## onlyoffice/communityserver

<div class="MuiStack-root css-8l25aj" id="bkmrk-verified-publisher" style="text-align: justify;"><div class="MuiBox-root css-0"><div class="MuiStack-root css-a5yfmn"><div class="MuiStack-root css-wmxttd"><div class="MuiStack-root css-hp68mp"><div aria-label="Verified Publisher" class="MuiStack-root css-qirhuc" data-testid="productBadge">Verified Publisher</div></div><div class="MuiStack-root css-lgk7oi"><div class="MuiStack-root css-18c2ll2">  
</div></div></div></div></div></div>By [Ascensio System SIA](https://hub.docker.com/u/onlyoffice)

<div class="MuiStack-root css-8l25aj" id="bkmrk-%E2%80%A2updated-5-months-ag" style="text-align: justify;"><div class="MuiBox-root css-0"><div class="MuiStack-root css-a5yfmn"><div class="MuiStack-root css-wmxttd"><div class="MuiStack-root css-lgk7oi"><div class="MuiStack-root css-18c2ll2"><span class="MuiBox-root css-xemxna">•</span><span class="MuiTypography-root MuiTypography-body1 css-1c48om4">Updated 5 months ago</span></div></div></div></div></div></div>Collaborative system for managing documents, projects, customer relations and emails in one place

# onlyoffice/communityserver repository overview

<div id="bkmrk-overview-functionali" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- [Overview](https://hub.docker.com/r/onlyoffice/communityserver#overview)
- [Functionality](https://hub.docker.com/r/onlyoffice/communityserver#functionality)
- [Recommended System Requirements](https://hub.docker.com/r/onlyoffice/communityserver#recommended-system-requirements)
- [Installing Prerequisites](https://hub.docker.com/r/onlyoffice/communityserver#installing-prerequisites)
- [Installing MySQL](https://hub.docker.com/r/onlyoffice/communityserver#installing-mysql)
- [Installing Community Server](https://hub.docker.com/r/onlyoffice/communityserver#installing-community-server)
- [Configuring Docker Image](https://hub.docker.com/r/onlyoffice/communityserver#configuring-docker-image)
    - [Storing Data](https://hub.docker.com/r/onlyoffice/communityserver#storing-data)
    - [Running ONLYOFFICE Community Server on Different Port](https://hub.docker.com/r/onlyoffice/communityserver#running-onlyoffice-community-server-on-different-port)
    - [Exposing Additional Ports](https://hub.docker.com/r/onlyoffice/communityserver#exposing-additional-ports)
    - [Running ONLYOFFICE Community Server using HTTPS](https://hub.docker.com/r/onlyoffice/communityserver#running-onlyoffice-community-server-using-https)
        - [Using the automatically generated Let's Encrypt SSL Certificates](https://hub.docker.com/r/onlyoffice/communityserver#using-the-automatically-generated-lets-encrypt-ssl-certificates)
        - [Generation of Self Signed Certificates](https://hub.docker.com/r/onlyoffice/communityserver#generation-of-self-signed-certificates)
        - [Strengthening the Server Security](https://hub.docker.com/r/onlyoffice/communityserver#strengthening-the-server-security)
        - [Installation of the SSL Certificates](https://hub.docker.com/r/onlyoffice/communityserver#installation-of-the-ssl-certificates)
        - [Available Configuration Parameters](https://hub.docker.com/r/onlyoffice/communityserver#available-configuration-parameters)
- [Installing ONLYOFFICE Workspace](https://hub.docker.com/r/onlyoffice/communityserver#installing-onlyoffice-workspace)
- [Upgrading ONLYOFFICE Community Server](https://hub.docker.com/r/onlyoffice/communityserver#upgrading-onlyoffice-community-server)
- [Connecting Your Own Modules](https://hub.docker.com/r/onlyoffice/communityserver#connecting-your-own-modules)
- [Project Information](https://hub.docker.com/r/onlyoffice/communityserver#project-information)
- [User Feedback and Support](https://hub.docker.com/r/onlyoffice/communityserver#user-feedback-and-support)

</div></div></div></div></div></div></div></div></div>#### Overview

ONLYOFFICE Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and email correspondence, all in one place.

Starting from version 11.0 Community Server, is distributed as ONLYOFFICE Groups on terms of Apache License.

#### Functionality

<div id="bkmrk-cross-platform-solut" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- Cross platform solution: Linux, Windows
- Document management
- Integration with Google Drive, Box, Dropbox, OneDrive, OwnCloud
- File sharing
- Document embedding
- Access rights management
- Customizable CRM
- Web-to-lead form
- Invoicing system
- Project Management
- Gantt Chart
- Milestones, task dependencies and subtasks
- Time tracking
- Automated reports
- Blogs, forums, polls, wiki
- Calendar
- Email Aggregator
- People module (employee database)
- Support of more than 20 languages

</div></div></div></div></div></div></div></div></div>Community Server (distributed as ONLYOFFICE Groups) is a part of **ONLYOFFICE Workspace** that also includes [Document Server (distributed as ONLYOFFICE Docs)](https://github.com/ONLYOFFICE/DocumentServer), [Mail Server](https://github.com/ONLYOFFICE/Docker-MailServer), [Talk (instant messaging app)](https://github.com/ONLYOFFICE/XMPPServer).

Control Panel for administrating **ONLYOFFICE Workspace** can be found in [this repo](https://github.com/ONLYOFFICE/ControlPanel).

#### Recommended System Requirements

<div id="bkmrk-ram%3A-4-gb-or-more-cp" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **RAM**: 4 GB or more
- **CPU**: dual-core 2 GHz or higher
- **Swap file**: at least 2 GB
- **HDD**: at least 2 GB of free space
- **Distributive**: 64-bit Red Hat, CentOS or other compatible distributive with kernel version 3.8 or later, 64-bit Debian, Ubuntu or other compatible distributive with kernel version 3.8 or later
- **Docker**: version 1.9.0 or later

</div></div></div></div></div></div></div></div></div>#### Installing Prerequisites

Before you start **ONLYOFFICE Community Server**, you need to create the following folders:

<div id="bkmrk-for-mysql-server" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">1. For MySQL server

<div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div></div></div></div></div></div></div></div></div></div>```bash
sudo mkdir -p "/app/onlyoffice/mysql/conf.d";
sudo mkdir -p "/app/onlyoffice/mysql/data";
sudo mkdir -p "/app/onlyoffice/mysql/initdb";

```

<div id="bkmrk-for-community-server" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc"><div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div>1. For **Community Server** data and logs

<div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div></div></div></div></div></div></div></div></div></div>```bash
sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
sudo mkdir -p "/app/onlyoffice/CommunityServer/letsencrypt";

```

<div id="bkmrk-for-document-server-" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc"><div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div>1. For **Document server** data and logs

<div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div></div></div></div></div></div></div></div></div></div>```bash
sudo mkdir -p "/app/onlyoffice/DocumentServer/data";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs";

```

<div id="bkmrk-and-for-mail-server-" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc"><div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div>1. And for **Mail Server** data and logs

<div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div></div></div></div></div></div></div></div></div></div>```bash
sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
sudo mkdir -p "/app/onlyoffice/MailServer/logs";

```

<div id="bkmrk-for-control-panel%3A" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc"><div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div>1. For **Control Panel**:

<div class="MuiBox-root css-14tyjzo"><div class="MuiStack-root css-1g4yje1"><div class="MuiBox-root css-mu0cnk"></div></div></div></div></div></div></div></div></div></div></div></div>```bash
sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";

```

Then create the `onlyoffice` network:

```bash
sudo docker network create --driver bridge onlyoffice

```

#### Installing MySQL

After that you need to create MySQL server Docker container. Create the configuration file:

```bash
echo "[mysqld]
sql_mode = 'NO_ENGINE_SUBSTITUTION'
max_connections = 1000
max_allowed_packet = 1048576000
group_concat_max_len = 2048
log-error = /var/log/mysql/error.log" > /app/onlyoffice/mysql/conf.d/onlyoffice.cnf

```

Create the SQL script which will generate the users and issue the rights to them. The `onlyoffice_user` is required for **ONLYOFFICE Community Server**, and the `mail_admin` is required for **ONLYOFFICE Mail Server** in case it is going to be installed:

```bash
echo "CREATE USER 'onlyoffice_user'@'localhost' IDENTIFIED BY 'onlyoffice_pass';
CREATE USER 'mail_admin'@'localhost' IDENTIFIED BY 'Isadmin123';
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%' IDENTIFIED BY 'my-secret-pw';
GRANT ALL PRIVILEGES ON * . * TO 'onlyoffice_user'@'%' IDENTIFIED BY 'onlyoffice_pass';
GRANT ALL PRIVILEGES ON * . * TO 'mail_admin'@'%' IDENTIFIED BY 'Isadmin123';
FLUSH PRIVILEGES;" > /app/onlyoffice/mysql/initdb/setup.sql

```

*Please note, that the above script will set permissions to access SQL server from any domains (`%`). If you want to limit the access, you can specify hosts which will have access to SQL server.*

Now you can create MySQL container setting MySQL version to 5.7:

```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7

```

#### Installing Community Server

Use this command to install **ONLYOFFICE Community Server**:

```bash
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
 -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
 onlyoffice/communityserver

```

#### Configuring Docker Image

##### Storing Data

All the data are stored in the specially-designated directories, **data volumes**, at the following location:

<div id="bkmrk-%2Fvar%2Flog%2Fonlyoffice-" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **/var/log/onlyoffice** for ONLYOFFICE Community Server logs
- **/var/www/onlyoffice/Data** for ONLYOFFICE Community Server data
- **/etc/letsencrypt** for information on generated certificates

</div></div></div></div></div></div></div></div></div>To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command.

```bash
sudo docker run -i -t -d -p 80:80 \
    -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
    -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
	-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver

```

Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data.

##### Running ONLYOFFICE Community Server on Different Port

To change the port, use the -p command. E.g.: to make your portal accessible via port 8080 execute the following command:

```bash
sudo docker run -i -t -d --privileged -p 8080:80 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver

```

##### Exposing Additional Ports

The container ports to be exposed for **incoming connections** are the folloing:

<div id="bkmrk-80-for-plain-http-44" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **80** for plain HTTP
- **443** when HTTPS is enabled (see below)
- **5222** for XMPP-compatible instant messaging client (for ONLYOFFICE Talk correct work)

</div></div></div></div></div></div></div></div></div>You can expose ports by specifying the '-p' option in the docker run command.

```bash
sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver

```

For **outgoing connections** you need to expose the following ports:

<div id="bkmrk-80-for-http-443-for-" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **80** for HTTP
- **443** for HTTPS

</div></div></div></div></div></div></div></div></div>Additional ports to be exposed for the mail client correct work:

<div id="bkmrk-25-for-smtp-465-for-" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **25** for SMTP
- **465** for SMTPS
- **143** for IMAP
- **993** for IMAPS
- **110** for POP3
- **995** for POP3S

</div></div></div></div></div></div></div></div></div>##### Running ONLYOFFICE Community Server using HTTPS

```bash
sudo docker run -i -t -d -p 80:80  -p 443:443 \
    -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
    -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data onlyoffice/communityserver

```

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, a 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.

To secure the application via SSL basically two things are needed:

<div id="bkmrk-private-key-%28.key%29-s" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **Private key (.key)**
- **SSL certificate (.crt)**

</div></div></div></div></div></div></div></div></div>So you need to create and install the following files:

```bash
    /app/onlyoffice/CommunityServer/data/certs/onlyoffice.key
    /app/onlyoffice/CommunityServer/data/certs/onlyoffice.crt

```

When using CA certified certificates (e.g. [Let's Encrypt](https://letsencrypt.org/), these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself.

###### Using the automatically generated Let's Encrypt SSL Certificates

```bash
sudo docker exec -it onlyoffice-community-server bash
bash /var/www/onlyoffice/Tools/letsencrypt.sh yourdomain.com subdomain1.yourdomain.com subdomain2.yourdomain.com

```

Where `yourdomain.com` is the address of the domain where your ONLYOFFICE Workspace is installed, and `subdomain1.yourdomain.com` and `subdomain2.yourdomain.com` (and any other subdomains separated with a space) are the subdomains for the main domain which you use.

The script will automatically create and install the letsencrypt.org CA-signed certificate to your server and restart the NGINX service for the changes to take effect.

Now your portal should be available using the `https://` address.

###### Generation of Self Signed Certificates

Generation of self-signed SSL certificates involves a simple 3 step procedure.

**STEP 1**: Create the server private key

```bash
openssl genrsa -out onlyoffice.key 2048

```

**STEP 2**: Create the certificate signing request (CSR)

```bash
openssl req -new -key onlyoffice.key -out onlyoffice.csr

```

**STEP 3**: Sign the certificate using the private key and CSR

```bash
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.

###### Strengthening the server security

This section provides you with instructions to [strengthen your server security](https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html). To achieve this you need to generate stronger DHE parameters.

```bash
openssl dhparam -out dhparam.pem 2048

```

###### Installation of the SSL Certificates

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).

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.

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/CommunityServer/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.

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

```

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.*

Below is the complete list of parameters that can be set using environment variables.

<div id="bkmrk-onlyoffice_https_hst" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- **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\_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`.
- **SSL\_CERTIFICATE\_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.crt`.
- **SSL\_KEY\_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.key`.
- **SSL\_DHPARAM\_PATH**: The path to the Diffie-Hellman parameter. Defaults to `/var/www/onlyoffice/Data/certs/dhparam.pem`.
- **SSL\_VERIFY\_CLIENT**: Enable verification of client certificates using the `CA_CERTIFICATES_PATH` file. Defaults to `false`
- **MYSQL\_SERVER\_HOST**: The IP address or the name of the host where the server is running.
- **MYSQL\_SERVER\_PORT**: The port number.
- **MYSQL\_SERVER\_DB\_NAME**: The name of a MySQL database to be created on image startup.
- **MYSQL\_SERVER\_USER**: The new user name with superuser permissions for the MySQL account.
- **MYSQL\_SERVER\_PASS**: The password set for the MySQL account.

</div></div></div></div></div></div></div></div></div>#### Installing ONLYOFFICE Workspace

ONLYOFFICE Community Server is a part of ONLYOFFICE Community Edition that comprises also Document Server and Mail Server. To install them, follow these easy steps:

**STEP 1**: Create the `onlyoffice` network.

```bash
docker network create --driver bridge onlyoffice

```

Then launch containers on it using the 'docker run --net onlyoffice' option:

**STEP 2**: Install MySQL.

Follow [these steps](https://hub.docker.com/r/onlyoffice/communityserver#installing-mysql) to install MySQL server.

**STEP 3**: Install ONLYOFFICE Document Server.

```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \
	-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
	-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
	-v /app/onlyoffice/DocumentServer/fonts:/usr/share/fonts/truetype/custom \
	-v /app/onlyoffice/DocumentServer/forgotten:/var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten \
	onlyoffice/documentserver

```

To learn more, refer to the [ONLYOFFICE Document Server documentation](https://github.com/ONLYOFFICE/Docker-DocumentServer).

**STEP 4**: Install ONLYOFFICE Mail Server.

For the mail server correct work you need to specify its hostname 'yourdomain.com'. To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/Docker-MailServer).

```bash
sudo docker run --init --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
 -e MYSQL_SERVER=onlyoffice-mysql-server \
 -e MYSQL_SERVER_PORT=3306 \
 -e MYSQL_ROOT_USER=root \
 -e MYSQL_ROOT_PASSWD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver \
 -v /app/onlyoffice/MailServer/data:/var/vmail \
 -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
 -v /app/onlyoffice/MailServer/logs:/var/log \
 -h yourdomain.com \
 onlyoffice/mailserver

```

The additional parameters for mail server are available [here](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.yml#L75).

**STEP 5**: Install ONLYOFFICE Control Panel

```bash
docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-control-panel \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
-v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice onlyoffice/controlpanel

```

**STEP 6**: Install ONLYOFFICE Community Server

```bash
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \ 
 -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \ 
 -e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
 -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
 -e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
 -e MAIL_SERVER_DB_PORT=3306 \
 -e MAIL_SERVER_DB_USER=root \
 -e MAIL_SERVER_DB_PASS=my-secret-pw \ 
 -e CONTROL_PANEL_PORT_80_TCP=80 \
 -e CONTROL_PANEL_PORT_80_TCP_ADDR=onlyoffice-control-panel \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 -v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
 -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
 onlyoffice/communityserver

```

Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command:

```bash
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server

```

Alternatively, you can use an automatic installation script to install ONLYOFFICE Workspace at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.

**STEP 1**: Download the ONLYOFFICE Workspace Docker script file

```bash
wget https://download.onlyoffice.com/install/workspace-install.sh

```

**STEP 2**: Install ONLYOFFICE Workspace executing the following command:

```bash
workspace-install.sh -md yourdomain.com

```

Or, use [docker-compose](https://docs.docker.com/compose/install). First you need to clone this [GitHub repository](https://github.com/ONLYOFFICE/Docker-CommunityServer/):

```bash
git clone https://github.com/ONLYOFFICE/Docker-CommunityServer

```

After that switch to the repository folder:

```bash
cd Docker-CommunityServer

```

For the mail server correct work, open one of the files depending on the product you use:

<div id="bkmrk-docker-compose.yml-f" style="text-align: justify;"><div class="MuiStack-root css-yd8sa2"><div class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row MuiGrid2-spacing-xs-2 css-cdhilo"><div class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-8 css-1vyu5pa"><div class="MuiStack-root css-yd8sa2"><div class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiCard-root css-n1kqkk"><div class="MuiBox-root css-5kbdns"><div class="dMarkdown MuiBox-root css-0" data-testid="markdownContent"><div class="MuiBox-root css-dtbpoc">- [docker-compose.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.groups.yml) for Community Server (distributed as ONLYOFFICE Groups)
- [docker-compose.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace.yml) for ONLYOFFICE Workspace Community Edition
- [docker-compose.yml](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace_enterprise.yml) for ONLYOFFICE Workspace Enterprise Edition

</div></div></div></div></div></div></div></div></div>Then replace the `${MAIL_SERVER_HOSTNAME}` variable with your own hostname for the **Mail Server**. After that, assuming you have docker-compose installed, execute the following command:

```bash
cd link-to-your-modified-docker-compose
docker-compose up -d

```

#### Upgrading ONLYOFFICE Community Server

To upgrade to a newer release, please follow these easy steps:

**STEP 1**: Make sure that all the container volumes are mounted following the **Storing Data** section instructions:

```bash
sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' {{COMMUNITY_SERVER_ID}} 

```

where {{COMMUNITY\_SERVER\_ID}} stands for a container name or ID

**STEP 2** Remove the current container sudo docker rm -f {{COMMUNITY\_SERVER\_ID}}

**STEP 3** Remove the current image sudo docker rmi -f $(sudo docker images | grep onlyoffice/communityserver | awk '{ print $3 }')

**STEP 4** Run the new image with the same map paths

```bash
sudo docker run -i -t -d --privileged -p 80:80 \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
-e MYSQL_SERVER_USER=onlyoffice_user \
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice  \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver

```

*This will update **Community Server** container only and will not connect **Document Server** and **Mail Server** to it. You will need to use the additional parameters (like those used during installation) to connect them.*

Or you can use ONLYOFFICE Workspace script file to upgrade your current installation:

```bash
bash workspace-install.sh -u true

```

It will update all the installed components automatically. If you want to update **Community Server** only, use the following command:

```bash
bash workspace-install.sh -u true -cv 9.1.0.393 -ids false -ims false

```

Where `9.1.0.393` is the number of **Community Server** version which you are going to update to.

#### Connecting Your Own Modules

You can now create your own modules and connect them to ONLYOFFICE Community Server. See [this instruction](https://helpcenter.onlyoffice.com/installation/groups-custom-modules.aspx) for more details.

#### Project Information

Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerCS)

Code repository: [https://github.com/ONLYOFFICE/CommunityServer](https://github.com/ONLYOFFICE/CommunityServer)

License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)

ONLYOFFICE Workspace: [https://www.onlyoffice.com/workspace.aspx](https://www.onlyoffice.com/workspace.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerCS)

#### User feedback and support

If you have any problems with or questions about this image, please visit our official forum to find answers to your questions: [dev.onlyoffice.org](http://dev.onlyoffice.org/) or you can ask and answer ONLYOFFICE development questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/onlyoffice).