A simple IPTV restream and synchronization (watch2gether) application with web frontend. Share your iptv playlist and watch it together with your friends.
- IPTV Web player supporting multiple playlists at once.
- Connect with multiple Devices to 1 IPTV Stream, if your provider limits current streaming devices (restream mode).
- Proxy all Requests through one IP (proxy and restream mode).
- Helps with CORS issues.
- Synchronize IPTV streaming with multiple devices: Synchronized playback and channel selection for perfect Watch2Gether.
- Share your iptv access without revealing your actual stream-url (privacy-mode) and watch together with your friends.
IPTV Player - IPTV web player with support for any other iptv players by exposing the playlist.
Restream / Proxy - Proxy your iptv streams through the backend.
Synchronization - The selection and playback of the stream is perfectly synchronized for all viewers.
Channels - Browse an Xtream provider's live-channel directory and choose the channels available in the player.
Live chat - chat with other viewers using a display name saved in your browser.
Clone the repo
git clone https://github.com/antebrl/IPTV-Restream.gitMake sure to have docker up & running. Start with docker compose
docker compose up -dOpen http://localhost
To keep the entire site out of public view, copy .env.example to .env and
set separate shared credentials for friends and administrators:
AUTH_VIEWER_USERNAME=friends
AUTH_VIEWER_PASSWORD=replace-with-a-long-random-passphrase
AUTH_ADMIN_USERNAME=admin
AUTH_ADMIN_PASSWORD=replace-with-a-different-long-random-passphraseThe backend validates these shared credentials on the StreamHub login screen
and creates an opaque, revocable session. The browser keeps the session in an
HttpOnly, same-site cookie, which works consistently for the API, WebSocket,
proxied media, and restreamed segments. Both users can watch and chat, while
only the admin user can open /admin/ or perform privileged operations.
Important
Use HTTPS when exposing the site publicly. TLS protects both the submitted credentials and the resulting session cookie in transit.
The development Compose overlay bind-mounts the source tree into the containers. Vite hot-reloads frontend changes, and Node automatically restarts when backend JavaScript changes.
make devOpen http://localhost. Stop the stack with Ctrl+C; use make dev-down to
remove its containers. A source-only edit does not require a rebuild. After
changing a package.json, lockfile, or Dockerfile, rebuild once with:
make dev-buildThe equivalent command without Make is:
docker compose -f docker-compose.yml -f docker-compose.dev.yml upTo run a production-style stack locally, build it and start it in the background with:
make prodImportant
If a channel/playlist won't work, please try with proxy or restream mode. This fixes most of the problems! See also Channel Mode.
Configure the Xtream portal URL, username, and password under Admin → Settings. Then use Admin → Channels to browse channels from player_api.php, add them to the player, and choose direct, proxy, or restream mode.
See the DigitalOcean deployment guide to deploy prebuilt, commit-tagged images from GHCR. The server only pulls images; all builds happen in GitHub Actions.
These are some tested playlists as an example. Use your own iptv playlist for the best quality!
- Free TV Channels: Huge collection of free tv-channels. One playlist for every country.
Channel records and admin settings are stored in /channels/iptv-restream.db.
Directly uses the source stream. Won't work with most of the streams, because of CORS, IP/Device restrictions. Is also incompatible with custom headers and privacy mode.
The stream requests are proxied through the backend. Allows to set custom headers and bypass CORS. This mode is preffered. Only switch to restream mode, if proxy mode won't work for your stream or if you have synchronization issues.
The backend service caches the source stream (with ffmpeg) and restreams it. Can help with hard device restrictions of your provider or synchroization problems (when your iptv channels have no programDateTime). But it can lead to longer initial loading times and performance issues after time.
Which streaming mode should I choose for the channel?
Generally: You should try with direct mode first, switch to proxy mode if it doesn't work and switch to restream mode if this also doesn't work.
Proxy mode is most likely the mode, you will use! You will need restream mode especially when your iptv playlist has no programDateTime set and you want to have playback synchronization.
How can I use the channels on any other iptv player (e.g. on TV)?
Please click on the 📺 (TV-button) in the top-right in the frontend. There you'll find the playlist you have to use in any other iptv player. This playlist contains all your channels and one CURRENT_CHANNEL, which forwards the content of the currently played channel. If this playlist does not work, please check if the base-url of the channels in the playlist is correct and set the
BACKEND_URLin thedocker-compose.ymlif not.
How do I add channels from my Xtream account?
Open Admin → Settings and save the Xtream portal base URL and credentials. Open Admin → Channels to search or filter the live-channel directory. Selecting Add opens the channel dialog with the provider's name and logo prefilled; the server creates the MPEG-TS stream URL directly from the Xtream stream ID. No M3U download is used.
Error: Bind for 0.0.0.0:80 failed: port is already allocated
To fix this, change the port mapping in the docker-compose to
X:80e.g.8080:80. Make also sure that port X is open in the firewall configuration if you want to expose the application.
Is it possible to run components seperately, if I only need the frontend OR backend?
If you only need the restream functionality and want to use another iptv player (e.g. VLC), you may only run the backend.
If you only need the synchronization functionality, you may only run the frontend.Be aware, that this'll require additional configuration/adaption and won't be officially supported. It is recommended to run the whole project as once.
Is there a option to limit access of channel management?
Yes, you can enable Admin Mode in the configuration to restrict channel management to authenticated administrators only.
Feel free to open discussions and issues for any type of requests. Don't hesitate to contact me, if you have any problems with the setup.
If you like the project and want to support future development, please leave a ⭐.

