{"id":13526280,"url":"https://github.com/tl-open-source/tl-rtc-file","last_synced_at":"2025-12-16T01:23:27.031Z","repository":{"id":45557281,"uuid":"392965268","full_name":"tl-open-source/tl-rtc-file","owner":"tl-open-source","description":"WebRTC P2P online web media streaming tool (for files, video, screen, live streaming, text) with management and statistical monitoring capabilities.","archived":false,"fork":false,"pushed_at":"2024-07-13T01:05:16.000Z","size":33682,"stargazers_count":2586,"open_issues_count":8,"forks_count":267,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-10T04:53:17.885Z","etag":null,"topics":["demotool","filetransfer","node","p2p","turnserver","webrtc","websocket"],"latest_commit_sha":null,"homepage":"https://im.iamtsm.cn/website/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tl-open-source.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-05T08:29:41.000Z","updated_at":"2025-04-09T16:39:05.000Z","dependencies_parsed_at":"2022-09-13T23:11:56.585Z","dependency_job_id":"3e236d95-4465-4583-853b-a1d725f7909e","html_url":"https://github.com/tl-open-source/tl-rtc-file","commit_stats":null,"previous_names":["tl-open-source/tl-rtc-file","iamtsm/tl-rtc-file"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tl-open-source%2Ftl-rtc-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tl-open-source%2Ftl-rtc-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tl-open-source%2Ftl-rtc-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tl-open-source%2Ftl-rtc-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tl-open-source","download_url":"https://codeload.github.com/tl-open-source/tl-rtc-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149958,"owners_count":22022851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demotool","filetransfer","node","p2p","turnserver","webrtc","websocket"],"created_at":"2024-08-01T06:01:27.416Z","updated_at":"2025-12-16T01:23:26.946Z","avatar_url":"https://github.com/tl-open-source.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","文件管理系统","websocket","Projects"],"sub_categories":["Chat"],"readme":"# tl-rtc-file-tool (tl webrtc file(media) tools)\n\n[![](https://img.shields.io/badge/webrtc-p2p-blue)](https://webrtc.org.cn/)\n[![](https://img.shields.io/badge/code-simple-green)](https://github.com/iamtsm/tl-rtc-file/)\n[![](https://img.shields.io/badge/large%20file-support-green)](https://github.com/iamtsm/tl-rtc-file/)\n[![](https://img.shields.io/badge/deployment-private-yellow)](https://github.com/iamtsm/tl-rtc-file/)\n[![](https://img.shields.io/badge/platform-unlimited-coral)](https://github.com/iamtsm/tl-rtc-file/)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://im.iamtsm.cn/file\" target=\"_blank\"\u003eDemo\u003c/a\u003e ｜\n\u003ca href=\"https://im.iamtsm.cn/document\" target=\"_blank\"\u003eDocument\u003c/a\u003e ｜\n\u003ca href=\"https://hub.docker.com/u/iamtsm\" target=\"_blank\"\u003eDockerHub\u003c/a\u003e ｜\n\u003ca href=\"https://github.com/tl-open-source/tl-rtc-file/blob/master/doc/README_ZN.md\" target=\"_blank\"\u003e中文文档\u003c/a\u003e ｜ QQ Group:\n\u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=TKCwMBjN\" target=\"_blank\"\u003e624214498\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Background](#background)\n- [Advantages](#advantages)\n- [Pre-deployment Considerations](#pre-deployment-considerations)\n- [Self-Deployment](#self-deployment)\n    - [Installing Dependencies](#installing-dependencies)\n    - [Starting the Service](#starting-the-service)\n- [Docker Deployment](#docker-deployment)\n    - [One-Click Docker Script](#one-click-docker-script)\n    - [Using docker-compose](#using-docker-compose)\n    - [Self-Building and Starting the Image](#self-building-and-starting-the-image)\n- [Other Deployment Methods](#other-deployment-methods)\n- [Configuring the Database (Optional)](#configuring-the-database-optional)\n- [Admin Panel (Optional)](#admin-panel-optional)\n- [WeChat Notifications (Optional)](#wechat-notifications-optional)\n- [OSS Cloud Storage (Optional)](#oss-cloud-storage-optional)\n- [Chat-GPT (Optional)](#chat-gpt-optional)\n- [Configuring turnserver (Optional for LAN, Required for WAN)](#configuring-turnserver-optional-for-lan-required-for-wan)\n- [Overview Diagram](#overview-diagram)\n- [License](#license)\n- [Disclaimer](#disclaimer)\n\n## Background\n\nThis project was developed based on the topic of the graduation project in 2020. It allows file transfer using WebRTC in web applications and supports transferring large files.\n\n## Advantages\n\nFragmented transmission, cross-platform, platform-independent, easy to use, no speed limit in the local network (up to over 70 MB/s in the LAN), supports private deployment, supports drag-and-drop sending of multiple files, web file preview. Many additional features have been added, such as local screen recording, remote screen sharing (zero-latency), remote audio and video calls (zero-latency), live streaming (zero-latency), password-protected rooms, OSS cloud storage, relay service settings, WebRTC detection, WebRTC statistics, text transmission (group chat, private chat), public chat, remote whiteboard, AI chatbox, feature-rich admin panel, real-time execution log display, robot alert notifications, and more.\n\n## Pre-deployment Considerations\n\nWhether it's self-deployment, Docker deployment, or other script deployments, you need to modify the corresponding configurations in `tlrtcfile.env` before performing the following operations. Further configuration modifications and service restarts are required.\n\nOf course, you can also use the default configurations without modifications, but the default configurations are only suitable for testing on localhost. They won't be accessible to others, making it impossible for others to use. Therefore, if you intend to deploy on a server for local network or public network users, you must configure `tlrtcfile.env` accordingly.\n\n## Self-Deployment\n#### Installing Dependencies\n\nInstall Node.js 14.21.x or above, and npm. Then, navigate to the project directory and run the following command:\n```\ncd svr/\n\nnpm install\n```\nFor the first run, execute the following command:\n```\nnpm run build:pro\n```\nIf you need to develop or modify the frontend pages, use this command. If not, you can skip this step:\n```\nnpm run build:dev\n```\n\n#### Starting the Service\n\nStart the following two services. Choose one mode to start. The only difference between them is that the HTTPS mode is required to use features like audio/video streaming, live streaming, and screen sharing. Other features are not affected.\n\nAfter starting in HTTP mode, access the service at `http://your_machine_ip:9092`.\n\n- Start the API and socket services:\n```\nnpm run http-api\nnpm run http-socket\n```\n\nOr, start in HTTPS mode and access the service at `https://your_machine_ip:9092`.\n\n- Start the API and socket services:\n```\nnpm run https-api\nnpm run https-socket\n```\n\n## Docker Deployment\n\nCurrently, both `official images` and `self-built images` are supported. For official images, there are two ways to operate: `docker script startup` and `docker-compose startup`.\n\n#### One-Click Docker Script\n\nNavigate to the `bin/` directory and execute the `auto-pull-and-start-docker.sh` script:\n```\nchmod +x ./auto-pull-and-start-docker.sh\n./auto-pull-and-start-docker.sh\n```\n\n#### Using docker-compose\n\nIn the main directory, execute the corresponding command based on your Docker Compose version:\n\n- For Docker Compose V1:\n```\ndocker-compose --profile=http up -d\n```\n\n- For Docker Compose V2:\n```\ndocker compose --profile=http up -d\n```\n\n#### Self-Building and Starting the Image\n\nNavigate to the `docker/` directory and execute the corresponding command based on your Docker Compose version:\n\n- For Docker Compose V1:\n```\ndocker-compose -f docker-compose-build-code.yml up -d\n```\n\n- For Docker Compose V2:\n```\ndocker compose -f docker-compose-build-code.yml up -d\n```\n\n## Other Deployment Methods\n\nIn addition to the manual installation, Docker official images, and self-built Docker images, there are other methods such as automatic scripts and one-click deployments on hosting platforms.\n\nAfter downloading the project, navigate to the `bin/` directory and choose the appropriate system script to execute. It will automatically detect the environment, install dependencies, and start the service.\n\n#### Automatic script for Ubuntu (e.g., Ubuntu 16)\n\n- If the script doesn't have execution permission, run the following command:\n```\nchmod +x ./ubuntu16/*.sh\n```\n\n- If using HTTP, execute this script:\n```\n./auto-check-install-http.sh\n```\n\n- If using HTTPS, execute this script:\n```\n./auto-check-install-https.sh\n```\n\n- To stop the service:\n```\n./auto-stop.sh\n```\n\n#### Automatic script for Windows\n\n- If using HTTP, execute this script:\n```\nwindows/auto-check-install-http.bat\n```\n\n- If using HTTPS, execute this script:\n```\nwindows/auto-check-install-https.bat\n```\n\n#### One-Click Deployment on Zeabur Platform\n\n[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/898TLE?referralCode=iamtsm)\n\n## Other Configuration Options\n\n#### Configuring the Database (Optional)\n\nYou need to install MySQL database manually, create a database named `webchat`, and then modify the database-related configurations in `tlrtcfile.env`.\n\n#### Admin Panel (Optional)\n\nPrerequisite: Database configuration must be enabled.\n\nModify the admin panel-related configurations in `tlrtcfile.env`. After starting, enter the configured room number and password to access the admin panel.\n\n#### WeChat Notifications (Optional)\n\nIf you need to set up notification for access and error alerts, you can create a WeChat Work robot and get an API key. Modify the WeChat notification configurations in `tlrtcfile.env`.\n\n#### OSS Cloud Storage (Optional)\n\nThe project currently supports Seafile storage integration, and future updates will include support for Alibaba Cloud, Tencent Cloud, Qiniu Cloud, and self-hosted server storage methods. Modify the OSS storage configurations in `tlrtcfile.env`.\n\n#### Chat-GPT (Optional)\n\nIntegrated with the OpenAI API, this project includes a chat dialog. Modify the OpenAI configurations in `tlrtcfile.env`.\n\n#### Configuring turnserver (Optional for LAN, Required for WAN)\n\nThere are two ways to generate TURN server credentials: fixed credentials (recommended) and time-limited credentials. Choose one method. The following example uses Ubuntu.\n\nInstall coturn:\n```\nsudo apt-get install coturn\n```\n\nFor time-limited credentials, modify the configuration file `docker/coturn/turnserver-with-secret-user.conf`.\n\n- Modify the fields in the configuration file:\n```\n`listening-device`, `listening-ip`, `external-ip`, `static-auth-secret`, `realm`\n```\n- Start the turnserver:\n```\nturnserver -c /path/to/conf/turn/turnserver-with-secret-user.conf\n```\n\nFor fixed credentials, modify the configuration file `docker/coturn/turnserver-with-fixed-user.conf`.\n\n- Modify the fields in the configuration file:\n```\n`listening-device`, `listening-ip`, `external-ip`, `user`, `realm`\n```\n- Generate a user:\n```\nturnadmin -a -u username -p password -r realm_in_config_file\n```\n- Start the turnserver:\n```\nturnserver -c /path/to/docker/coturn/turnserver-with-secret-user.conf\n```\n\nAfter setting up coturn, configure the WebRTC-related information in the corresponding `tlrtcfile.env` configuration.\n\n## Overview Diagram\n\n![image](doc/tl-rtc-file-tool.jpg)\n\n## License\n\n### MIT License Copyright (c) 2020 ~ 2023 iamtsm\n\n## Disclaimer\n\n[Disclaimer](DISCLAIMER.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftl-open-source%2Ftl-rtc-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftl-open-source%2Ftl-rtc-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftl-open-source%2Ftl-rtc-file/lists"}