mirotalk Documentation

Open-source, self-hosted P2P WebRTC video conferencing for fast, private real-time communication. Create browser-based meeting rooms with no downloads or...

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy mirotalk on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name mirotalk --restart always coturn/coturn
Configured Services & Ports
โš™๏ธ coturn
image: coturn/coturn
docker-compose.yml
yaml (docker-compose.yml)
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

Technical Documentation: miroslavpejic85/mirotalk

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

MiroTalk P2P - Open Source Self-Hosted WebRTC P2P Video Conferencing

Open Source Peer-to-Peer Video Conferencing You Can Self-Host in Minutes

Free, Secure, Fast Real-Time Communication - up to 8K, 60fps. Works in All Browsers and Platforms.

[Recall.ai](https://www.recall.ai/?utm_source=github&utm_medium=sponsorship&utm_campaign=miroslavpejic85-mirotalk) - API for meeting recording


โœจ Why MiroTalk P2P?

MiroTalk P2P Other Solutions
๐Ÿ’ฐ Cost Free & Open Source (AGPLv3). One-time fee licenses available Paid plans
๐Ÿ  Self-hosted โœ… Full control over your data โŒ Cloud only
๐Ÿ”’ Privacy Your server, your rules Third-party data processing
โฑ๏ธ Time limits Unlimited 40-60 min on free tiers
๐Ÿข Rooms Unlimited concurrent rooms Limited
๐ŸŽฅ Resolution Up to 8K @ 60fps Up to 1080p
๐ŸŒ Languages 133 languages ~30-80
๐Ÿ”Œ API Full REST API included Paid add-on
๐Ÿค– AI Features ChatGPT (OpenAI) integration Paid AI add-ons
๐Ÿงฉ Rebrand Full source code, white-label ready Limited branding options
๐Ÿ“ฆ Deploy Docker, Node.js, one-click install N/A (SaaS only)

๐Ÿš€ Features

  • ๐ŸŽฅ Video up to 8K @ 60fps ยท Screen sharing ยท Recording ยท Picture-in-Picture
  • ๐Ÿ’ฌ Chat with Markdown & emoji ยท Collaborative whiteboard ยท File sharing
  • ๐Ÿค– ChatGPT (OpenAI) integration ยท Speech recognition
  • ๐Ÿ”’ OIDC auth ยท Host protection ยท JWT credentials ยท Room passwords ยท Peer-to-peer encryption
  • ๐Ÿ”Œ REST API ยท Slack & Mattermost ยท Embeddable iframe & widget ยท 133 languages

See all features โ†’

โšก Quick start

Start in 6 commands:

bash
git clone https://github.com/miroslavpejic85/mirotalk.git
cd mirotalk
cp .env.template .env
cp app/src/config.template.js app/src/config.js
npm install
npm start

Open http://localhost:3000 - done!

๐Ÿ–ผ๏ธ Camera backgrounds

In Settings > Video > Background, select Off, Blur, or Image. Local PNG, JPEG, and WebP images up to 10 MB are processed in your browser and are not uploaded. Effects appear in your camera preview, outgoing camera video, and camera recordings. Screen sharing remains unaffected, including when sharing your camera and screen together.

Background controls are also available in prejoin and the quick video menu. Select Image, then use the file picker (or Choose image in the quick video menu) to choose or replace an image. The selected filename stays synchronized between prejoin and Video settings.

Effects require WebGL2 and canvas stream capture; blur also requires canvas filter support. MediaPipe Tasks Vision 0.10.21 and its WASM files are lazy-loaded from jsDelivr, and the selfie segmentation model (version 1) is loaded from Google Storage. These hosts must be reachable and permitted by any custom CSP (including WASM execution). Failures fall back to the camera without effects.

Effect output is capped at 1280 x 720 and 15 FPS. Off uses the original camera track without processing. Performance varies by device; background tabs may throttle rendering.

๐Ÿณ Docker

Prerequisites: Install Docker Engine and Docker Compose - Image available on Docker Hub

bash
git clone https://github.com/miroslavpejic85/mirotalk.git
cd mirotalk
cp .env.template .env
cp app/src/config.template.js app/src/config.js
cp docker-compose.template.yml docker-compose.yml
docker-compose pull    # optional: pull official image
docker-compose up      # add -d to run in background

Open http://localhost:3000 - done!

Note:
Edit app/src/config.js, .env, and docker-compose.yml to customize your setup.

๐Ÿ“š Documentation

For detailed guides and references, visit the official documentation:

โ˜๏ธ Recommended Hosting Providers

Provider Description Link
One-click install from the Cloudron App Store. Automates deployment, updates, backups, and user management. Get Started
High-performance cloud servers and dedicated root servers with top-tier reliability. Powers our live demo. Explore Hetzner
Enterprise-grade performance at unbeatable prices. Scalable and reliable. Explore Netcup
Fast, reliable hosting with 24/7 support and great performance. Check out Hostinger
Top-tier German hosting, dedicated servers, VPS, and web hosting at unbeatable prices. Explore Contabo

To set up your own instance of MiroTalk P2P on a dedicated cloud server, please refer to our comprehensive self-hosting documentation.

๐Ÿ™ Credits

๐Ÿค Contributing

Contributions are welcome and greatly appreciated! Whether it's bug fixes, features, or documentation - every contribution helps.

  1. Fork the repository
  2. Create your feature branch
  3. Run npm run lint before committing
  4. Submit a pull request

Have questions? Join our Discord community!

๐Ÿ“„ License

MiroTalk P2P is free and open-source under the terms of AGPLv3 (GNU Affero General Public License v3.0). Please respect the license conditions, In particular modifications need to be free as well and made available to the public. Get a quick overview of the license at Choose an open source license.

To obtain a MiroTalk P2P license with terms different from the AGPLv3, you can conveniently make your purchase on CodeCanyon. This allows you to tailor the licensing conditions to better suit your specific requirements.

โค๏ธ Support the project

Do you find MiroTalk P2P indispensable for your needs? Join us in supporting this transformative project by becoming a backer or sponsor. By doing so, not only will your logo prominently feature here, but you'll also drive the growth and sustainability of MiroTalk P2P. Your support is vital in ensuring that this valuable platform continues to thrive and remain accessible for all. Make an impact - back MiroTalk P2P today and be part of this exciting journey!

๐Ÿ™ Past Sponsors

We are grateful to our past sponsors for their support!

๐Ÿ“ข Advertisers



โœจ EffectsSDK

Enhance your video conferencing with advanced virtual backgrounds and noise suppression. EffectsSDK offers powerful SDKs and plugins for fast integration.


This project is tested with BrowserStack.



Contributors


Overview (`coturn/README.md`)

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.
  3. Use Let's Encrypt and Certbot for SSL certificates. Replace YOUR.DOMAIN in docker-compose.yml with your actual domain name.

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 <service_name>

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.


Overview (`kubernetes/README.md`)

k8s deployment

TLDR; and do not care way

bash
$ make
$ sed -i s/localhost/myshinydomain.tld/g env.txt
$ make prepare
$ make deploy

Understanding way

If you would like to deploy Mirotalk to kubernetes
this set of files can help you in that task

Bellow is explanation of files in this folder which will form one output file in output folder

../.env.template and your file env.txt that you should prepare

Configuration file that is for now used to configure deployment
you should copy ../.env.template to current directory as env.txt and edit values inside to your liking

bash
$ cp ../.env.template env.txt

Change values (if nothing else HOST variable must be changed so your ingress would recognize it and send requests to your deployed application),
if you do not have public domain you can use free service called nip.io with domain like p2p.192-168-1-1.nip.io (or sslip.io)

bash
$ sed -i s/localhost/myshinydomain.tld/g env.txt

p2p-deployment.yaml

Main deployment file where you change image file if you would like to use yours if not official one (image: tag)

p2p-cert.yaml

This file represent definition of certificate (request) when using Cert Manager to generate letsencrypt or private certificates for your domain will be pulled out from env.txt

p2p-ingress.yaml

This is generic ingress object in kubernetes that is responsible to route external traffic to mirotalk deployed application and if used in conjuction with p2p-cert.yaml (default) will provide TLS enabled access to your mirotalk instance

p2p-service.yaml

Service required for ingress to be able to know how to access deployment

Makefile

Helper file that allows running it to configure application how you would like

after creating and changing configuration file (env.txt) run these two tasks, prepare will create deployment file
and deployment will create configMap from prepared env.txt file.

Please run after reading all this:

bash
$ make
# edit env.txt or use sed as in TLDR section :)
$ make prepare
$ make deploy

Overview (`webhook/README.md`)

Webhooks Example

This example shows how to set up a server to listen for MiroTalk P2P webhook events (join, disconnect).

Step 1: Enable Webhooks

Edit app/src/config.js to enable webhooks:

javascript
webhook: {
    enabled: true, // Enable webhook functionality
    url: 'http://localhost:8888/webhook-endpoint', // Webhook server URL
},

Step 2: Run the Webhook Server

  1. Install dependencies:

    bash
    npm install
  2. Start the server:

    bash
    npm start

Step 3: Webhook Events

MiroTalk P2P sends HTTP POST requests to the specified URL with event data:

Example Payload:

json
{
    "event": "join",
    "data": {}
}
  • Events: join, disconnect.
  • Data: Includes event and custom data.

Overview (`widgets/README.md`)

MiroTalk Widgets


This directory contains embeddable example widgets for MiroTalk that can be integrated into any website or application.


Overview (`app/api/README.md`)

Create a Meeting

To initiate a meeting, send an HTTP request to MiroTalkโ€™s server with your API key. Replace the default secret key in .env with your own.

bash
API_KEY_SECRET=mirotalkp2p_default_secret

Use the following examples to make API calls:

bash
# Node.js
node meeting.js
node join.js
node token.js

# PHP
php meeting.php
php join.php
php token.php

# Python
python3 meeting.py
python3 join.py
python3 token.py # rename token in something else

# Bash
./meeting.sh
./join.sh
./token.sh

The server response will contain a meeting URL that can be embedded in your client using an iframe.


Embed a Meeting

To embed a meeting in your service or app, use an iframe with the source attribute set to the meeting URL obtained from the HTTP response.

html
<iframe
    allow="camera; microphone; speaker-selection; display-capture; fullscreen; clipboard-read; clipboard-write; web-share; autoplay; picture-in-picture"
    src="https://p2p.mirotalk.com/join/test"
    style="height: 100vh; width: 100vw; border: 0px;"
></iframe>

Fast Integration

Integrate video meetings into your website or application quickly by incorporating the following iframe code:

html
<iframe
    allow="camera; microphone; speaker-selection; display-capture; fullscreen; clipboard-read; clipboard-write; web-share; autoplay; picture-in-picture"
    src="https://p2p.mirotalk.com/newcall"
    style="height: 100vh; width: 100vw; border: 0px;"
></iframe>

Overview (`app/ssl/README.md`)

Expose MiroTalk on HTTPS

Generate a self-signed certificate

bash
# install openssl 4 ubuntu
apt install openssl
# install openssl 4 mac
brew install openssl

# self-signed certificate
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem

# https://www.sslchecker.com/certdecoder

Overview (`public/lang/README.md`)

In-room UI translations

Configuration

Set brand.app.language and brand.app.translationMode in your app
configuration; see config.template.js. The
default language is en; the default translation mode is google.

Mode Behavior
google Use Google Translate; ignore native translation files.
auto Use a native file when available; otherwise use Google Translate.
native Use native files only; untranslated text remains English.

In a room, users can override the translation mode from Settings > Language.
The mode override is persisted in browser local storage and reused in
subsequent rooms on the same browser.
When users change translation mode, the app shows a short notice and reloads
the page so the selected mode can be fully applied.

Mode override precedence is: browser override โ†’ server config default.

Adding a language

  1. Copy en.json to a file named for the language code, such as
    hu.json.
  2. Translate the values, keeping the English keys unchanged.
  3. Add the language code, flag, and native name to LANG_DISPLAY in
    i18n.js. For right-to-left languages, also add the code to
    RTL_LANGS.
  4. Set brand.app.language to the language code and
    brand.app.translationMode to auto or native.

Namespaces

Namespace Content
tooltips Hover hints
buttons Button text and attributes
labels Static text, headings, and label attributes
dialogs Popup titles, text, buttons, and inputs
toasts Notifications

Fallback behavior

Missing namespaces, keys, or empty values use the original English text, so
translations can be added incrementally. Keep keys, including their punctuation
and casing, identical to the English source. Preserve placeholders such as
{name} in translated values.

In auto mode, Google Translate is used if the language file is unavailable.
When a native file is loaded, missing entries remain English; they do not fall
back individually to Google Translate.

Synchronize translation keys

After changing in-room UI strings, run this from the repository root:

bash
npm run lang

The script regenerates en.json and synchronizes other language files,
preserving existing translations, keeping keys in the same order as en.json,
adding missing keys with English values, and removing stale keys. Review the
changes before committing.


Coturn (`docs/coturn.md`)

Install Coturn STUN/TURN server

What are STUN and TURN in the context of network communication?

https://docs.mirotalk.com/coturn/stun-turn/

How can I set up and configure my own STUN and TURN servers?

https://docs.mirotalk.com/coturn/installation/



Ngrok (`docs/ngrok.md`)

MiroTalk P2P - Ngrok

What is the purpose and functionality of Ngrok?

https://docs.mirotalk.com/ngrok/ngrok/

How to exposing MiroTalk P2P with Ngrok?

https://docs.mirotalk.com/mirotalk-p2p/ngrok/



Self Hosting (`docs/self-hosting.md`)

MiroTalk P2P - Self Hosting

How can I self-host MiroTalk P2P on my own server?

https://docs.mirotalk.com/mirotalk-p2p/self-hosting/

Automation scripts

https://docs.mirotalk.com/scripts/about/



--- METRICS ---