Skip to content

Commit dbdb597

Browse files
committed
Deployment CE on premises refactoring
1 parent cc2bc02 commit dbdb597

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

docs/deployment/deploying-on-premises.md

+33-23
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,22 @@ This procedure installs the following services:
3535

3636
- **[Install Docker Compose](https://docs.docker.com/compose/install/){:target="_blank"}**. NOTE: install docker-compose from the link (official Docker site) as minimum version `1.24` is required.
3737

38-
- **Opened ports in the server**
38+
- **Configure a domain name**: OpenVidu is deployed using HTTPS because it is mandatory to use WebRTC. Then, if you do not have a domain name, an autogenerated SSL certificate will be used and an ugly warning will appear to your users when enter to your site. And of course you can suffer a man-in-the-middle attack. So it is recommended that you configure a domain name pointing to your machine's public IP. A valid SSL certificate can be automatically generated using Let's Encrypt in the installation process. If you already have a valid SSL certificate of your own, it also can be configured.
3939

40-
- **22 TCP**: to connect using SSH to admin OpenVidu.
41-
- **80 TCP**: if you select Let's Encrypt to generate an SSL certificate this port is used by the generation process.
42-
- **443 TCP**: OpenVidu server and application are published in standard https port.
43-
- **3478 TCP+UDP**: used by TURN server to resolve clients IPs.
44-
- **40000 - 57000 TCP+UDP**: used by Kurento Media Server to establish media connections.
45-
- **57001 - 65535 TCP+UDP**: used by TURN server to establish relayed media connections.<br><br>
40+
- **Port configuration in the server**
4641

47-
Please take care to close ports not mentioned above to block access to some of the internal services of OpenVidu platform (like Redis). For example, you can configure public/private ports in any cloud platform ([OpenStak security groups](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#), [AWS security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html), etc..) or installing [UFW](https://manpages.ubuntu.com/manpages/bionic/en/man8/ufw.8.html) with the following configuration:
42+
- **Open these ports** (in section [Close ports to avoid external attacks](#close-ports-to-avoid-external-attacks) you have an UFW sample to configure a firewall)
4843

49-
```
50-
ufw allow ssh
51-
ufw allow 80/tcp
52-
ufw allow 443/tcp
53-
ufw allow 3478/tcp
54-
ufw allow 3478/udp
55-
ufw allow 40000:57000/tcp
56-
ufw allow 40000:57000/udp
57-
ufw allow 57001:65535/tcp
58-
ufw allow 57001:65535/udp
59-
ufw enable
60-
```
44+
- **22 TCP**: to connect using SSH to admin OpenVidu.
45+
- **80 TCP**: if you select Let's Encrypt to generate an SSL certificate this port is used by the generation process.
46+
- **443 TCP**: OpenVidu server and application are published by default in standard https port.
47+
- **3478 TCP+UDP**: used by TURN server to resolve clients IPs.
48+
- **40000 - 57000 TCP+UDP**: used by Kurento Media Server to establish media connections.
49+
- **57001 - 65535 TCP+UDP**: used by TURN server to establish relayed media connections.<br><br>
6150

62-
- **Configure a domain name**: OpenVidu is deployed using HTTPS because it is mandatory to use WebRTC. Then, if you do not have a domain name, an autogenerated SSL certificate will be used and an ugly warning will appear to your users when enter to your site. And of course you can suffer a man-in-the-middle attack. So it is recommeded that you configure a domain name pointing to your machine's public IP. A valid SSL certificate can be automatically generated using Let's Encrypt in the installation process. If you already have a valid SSL certificate of your own, it also can be configured.
51+
- **Close all other ports**: this is VERY important to avoid external attacks to OpenVidu internal services. Check troubleshooting section [Close ports to avoid external attacks](#close-ports-to-avoid-external-attacks) to learn more about this.
6352

64-
- **Free ports**: OpenVidu platform services will need the following ports to be available in the machine: 80, 443, 3478, 5442, 5443, 6379 and 8888. If some of these ports is used by any process, OpenVidu platform won't work correctly. It is a typical error to have an NGINX process in the system before installing OpenVidu. Please uninstall it.
53+
- **Free ports inside the server**: OpenVidu platform services will need the following ports to be available in the machine: 80, 443, 3478, 5442, 5443, 6379 and 8888. If some of these ports is used by any process, OpenVidu platform won't work correctly. It is a typical error to have an NGINX process in the system before installing OpenVidu. Please uninstall it.
6554

6655
<br>
6756

@@ -160,7 +149,7 @@ [email protected]
160149
By default, the [OpenVidu Call](demos/openvidu-call/){:target="_blank"} application is deployed alongside OpenVidu Platform. It is accessible in the URL:
161150

162151
```console
163-
https://openvidu_domain_or_public_ip/
152+
https://OPENVIDU_DOMAIN_OR_PUBLIC_IP/
164153
```
165154

166155
This application is defined in file `docker-compose.override.yml`. To disable OpenVidu Call application, you can delete the file `docker-compose.override.yml` (or just rename it in case you want to enable it again in the future).
@@ -353,6 +342,27 @@ To change the level of Kurento Media Server logs (***kms*** docker service) chan
353342

354343
OpenVidu and Kurento Media Server evolve at a different pace. Sometimes, it is possible that a new KMS is released but OpenVidu is not still updated. In that case, if you hit a bug that might be solved in the last KMS version, you can test if just updating KMS fixes your issue. `KMS_IMAGE` property allows you to specify the new KMS image in configuration file `.env`.
355344

345+
### Close ports to avoid external attacks
346+
347+
Closing all non-necessary ports in your server is very important to avoid external attacks. Some administrators using OpenVidu have reported attacks because their ports weren't properly closed. Of course, all of the opened ports stated in [Prerequisites](#1-prerequisites) section must be accessible from the exterior, but the rest must be closed to grant proper protection.
348+
349+
Typically, cloud providers initiate their machines with all ports closed by default, so usually it is only necessary to open the required ones. For example, you can configure public/private ports in in OpenStack with [OpenStack security groups](https://docs.openstack.org/horizon/latest/user/configure-access-and-security-for-instances.html#){:target="_blank"}, in AWS with [AWS security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html){:target="_blank"}, etc...
350+
351+
If your only choice is to manually configure a firewall, you can for example install in any GNU/LInux system the great [UFW (Uncomplicated Firewall)](https://manpages.ubuntu.com/manpages/bionic/en/man8/ufw.8.html){:target="_blank"} (`sudo apt install ufw`) with the following configuration to only allow the required ports:
352+
353+
```
354+
ufw allow ssh
355+
ufw allow 80/tcp
356+
ufw allow 443/tcp
357+
ufw allow 3478/tcp
358+
ufw allow 3478/udp
359+
ufw allow 40000:57000/tcp
360+
ufw allow 40000:57000/udp
361+
ufw allow 57001:65535/tcp
362+
ufw allow 57001:65535/udp
363+
ufw enable
364+
```
365+
356366
<br>
357367

358368
<script src="js/copy-btn.js"></script>

0 commit comments

Comments
 (0)