Update README.md

This commit is contained in:
hellonadya 2020-12-09 16:35:02 +03:00 committed by GitHub
parent d5cddae157
commit d125335a0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 69 additions and 24 deletions

View File

@ -32,11 +32,12 @@
- [Running ONLYOFFICE Community Server on Different Port](#running-onlyoffice-community-server-on-different-port)
- [Exposing Additional Ports](#exposing-additional-ports)
- [Running ONLYOFFICE Community Server using HTTPS](#running-onlyoffice-community-server-using-https)
+ [Using the automatically generated Let's Encrypt SSL Certificates](#using-the-automatically-generated-lets-encrypt-ssl-certificates)
+ [Generation of Self Signed Certificates](#generation-of-self-signed-certificates)
+ [Strengthening the Server Security](#strengthening-the-server-security)
+ [Installation of the SSL Certificates](#installation-of-the-ssl-certificates)
+ [Available Configuration Parameters](#available-configuration-parameters)
* [Installing ONLYOFFICE Community Server integrated with Document and Mail Servers](#installing-onlyoffice-community-server-integrated-with-document-and-mail-servers)
* [Installing ONLYOFFICE Workspace](#installing-onlyoffice-workspace)
* [Upgrading ONLYOFFICE Community Server](#upgrading-onlyoffice-community-server)
* [Connecting Your Own Modules](#connecting-your-own-modules)
* [Project Information](#project-information)
@ -98,6 +99,7 @@ sudo mkdir -p "/app/onlyoffice/mysql/initdb";
```
sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
sudo mkdir -p "/app/onlyoffice/CommunityServer/letsencrypt";
```
3. For **Document server** data and logs
@ -111,7 +113,11 @@ sudo mkdir -p "/app/onlyoffice/DocumentServer/logs";
sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
sudo mkdir -p "/app/onlyoffice/MailServer/logs";
```
5. For **Control Panel**:
```
sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";
```
Then create the `onlyoffice` network:
```
sudo docker network create --driver bridge onlyoffice
@ -156,7 +162,7 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mys
Use this command to install **ONLYOFFICE Community Server**:
```
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
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 \
@ -164,6 +170,8 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-com
-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
```
The additional parameters for running the Docker container are available [here](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.yml#L26).
@ -175,12 +183,15 @@ The additional parameters for running the Docker container are available [here](
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 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data onlyoffice/communityserver
-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.
@ -188,9 +199,11 @@ Storing the data on the host machine allows you to easily update ONLYOFFICE once
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 -p 8080:80 \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data onlyoffice/communityserver
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
@ -202,9 +215,11 @@ The container ports to be exposed for **incoming connections** are the folloing:
You can expose ports by specifying the '-p' option in the docker run command.
sudo docker run -i -t -d -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 onlyoffice/communityserver
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:
@ -240,7 +255,18 @@ So you need to create and install the following files:
/app/onlyoffice/CommunityServer/data/certs/onlyoffice.key
/app/onlyoffice/CommunityServer/data/certs/onlyoffice.crt
When using CA certified certificates, these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself. Skip the following section if you have CA certified SSL certificates.
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
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
@ -311,7 +337,7 @@ Below is the complete list of parameters that can be set using environment varia
- **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 Community Server integrated with Document and Mail Servers
## 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:
@ -362,7 +388,7 @@ The additional parameters for mail server are available [here](https://github.co
**STEP 5**: Install ONLYOFFICE Community Server
```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
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 \
@ -375,28 +401,39 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-com
-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:
```
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server
```
**STEP 6**: 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
```
Alternatively, you can use an automatic installation script to install the whole ONLYOFFICE Community Edition at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.
**STEP 1**: Download the Community Edition Docker script file
**STEP 1**: Download the ONLYOFFICE Workspace Docker script file
```bash
wget http://download.onlyoffice.com/install/opensource-install.sh
wget https://download.onlyoffice.com/install/workspace-install.sh
```
**STEP 2**: Install ONLYOFFICE Community Edition executing the following command:
**STEP 2**: Install ONLYOFFICE Workspace executing the following command:
```bash
bash opensource-install.sh -md yourdomain.com
workspace-install.sh -md yourdomain.com
```
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/):
@ -411,7 +448,13 @@ After that switch to the repository folder:
cd Docker-CommunityServer
```
For the mail server correct work open the [docker-compose.yml file](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.yml "docker-compose.yml file") and 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:
For the mail server correct work, open one of the files depending on the product you use:
* [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
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
@ -437,31 +480,33 @@ where
**STEP 4** Run the new image with the same map paths
sudo docker run -i -t -d -p 80:80 \
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 onlyoffice/communityserver
-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 the Community Edition script file to upgrade your current installation:
```
bash opensource-install.sh -u true
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 opensource-install.sh -u true -cv 9.1.0.393 -ids false -ims false
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 repository](https://github.com/ONLYOFFICE/CommunityServer-CustomModules "https://github.com/ONLYOFFICE/CommunityServer-CustomModules") for more details.
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