Jitsi Meet Setup on docker


βœ… Prerequisites

  • Launch AWS EC2 Ubuntu instance.

  • Domain name: Example: abc.domain.xyz pointed to the EC2 instance's public IP.

  • Open ports in EC2 Security Group:

    • 80 (HTTP)

    • 443 (HTTPS)

    • 22 (SSH)

    • 10000/udp (for video)


πŸ”§ Step 1: Install Required Software

sudo apt update
sudo apt install -y docker.io docker-compose nginx certbot python3-certbot-nginx ufw
sudo systemctl enable docker

πŸ“¦ Step 2: Set Up Jitsi with Docker Compose

git clone https://github.com/jitsi/docker-jitsi-meet.git
cd docker-jitsi-meet
cp env.example .env

Edit .env:

nano .env

Set these values:

HTTP_PORT=8000
HTTPS_PORT=8443
PUBLIC_URL=https://abc.domain.xyz
ENABLE_LETSENCRYPT=0

Create config directories:

mkdir -p ~/.jitsi-meet-cfg/{web,transcripts,prosody,jicofo,jvb}

Start Jitsi:

docker-compose up -d

🌐 Step 3: Configure Nginx Reverse Proxy

Create Nginx config file:

sudo nano /etc/nginx/sites-available/jitsi

Paste this temporary non-SSL config:

server {
    listen 80;
    server_name abc.domain.xyz;

    location / {
        proxy_pass http://localhost:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Enable the config:

sudo ln -s /etc/nginx/sites-available/jitsi /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

πŸ” Step 4: Obtain Let's Encrypt SSL Certificate

Run:

sudo certbot --nginx -d abc.domain.xyz

Certbot will automatically:

  • Edit your Nginx config

  • Add SSL blocks

  • Reload Nginx

Test renewal:

sudo certbot renew --dry-run

πŸ” Step 5: Setup Cron Job for Auto-Renewal

Open root’s crontab:

sudo crontab -e

Add this line to renew daily at 3 AM:

0 3 * * * certbot renew --quiet --post-hook "systemctl reload nginx"

Confirm:

sudo crontab -l

sudo ufw allow OpenSSH
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 10000/udp
sudo ufw enable

βœ… Test It All

  • Visit: https://abc.domain.xyz

  • Join a room and test video

  • Confirm SSL (πŸ”’ lock icon)

  • Check logs if needed:

      docker-compose logs web
      tail -f /var/log/letsencrypt/letsencrypt.log
    

🧹 Optional Next Steps

  • πŸ” Add secure domain for moderator-only room creation

  • 🎨 Customize Jitsi UI

  • πŸ“§ Setup email alerts for SSL renewal failures

0
Subscribe to my newsletter

Read articles from SRINIVAS TIRUNAHARI directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

SRINIVAS TIRUNAHARI
SRINIVAS TIRUNAHARI