Deployment Overview of Jitsi on Server¶
Prerequisites and Basic Requirements¶
To successfully deploy Jitsi on a Debian-based server, the following requirements must be met:
- Operating System: Debian (specifically compatible with
aptpackage management). - Privileges: Root access or
sudoprivileges are required to install packages, configure the firewall, and manage services. - Domain Configuration: A Fully Qualified Domain Name (FQDN) must be defined and pointed to the server's IP address.
- Ports: The following ports must be accessible:
- Port
80(TCP) for HTTP traffic and Let's Encrypt validation. - Port
443(TCP) for HTTPS traffic. - Port
10000(UDP) for Jitsi Videobridge media traffic. - Email Address: A valid administrator email address is required for Let's Encrypt certificate issuance.
File and Directory Structure¶
The deployment utilizes the following directory structure for configuration, data, and certificates:
/etc/apt/trusted.gpg.d/jitsi.gpg: Location of the Jitsi APT repository key./usr/share/keyrings/prosody-debian-packages.key: Location of the Prosody repository key./etc/nginx/sites-available/: Contains the Nginx virtual host configuration file named after the FQDN (e.g.,{{ jitsi_host }}.conf)./etc/nginx/sites-enabled/: Contains symbolic links to active virtual host configurations./etc/letsencrypt: Stores SSL certificates and private keys issued by Let's Encrypt./root/nginx/: Directory used for Docker Compose configuration in containerized deployments./data/nginx/user_conf.d/: Directory for custom Nginx site configurations in containerized deployments.
Application Installation Process¶
The standard installation process involves adding official repositories and installing the necessary packages via apt.
-
Add Repositories:
- Add the Jitsi repository:
deb https://download.jitsi.org stable/. - Add the Prosody repository:
deb [signed-by=/usr/share/keyrings/prosody-debian-packages.key] https://packages.prosody.im/debian jammy main.
- Add the Jitsi repository:
-
Install Dependencies:
- Install base tools:
curl,gnupg,apt-transport-https,ca-certificates. - Install Lua:
lua5.2.
- Install base tools:
-
Install Jitsi Packages: The following packages are installed to provide the full Jitsi Meet stack:
jitsi-meetjicofojitsi-videobridge2jitsi-meet-prosodyjitsi-meet-webjitsi-meet-web-configjitsi-meet-turnservernginx
-
Configuration Preseeding: During installation, the system is configured with the following parameters:
- Hostname (FQDN) for
jitsi-meet-web-config. - Hostname (FQDN) for
jitsi-videobridge2. - Certificate type selection set to Let's Encrypt.
- Hostname (FQDN) for
-
Reconfiguration: If the virtual host file is missing or incorrect, the
jitsi-meet-web-configpackage is reconfigured usingdpkg-reconfigureto ensure the FQDN is correctly applied.
Access Rights and Security¶
Security measures are implemented through firewall rules and service configurations:
- Firewall (UFW):
- The Uncomplicated Firewall (
ufw) is enabled with a default policy to allow incoming connections. - Specific rules are added to allow traffic on:
- Port
80(TCP). - Port
443(TCP). - Port
10000(UDP).
- Port
- SSL/TLS:
- Let's Encrypt is used to issue and manage SSL certificates automatically.
- The certificate issuance script is executed non-interactively using the administrator's email address.
- Nginx Configuration:
- The default Nginx site is removed to prevent conflicts.
- The Jitsi virtual host is configured to listen on port
80and port443with SSL and HTTP/2 enabled. - The configuration explicitly disables listening on
127.0.0.1:8443for external access, redirecting traffic through the public ports.
Docker Containers and Their Deployment¶
For containerized deployments, the system utilizes Docker Compose to manage Nginx and Certbot.
- Compose File Location:
/root/nginx/compose.yml. - Service Definition:
- Image:
jonasal/nginx-certbot:latest. - Restart Policy:
unless-stopped. - Network Mode:
host. - DNS: Configured to use
1.1.1.1and8.8.8.8. - Environment Variables:
CERTBOT_EMAIL: Set to the administrator's email address.
-
Volumes:
nginx_secrets: Mounted to/etc/letsencryptfor certificate storage./data/nginx/user_conf.d: Mounted to/etc/nginx/user_conf.dfor custom configurations.
-
Custom Nginx Configuration: A custom server block is generated in
/data/nginx/user_conf.d/with the following routing rules: - HTTP (Port 80): Redirects all traffic to HTTPS.
- HTTPS (Port 443):
- Proxies root path
/tohttps://127.0.0.1:8443/. - Proxies
/xmpp-websockettohttps://127.0.0.1:8443/xmpp-websocket. - Proxies
/colibri-ws/tohttps://127.0.0.1:8443/colibri-ws/. - Proxies
/http-bindtohttps://127.0.0.1:8443/http-bind.
- Proxies root path
- Headers:
Host,X-Real-IP,X-Forwarded-For,X-Forwarded-Protoare set for proxying.UpgradeandConnectionheaders are configured to support WebSocket upgrades.
-
SSL Verification:
proxy_ssl_verifyis set tooff. -
Deployment Command: The container stack is started using:
executed from the/root/nginxdirectory.
Proxy Servers¶
Nginx acts as the reverse proxy for the Jitsi application, handling SSL termination and routing.
- Virtual Host Configuration:
- The server name is set to the FQDN (
{{ jitsi_host }}). - Listens on port
80for HTTP. - Listens on port
443withsslandhttp2enabled. - Certificate Management:
- Certificates are issued and renewed using the
install-letsencrypt-cert.shscript provided by Jitsi. - The script runs non-interactively, accepting the administrator's email via standard input.
- Containerized Proxy:
- In Docker environments, the
jonasal/nginx-certbotimage handles both proxying and certificate management. - Custom configurations are injected via the
/data/nginx/user_conf.dvolume mount.
Starting, Stopping, and Updating¶
Service management is handled via systemd for native installations and docker compose for containerized environments.
- Native Services: The following services are managed by
systemd: prosodyjicofojitsi-videobridge2nginx
To restart these services after configuration changes:
systemctl restart prosody
systemctl restart jicofo
systemctl restart jitsi-videobridge2
systemctl restart nginx
To ensure services start on boot:
systemctl enable prosody
systemctl enable jicofo
systemctl enable jitsi-videobridge2
systemctl enable nginx
-
Nginx Configuration Validation: Before reloading Nginx, the configuration is tested:
If the test passes, Nginx is reloaded: -
Docker Services: To start or restart the containerized stack:
executed from the/root/nginxdirectory.