diff --git a/.gitignore b/.gitignore index fbb32a90..7dd75a93 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ package-lock.json config.js docker-push.sh docker-compose.yml +turnserver.conf output env.txt diff --git a/coturn/README.md b/coturn/README.md new file mode 100644 index 00000000..0c0599dd --- /dev/null +++ b/coturn/README.md @@ -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/). diff --git a/coturn/turnserver.conf b/coturn/turnserver.template.conf similarity index 93% rename from coturn/turnserver.conf rename to coturn/turnserver.template.conf index bf5e4d16..4ad2a015 100644 --- a/coturn/turnserver.conf +++ b/coturn/turnserver.template.conf @@ -7,7 +7,7 @@ max-port=20000 fingerprint lt-cred-mech -user=your.username:your.password +user=YOUR.USERNAME:YOUR.PASSWORD server-name=YOUR.DOMAIN.NAME realm=YOUR.DOMAIN.NAME