diff --git a/docs/ngrok.md b/docs/ngrok.md index 98acd2b9..f4cc1195 100644 --- a/docs/ngrok.md +++ b/docs/ngrok.md @@ -2,9 +2,7 @@ If you want to expose MiroTalk SFU from your `Local PC` to outside in `HTTPS`, you need to do 2 things: -1. Add the [Ngrok](https://ngrok.com) `authToken` and change the `announcedIp` - -In `app/src/` copy config.template.js to `config.js` then edit it +1. Add the [Ngrok](https://ngrok.com) `authToken` and change the `announcedIp` on `app/src/config.js`. ```js /* @@ -18,6 +16,8 @@ In `app/src/` copy config.template.js to `config.js` then edit it announcedIp: 'Your-Public-Static-IP-here' <--- take it from https://api.ipify.org ``` +--- + 2. You need to do a `port forwarding` on your router, something like this: | Name | Protocol | Port Wan | Port Lan | IP Destination | @@ -35,12 +35,14 @@ server_tunnel: 'https://xxxxxxxxxxxxxxxxxx.ngrok.io' So open it in your browser, join in the room, share it to whom you want and wait participants to join. -
+
+ +--- ## Do you find MiroTalk useful? Show your appreciation by becoming a [backer or sponsor](https://github.com/sponsors/miroslavpejic85) -Thank you for your support! ❤️ +Thank you for your support! --- diff --git a/docs/self-hosting.md b/docs/self-hosting.md index 7a5f7d1e..9a4f4815 100644 --- a/docs/self-hosting.md +++ b/docs/self-hosting.md @@ -6,6 +6,8 @@ Requirments: - [Node.js](https://nodejs.org/en/) at least 12x, better `16.15.1 LTS` - Your domain example: `your.domain.name` (Set a DNS A record for that domain that point to Your Server public IPv4) +--- + Install the requirements (Note: Many of the installation steps require `root` or `sudo` access) ```bash @@ -27,6 +29,8 @@ $ apt-get install -y nodejs $ npm install -g npm@latest ``` +--- + Quick start ```bash @@ -38,6 +42,8 @@ $ cd mirotalksfu $ cp app/src/config.template.js app/src/config.js ``` +--- + Change the `announcedIp` with your `Server public IPv4` on `app/src/config.js` ```js @@ -55,6 +61,8 @@ Set the `inbound rules` if you have the Firewall enalbled | 40000-40100 | TCP | 0.0.0.0/0 | RTC port ranges tcp | | 40000-40100 | UDP | 0.0.0.0/0 | RTC port ranges udp | +--- + ```bash # Install dependencies - be patient, the first time will take a few minutes, in the meantime have a good coffee ;) $ npm install @@ -64,6 +72,8 @@ $ npm start Check if is correctly installed: https://your.domain.name:3010 +--- + Using [PM2](https://pm2.keymetrics.io) to run it as deamon ```bash @@ -71,7 +81,9 @@ $ npm install -g pm2 $ pm2 start app/src/Server.js ``` -If you want to use Docker +--- + +If you want to use `Docker` ```bash # Install docker and docker-compose @@ -90,6 +102,8 @@ $ docker-compose up -d Check if is correctly installed: https://your.domain.name:3010 +--- + In order to use it without the port number at the end, and to have encrypted communications, we going to install [nginx](https://www.nginx.com) and [certbot](https://certbot.eff.org) ```bash @@ -169,6 +183,8 @@ $ sudo certbot certificates Check Your MiroTalk SFU instance: https://your.domain.name/ +--- + ## Update script In order to have always Your MiroTalk SFU updated to latest, we going to create a script @@ -178,6 +194,8 @@ In order to have always Your MiroTalk SFU updated to latest, we going to create $ vim sfuUpdate.sh ``` +--- + If you use `PM2`, paste this: ```bash @@ -190,6 +208,8 @@ sudo npm install pm2 start app/src/Server.js ``` +--- + If you use `Docker`, paste this: ```bash @@ -203,6 +223,8 @@ docker images |grep '' |awk '{print $3}' |xargs docker rmi docker-compose up -d ``` +--- + Make the script executable ```bash @@ -219,10 +241,12 @@ To update your instance of MiroTalk SFU at latest commit, execute:
+--- + ## Do you find MiroTalk useful? Show your appreciation by becoming a [backer or sponsor](https://github.com/sponsors/miroslavpejic85) -Thank you for your support! ❤️ +Thank you for your support! ---