-
-
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.
- Loading branch information
1 parent
0f00a12
commit 344b1a4
Showing
4 changed files
with
22 additions
and
345 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
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 |
---|---|---|
@@ -1,91 +1,11 @@ | ||
# Install Coturn STUN/TURN server | ||
|
||
![stunTurn](../public/assets/images/stun-turn.png) | ||
#### What are STUN and TURN in the context of network communication? | ||
|
||
## Requirements | ||
https://docs.mirotalk.com/coturn/stun-turn/ | ||
|
||
- Recommended: [Hetzner](https://www.hetzner.com/cloud) (`CPX11` it's enough, OS: `Ubuntu 20.04 LTS / 22.04.1 LTS`). | ||
- Use [my personal link](https://hetzner.cloud/?ref=XdRifCzCK3bn) to receive `€20 in cloud credits`. | ||
- Your domain name, example: `your.domain.name` | ||
- Set a DNS A record for that domain that point to Your Server public IPv4 | ||
> DNS A Record: The Address Mapping record (or DNS host record) stores a hostname and its corresponding IPv4 address. When users search for your website, the A record redirects this traffic from the web address (xxxxx.com – human-readable domain) to the IPv4 address. | ||
- `your.username` and `your.password` to set in the `/etc/turnserver.conf`. | ||
- [Certbot](https://certbot.eff.org/) to generate `cert` & `pkey`. | ||
#### How can I set up and configure my own STUN and TURN servers? | ||
|
||
## Quick start | ||
https://docs.mirotalk.com/coturn/installation/ | ||
|
||
1. Download [coturn](https://github.com/coturn/coturn) | ||
|
||
```bash | ||
$ sudo apt-get -y update | ||
$ sudo apt-get -y install coturn | ||
``` | ||
|
||
2. Uncomment the following line to run Coturn as an automatic system service daemon in `/etc/default/coturn` | ||
|
||
```ini | ||
TURNSERVER_ENABLED=1 | ||
``` | ||
|
||
3. Set `/etc/turnserver.conf` to the following: | ||
|
||
```ini | ||
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 | ||
``` | ||
|
||
4. If you can't reach coturn on `tls-listening-port`, try to edit `/etc/systemd/system/multi-user.target.wants/coturn.service` | ||
|
||
```ini | ||
[Service] | ||
User=root | ||
Group=root | ||
``` | ||
|
||
5. Reload daemon: | ||
|
||
```bash | ||
$ sudo systemctl daemon-reload | ||
``` | ||
|
||
## Coturn commands | ||
|
||
```bash | ||
$ sudo service coturn status | ||
$ sudo service coturn stop | ||
$ sudo service coturn start | ||
$ sudo service coturn restart | ||
``` | ||
|
||
# Test | ||
|
||
Test if it's working: | ||
|
||
- https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ | ||
- https://icetest.info/ | ||
|
||
Or use the built in MiroTalk P2P service, just change `your.domain.name`, `your.username` and `your.password` with your own, in the following urls: | ||
|
||
- https://p2p.mirotalk.com/test?iceServers=[{"urls":"stun:your.domain.name:3478"},{"urls":"turn:your.domain.name:3478","username":"your.username","credential":"your.password"}] | ||
|
||
- https://p2p.mirotalk.com/test?iceServers=[{"urls":"stun:your.domain.name:5349"},{"urls":"turn:your.domain.name:5349","username":"your.username","credential":"your.password"}] | ||
--- |
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 |
---|---|---|
@@ -1,28 +1,11 @@ | ||
# MiroTalk WebRTC Live Broadcast - Ngrok | ||
# MiroTalk BRO - Ngrok | ||
|
||
![ngrok](../public/assets/images/ngrok.png) | ||
#### What is the purpose and functionality of Ngrok? | ||
|
||
If you want to expose MiroTalk Live Broadcast from your `Local PC` to outside in `HTTPS`, you need to do 1 thing | ||
https://docs.mirotalk.com/ngrok/ngrok/ | ||
|
||
Edit the Ngrok part on `.env` file | ||
#### How to exposing MiroTalk BRO with Ngrok? | ||
|
||
```bash | ||
# 1. Goto https://ngrok.com | ||
# 2. Get started for free | ||
# 3. Copy YourNgrokAuthToken: https://dashboard.ngrok.com/get-started/your-authtoken | ||
|
||
NGROK_ENABLED=true | ||
NGROK_AUTH_TOKEN=YourNgrokAuthToken | ||
``` | ||
https://docs.mirotalk.com/mirotalk-bro/ngrok/ | ||
|
||
--- | ||
|
||
Then, when you run it with `npm start`, you should see in the console log: | ||
|
||
```bash | ||
ngrokHome: 'https://xxxx-xx-xx-xxx-xx.ngrok.io', | ||
ngrokBroadcast: 'https://xxxx-xx-xx-xxx-xx.ngrok.io/broadcast?id=123&name=Broadcaster', | ||
ngrokViewer: 'https://xxxx-xx-xx-xxx-xx.ngrok.io/viewer?id=123&name=Viewer', | ||
``` | ||
|
||
Open the URL in your browser and join as `Broadcaster` or `Viewer`. |
Oops, something went wrong.