Paginas auxiliares, ejemplos y detalles tecnicos en una maquetacion mas limpia.
mkdir -p militant-api-install
cd militant-api-install
curl -fsSLO https://gitlab.com/militant1/api-installer/-/raw/main/militant-api
chmod +x militant-api
./militant-api
curl http://localhost:9082/v1/index.php
curl -X POST http://localhost:9082/v1/auth.php \
-H "Content-Type: application/json" \
-d '{"username":"tu_usuario","password":"tu_password"}'
curl http://localhost:9082/v1/posts.php \
-H "Authorization: Bearer TU_TOKEN"
Configura LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET (entorno o config/livekit.local.php via /admin/livekit.php). Probar un token:
curl -X POST "http://localhost:9082/v1/lives.php?path=token" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer TU_TOKEN" \
-d '{"roomName":"test","identity":"user-1","name":"Test","canPublish":false}'
La interfaz /admin/livekit.php (secretos LiveKit) es solo para técnicos: misma regla que Militant (users.is_admin = 1, pestaña Técnicos en admin.php).
Configura WEBRTC_TURN_URLS, WEBRTC_TURN_AUTH_SECRET, WEBRTC_TURN_TTL, WEBRTC_TURN_REALM (entorno o config/turn.local.php via /admin/turn.php).
/v1/settings.php devuelve entonces stun_servers, turn_servers y webrtc_ice_servers. Si WEBRTC_TURN_AUTH_SECRET esta presente, la API genera credenciales TURN temporales HMAC compatibles con coturn use-auth-secret.
./militant-api update
./militant-api uninstall
Mas detalles: README.md y DOCKER.md