JITSI-MEET - Install Script On Ubuntu 24.4
From IT-Arts.net
install_jitsi.sh
#!/bin/bash
# This script installs Jitsi Meet on Ubuntu 24.04 LTS
# Ensure the system is up-to-date
echo "Updating system packages..."
sudo apt update -y && sudo apt upgrade -y
# Install essential packages
echo "Installing necessary packages..."
sudo apt install -y apt-transport-https curl gnupg2 lsb-release sudo
# Add Jitsi repository and its GPG key
echo "Adding Jitsi repository and GPG key..."
curl https://download.jitsi.org/jitsi-key.gpg | sudo tee /etc/apt/trusted.gpg.d/jitsi.asc
sudo sh -c 'echo "deb https://download.jitsi.org stable/"/ >> /etc/apt/sources.list.d/jitsi-stable.list'
# Update the package lists to include Jitsi's repository
echo "Updating package lists..."
sudo apt update -y
# Install Jitsi Meet packages
echo "Installing Jitsi Meet..."
sudo apt install -y jitsi-meet
# Install SSL certificates (optional: self-signed or use Let's Encrypt)
echo "Generating SSL certificate for Jitsi Meet..."
# You can replace `your-domain.com` with your actual domain or IP address
# You will be prompted to create a self-signed certificate or use Let's Encrypt
# If you are using your own domain, make sure it is correctly pointed to your server's IP
sudo jitsi-meet-tls
# Configure Nginx and Jitsi Meet
echo "Configuring Nginx for Jitsi Meet..."
# Open Nginx configuration for editing
# By default, Jitsi Meet uses the default Nginx config, but you can modify this if needed
sudo bash -c 'cat <<EOF > /etc/nginx/sites-available/jitsi-meet
server {
listen 80;
server_name your-domain.com; # Replace with your domain or IP address
# Uncomment the following to redirect HTTP to HTTPS
# return 301 https://$host$request_uri;
location / {
# Allow WebRTC media traffic to pass
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host \$host;
proxy_cache_bypass \$http_upgrade;
}
location ~ ^/([a-zA-Z0-9_-]+)$ {
# WebSocket support
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host \$host;
}
}
EOF'
# Enable the site and restart Nginx
sudo ln -s /etc/nginx/sites-available/jitsi-meet /etc/nginx/sites-enabled/
echo "Testing Nginx configuration..."
sudo nginx -t
echo "Restarting Nginx..."
sudo systemctl restart nginx
# Set up and configure the Jitsi Meet services
echo "Configuring Jitsi Meet services..."
# By default, Jitsi uses a self-signed SSL certificate or will generate a Let's Encrypt cert during the installation.
# If you use Let's Encrypt, ensure that DNS is configured correctly and port 80/443 is open.
# Set up Prosody for authentication and Jitsi Meet conferences
echo "Setting up Prosody for XMPP server..."
sudo apt install -y prosody
# Enable and start the Jitsi services
echo "Starting and enabling Jitsi Meet services..."
sudo systemctl enable jitsi-videobridge2
sudo systemctl enable prosody
sudo systemctl enable jicofo
sudo systemctl enable nginx
sudo systemctl start jitsi-videobridge2
sudo systemctl start prosody
sudo systemctl start jicofo
sudo systemctl start nginx
# Optional: Set up firewall (if applicable)
echo "Configuring UFW firewall..."
sudo ufw allow 22,80,443/tcp
sudo ufw allow 10000:20000/udp
sudo ufw enable
# Final setup and verification
echo "Jitsi Meet installation completed. Please visit your server domain or IP."
echo "You can access Jitsi Meet at https://your-domain.com or https://<your-server-ip>."
echo "If you have a valid domain, it should automatically load the web interface for creating meetings."
