#!/bin/bash set -e echo "🔒 CONFIGURACIÓN SSL PARA LIVEKIT CON DOMINIO" echo "==============================================" DOMAIN="nextream.sytes.net" EMAIL="tu-email@dominio.com" # Cambia por tu email echo "📋 Configuración:" echo " • Dominio: $DOMAIN" echo " • Email: $EMAIL" echo " • Puerto HTTPS: 443" echo " • Puerto LiveKit: 7880" # Instalar certbot si no existe if ! command -v certbot &> /dev/null; then echo "📦 Instalando Certbot..." sudo apt update sudo apt install -y certbot python3-certbot-nginx fi # Generar certificado SSL echo "🔐 Generando certificado SSL..." sudo certbot certonly --standalone \ --email $EMAIL \ --agree-tos \ --no-eff-email \ -d $DOMAIN # Crear configuración Nginx para LiveKit echo "⚙️ Configurando Nginx para LiveKit..." sudo tee /etc/nginx/sites-available/livekit-ssl > /dev/null <