Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Migrates jetty config to nginx one (#5413)

Дамян Минков9a5b19babebd
diff --git a/debian/control b/debian/control
index 94cb4094f1..740888ca46 100644
--- a/debian/control
+++ b/debian/control
@@ -16,8 +16,7 @@ Description: WebRTC JavaScript video conferences
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
- forwarding and relaying, configured to work with jetty instance
- running embedded into Jitsi Videobridge
+ forwarding and relaying.
Package: jitsi-meet-web-config
Architecture: all
@@ -27,9 +26,7 @@ Description: Configuration for web serving of Jitsi Meet
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
- forwarding and relaying, configured to work with jetty instance
- running embedded into Jitsi Videobridge or using a webserver Nginx or
- Apache2.
+ forwarding and relaying, using a webserver Nginx or Apache2.
.
This package contains configuration for Nginx to be used with
Jitsi Meet.
@@ -43,8 +40,7 @@ Description: Prosody configuration for Jitsi Meet
Videobridge to provide high quality, scalable video conferences.
.
It is a web interface to Jitsi Videobridge for audio and video
- forwarding and relaying, configured to work with jetty instance
- running embedded into Jitsi Videobridge
+ forwarding and relaying.
.
This package contains configuration for Prosody to be used with
Jitsi Meet.
@@ -56,5 +52,6 @@ Description: Prosody token authentication plugin for Jitsi Meet
Package: jitsi-meet-turnserver
Architecture: all
+Breaks: apache2
Depends: ${misc:Depends}, nginx (>= 1.13.10) | nginx-full (>= 1.13.10) | nginx-extras (>= 1.13.10), jitsi-meet-prosody, coturn, dnsutils
Description: Configures coturn to be used with Jitsi Meet
diff --git a/debian/jitsi-meet-web-config.postinst b/debian/jitsi-meet-web-config.postinst
index 4ce11e50d1..7584996916 100644
--- a/debian/jitsi-meet-web-config.postinst
+++ b/debian/jitsi-meet-web-config.postinst
@@ -68,12 +68,11 @@ case "$1" in
FORCE_APACHE="true"
fi
+ UPLOADED_CERT_CHOICE="I want to use my own certificate"
# if first time config ask for certs, or if we are reconfiguring
if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
- # SSL for nginx
db_get jitsi-meet/cert-choice
CERT_CHOICE="$RET"
- UPLOADED_CERT_CHOICE="I want to use my own certificate"
if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
@@ -104,24 +103,55 @@ case "$1" in
if [ ! -f $JITSI_MEET_CONFIG ] ; then
cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
# replaces needed config for multidomain as it works only with nginx
- sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
+ if [[ "$FORCE_NGINX" = "true" ]] ; then
+ sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
+ fi
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
fi
- # this is new install let's configure jvb to serve meet
- # no-nginx, no-apache installed on machine, this is new install or reconfiguring old one which have jvb_serve set
+ # getting rid of jetty serving web
if [[ "$JVB_SERVE" = "true" ]] ; then
- echo ""
- echo "------------------------------------------------"
- echo "You are using jetty to serve jitsi-meet, it is recommended to uninstall(purge) and use default installation that comes with nginx!"
- echo ""
- echo "When using the following command, any custom config will be LOST, please backup /etc/jitsi !!!"
- echo ""
- echo "You can purge your installation using the following command:"
- echo "apt-get purge jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-web jicofo jitsi-videobridge"
- echo "------------------------------------------------"
- echo ""
- elif [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
+ JVB_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties"
+
+ # we will write to the file if missing create it
+ if [ -f $JVB_CONFIG ] ; then
+ echo ""
+ echo "------------------------------------------------"
+ echo ""
+ echo "You are using jetty to serve jitsi-meet, we are now upgrading you to use nginx!"
+ echo ""
+ echo "------------------------------------------------"
+ echo ""
+
+ sed -i "s/org.jitsi.videobridge.rest.jetty/#org.jitsi.videobridge.rest.jetty/g" $JVB_CONFIG
+ sed -i "s/org.jitsi.videobridge.TCP_HARVESTER_PORT/#org.jitsi.videobridge.TCP_HARVESTER_PORT/g" $JVB_CONFIG
+
+ if [ -d /run/systemd/system ]; then
+ systemctl restart jitsi-videobridge2.service >/dev/null || true
+ fi
+
+ # Removing this value will force nginx or apache to be locally configured
+ JVB_HOSTNAME_OLD=""
+
+ db_get jitsi-meet/cert-choice
+ CERT_CHOICE="$RET"
+ # Fix certs on upgrade from jetty
+ if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
+ db_get jitsi-meet/cert-path-key
+ CERT_KEY="$RET"
+ db_get jitsi-meet/cert-path-crt
+ CERT_CRT="$RET"
+ else
+ # create self-signed certs
+ CERT_KEY="/etc/jitsi/meet/$JVB_HOSTNAME.key"
+ CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt"
+ fi
+ fi
+
+ db_set jitsi-meet/jvb-serve "false"
+ fi
+
+ if [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
# this is a reconfigure, lets just delete old links
if [ "$RECONFIGURING" = "true" ] ; then
diff --git a/doc/quick-install.md b/doc/quick-install.md
index 5f535eae06..fa67fc3a7f 100644
--- a/doc/quick-install.md
+++ b/doc/quick-install.md
@@ -43,7 +43,7 @@ apt-get install apt-transport-https
### Install Jitsi Meet
-Note: Something to consider before installation is how you're planning to serve Jitsi Meet. The installer will check if [Nginx](https://nginx.org/) or [Apache](https://httpd.apache.org/) is present (in that order) and configure a virtualhost within the web server it finds to serve Jitsi Meet. If none of the above is found it then configures itself to be served via [Jetty](https://www.eclipse.org/jetty/). So if for example you are planning on deploying Jitsi Meet with a web server, you have to make sure to install the server **before** installing jitsi-meet.
+Note: The installer will check if [Nginx](https://nginx.org/) or [Apache](https://httpd.apache.org/) is present (in that order) and configure a virtualhost within the web server it finds to serve Jitsi Meet. If none of the above is found it then defaults to Nginx.
```sh
apt-get -y install jitsi-meet