-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mirotalkbro] - add coturn docker compose
- Loading branch information
1 parent
169e660
commit 352472a
Showing
6 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ package-lock.json | |
# personal | ||
.env | ||
docker-compose.yml | ||
docker-push.sh | ||
docker-push.sh | ||
turnserver.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* @license For open source under AGPL-3.0 | ||
* @license For private project or commercial purposes contact us at: [email protected] | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.0.70 | ||
* @version 1.0.71 | ||
*/ | ||
|
||
require('dotenv').config(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 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. | ||
|
||
For more, visit the [official documentation](https://docs.mirotalk.com/coturn/installation/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters