Video coming soon…

📡 Setup go2rtc — Camera Streaming Gateway for RTSP, WebRTC & HLS

Deploy go2rtc on Ubuntu — an ultra-lightweight camera streaming gateway that ingests RTSP streams from any IP camera and redelivers them as WebRTC, HLS, MSE, or RTSP with sub-second latency.

⚠️ Always review any script before running it on your server. Test in a staging environment first.

📦 Resources & Setup Scripts

Before starting, please make sure to grab the required scripts from our GitHub repository to follow along with the video easily.

Automated install script — deploys go2rtc with RTSP ingestion and WebRTC/HLS/MSE restreaming on port 1984 and 8554.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/refs/heads/main/cameras/go2rtc/go2rtc-ubuntu.sh
chmod +x go2rtc-ubuntu.sh
sudo bash go2rtc-ubuntu.sh

Tutorial Steps

1 Download the Script

wget https://raw.githubusercontent.com/mhmdali94/Docker/refs/heads/main/cameras/go2rtc/go2rtc-ubuntu.sh

2 Make it Executable

chmod +x go2rtc-ubuntu.sh

3 Run the Installer

The script installs Docker if needed, creates /opt/go2rtc/go2rtc.yaml, and starts the container with port 1984 (API/UI) and 8554 (RTSP restream) exposed.

sudo bash go2rtc-ubuntu.sh

4 Access the Web UI

Open your browser and navigate to the go2rtc web interface:

http://<your-server-ip>:1984

Ports Used

PortPurpose
1984REST API + Web UI
8554RTSP restream server
8555WebRTC (TCP/UDP)

Overview

go2rtc is a single-binary, zero-dependency camera streaming application written in Go. It acts as a universal streaming gateway — ingesting video from RTSP cameras, RTMP feeds, HTTP sources, USB devices, or FFmpeg pipelines, then redelivering those streams simultaneously as WebRTC (sub-second latency), RTSP restream, HLS, MSE, or MJPEG. Unlike full NVR solutions, go2rtc does no recording or AI inference — it is purely a high-performance protocol bridge. It is embedded inside Frigate NVR as its streaming engine, and is used natively by Home Assistant for camera live view. A single go2rtc instance can handle dozens of cameras on modest hardware.

Why Use It

Most IP cameras provide RTSP streams that are difficult to view directly in a browser without plugins. go2rtc solves this by transcoding or repackaging the stream into browser-native protocols (WebRTC, HLS) with minimal CPU overhead. Because it is written in Go and uses native codec passthrough where possible, it uses a fraction of the CPU that FFmpeg-based solutions require. If you use Home Assistant, go2rtc is the official streaming backend for the camera live view card.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              go2rtc uses port 1984 for its REST API and web UI, port 8554 for RTSP restreaming, and port 8555 (TCP/UDP) for WebRTC. Port 1984 should be restricted to your LAN or protected with a reverse proxy. Port 8554 is consumed by NVR clients and Home Assistant — restrict to internal networks. Firewall example: ufw allow from 192.168.0.0/16 to any port 1984,8554,8555.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    Frigate NVR (covered in this academy) embeds go2rtc internally and adds AI object detection and recording on top. MediaMTX (formerly rtsp-simple-server) is a similar Go-based RTSP/WebRTC gateway with a slightly different feature set. Nginx RTMP module can handle RTMP-based restreaming but lacks WebRTC support. For full NVR solutions with recording, consider Frigate, Shinobi, or ZoneMinder.

                    When Not to Use It

                    If you need recording, AI object detection, or event-based clip storage, use Frigate NVR instead. go2rtc is purely a streaming gateway with no persistence layer. If you only have a single camera and just want to view it in a browser, many modern IP cameras already provide built-in HTTP streaming that may be sufficient.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support.

                      Contact Us

                      Frequently Asked Questions

                      What protocols does go2rtc support?

                      go2rtc supports RTSP, RTMP, WebRTC, HLS, MSE, MJPEG, and FFmpeg as input sources. Output formats include WebRTC (sub-second latency), RTSP restream on port 8554, HLS/MSE for browser playback, and MJPEG snapshots.

                      How does go2rtc compare to Frigate?

                      go2rtc is a pure streaming gateway with no recording or AI detection. Frigate actually embeds go2rtc internally as its streaming engine. Use go2rtc standalone when you only need live streaming without the overhead of a full NVR stack.

                      Can go2rtc stream to Home Assistant?

                      Yes. Home Assistant's camera integration can use go2rtc's RTSP restream on port 8554 or configure it as the WebRTC provider for near-zero-latency live view in the Lovelace dashboard camera card.

                      What is the API port for go2rtc?

                      go2rtc exposes its REST API and web UI on port 1984 by default. The RTSP restream server listens on port 8554. WebRTC ICE uses port 8555 (TCP/UDP). All three should be restricted to your internal network.

                      Does go2rtc support audio?

                      Yes. go2rtc passes through or transcodes audio alongside video. WebRTC delivery includes both audio and video. It supports G.711, G.722, PCMU, PCMA, AAC, and Opus codecs depending on what the source camera provides.