[call-me] - add coturn

This commit is contained in:
Miroslav Pejic
2025-01-10 11:50:52 +01:00
parent 7c3a7e9572
commit 79b0dd84c2
7 changed files with 105 additions and 2 deletions
+5 -1
View File
@@ -5,4 +5,8 @@
node_modules
npm-debug.log
package-lock.json
package-lock.json
#personal
docker-compose.yml
turnserver.conf
+3
View File
@@ -39,6 +39,9 @@ cd call-me
# Copy .env.template to .env
cp .env.template .env
# Create your own docker-compose.yml
cp docker-compose.template.yml docker-compose.yml
# Install dependencies
npm install
+62
View File
@@ -0,0 +1,62 @@
# CoTURN Setup Guide
Set up `CoTURN` with Docker for NAT traversal and media relay in WebRTC applications.
---
## Installation Steps
### 1. Prepare Docker Compose
1. Copy the template:
```bash
cp docker-compose.template.yml docker-compose.yml
```
2. Edit `docker-compose.yml` to fit your environment.
### 2. Configure TURN Server
1. Copy the template:
```bash
cp turnserver.template.conf turnserver.conf
```
2. Edit `turnserver.conf`:
- Replace `YOUR.DOMAIN.NAME` with your domain.
- Replace `YOUR.USERNAME` and `YOUR.PASSWORD` with your credentials.
Example:
```text
server-name=example.com
realm=example.com
user=username:password
```
### 3. Verify Files
Ensure `turnserver.conf` and `docker-compose.yml` are in the same directory.
### 4. Start the Server
Run:
```bash
docker-compose up -d
```
### 5. Check Logs (Optional)
Check logs to verify the server:
```bash
docker-compose logs -f
```
---
## Notes
- Open ports (e.g., 3478, 5349 for TURN) on your firewall.
- Use secure credentials.
- Test with a WebRTC application.
+11
View File
@@ -0,0 +1,11 @@
services:
coturn:
image: coturn/coturn
container_name: coturn
network_mode: 'host'
user: 'root'
restart: unless-stopped
volumes:
- ./turnserver.conf:/etc/coturn/turnserver.conf
- /etc/letsencrypt/live/YOUR.DOMAIN.NAME/fullchain.pem:/etc/letsencrypt/live/YOUR.DOMAIN.NAME/fullchain.pem
- /etc/letsencrypt/live/YOUR.DOMAIN.NAME/privkey.pem:/etc/letsencrypt/live/YOUR.DOMAIN.NAME/privkey.pem
+23
View File
@@ -0,0 +1,23 @@
listening-port=3478
tls-listening-port=5349
min-port=10000
max-port=20000
fingerprint
lt-cred-mech
user=YOUR.USERNAME:YOUR.PASSWORD
server-name=YOUR.DOMAIN.NAME
realm=YOUR.DOMAIN.NAME
total-quota=100
stale-nonce=600
cert=/etc/letsencrypt/live/YOUR.DOMAIN.NAME/fullchain.pem
pkey=/etc/letsencrypt/live/YOUR.DOMAIN.NAME/privkey.pem
cipher-list="ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384"
no-stdout-log
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "call-me",
"version": "1.0.47",
"version": "1.0.48",
"description": "Your Go-To for Instant Video Calls",
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
"license": "AGPLv3",