# AlexxIT WebRTC: real-time camera streaming for Home Assistant via go2rtc

> A Home Assistant custom component that connects the Lovelace UI to almost any IP camera stream using WebRTC, MSE, HLS or MJPEG as fallbacks. Starting with version 3, the underlying server is go2rtc, and go2rtc's unauthenticated web interface on port 1984 is a security detail worth reading before you install.

**AlexxIT/WebRTC** — Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.

- Repository: https://github.com/AlexxIT/WebRTC
- Stars: 2,187 · Forks: 244
- Language: JavaScript
- License: MIT
- Published: 2026-10-09 · Updated: 2026-10-09 · Language: en
- Canonical page: https://hysenlabs.com/projects/alexxit-webrtc

## go2rtc replaced RTSPtoWebRTC as the server engine starting version 3

Version 3 of this component changed its streaming server from RTSPtoWebRTC to go2rtc, which is a separate project also maintained by the same author. Both projects come from AlexxIT, but the change matters because go2rtc adds a wider protocol surface and a different security posture than its predecessor.

Sources go2rtc accepts include RTSP, RTMP, HTTP streams in FLV, MJPEG and JPEG formats, HomeKit cameras and USB cameras. A relay can then deliver that stream as RTSP, WebRTC, MSE/MP4 or MJPEG to whoever is watching. A single instance can serve multiple consumers at once. Delivery method is chosen automatically: go2rtc checks what codec the stream uses, what the browser can handle and how the network is set up, then picks accordingly.

Direct pass-through works for H264, H265, AAC, PCMU/PCMA and OPUS. Anything else triggers FFmpeg conversion at runtime. FFmpeg is not bundled with go2rtc, so this path requires FFmpeg to be installed separately on the host where go2rtc is running.

## Three installation paths with different control levels

Two installation paths are documented. HACS users go through HACS > Integrations > Plus > WebRTC > Install, while a manual setup means copying the webrtc folder from the latest release into /config/custom_components.

Either way, the next step is Settings > Devices & Services > Add Integration > WebRTC. One edge case to know: users who manage the Lovelace UI in YAML mode must register the card resource by hand. The README gives the block for that:

```yaml
url: /webrtc/webrtc-camera.js
type: module
```

A browser refresh follows. Users running the default UI mode skip that step entirely, since the custom_card registers itself.

Go2rtc has three deployment options. When installed through the component with no extra configuration, go2rtc downloads automatically on first run. An alternative is the go2rtc add-on or Frigate 12+ add-on. A third option places go2rtc as a binary or Docker container on any server in the LAN. In all cases, a go2rtc.yaml file in the Hass configuration folder controls go2rtc settings.

## Port 1984 runs without authentication by default

When go2rtc starts, it opens a web interface on port 1984 with no password. Any device on the local network can reach that port and browse the list of active camera streams. The README flags this directly: the word "access" appears in bold in the warning, and it notes that disabling the interface is possible through the go2rtc config.

This is worth thinking through before deployment, not after. A network where only a handful of trusted devices connect is a different situation from a shared building, a guest network or any setup where you cannot be certain who reaches that port. Importantly, the WebRTC component README does not document which go2rtc config key controls the web interface; it points to the go2rtc repository itself for that.

Adding authentication to the go2rtc web interface is not covered in the WebRTC component README at all. Turning the interface off is the only path described here when access needs to be restricted.

## What the webrtc-camera card accepts as a url or entity

A minimal card configuration requires one of three things: a url pointing to a stream, an entity pointing to a Home Assistant camera entity, or a streams list. The minimal form with a direct RTSP URL looks like this:

```yaml
type: 'custom:webrtc-camera'
url: 'rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0'
```

Alternatively, if go2rtc already knows the camera by name, a reference to the stream name works:

```yaml
type: 'custom:webrtc-camera'
url: 'camera1'
```

Or pointing to a Home Assistant camera entity:

```yaml
type: 'custom:webrtc-camera'
entity: camera.generic_stream
```

For url values the README lists supported protocols as rtsp, rtmp, http, onvif, dvrip, homekit, roborock and others supported by go2rtc. Jinja2 templates are accepted for cases where the URL or entity depends on state.

Multiple streams with named quality levels are supported through the streams key, where each entry can specify a url, a name, a mode and a media type. Switching between streams in the card is done by clicking the mode label.

## Full card configuration: modes, digital PTZ, intersection control and shortcuts

Beyond a URL, the card exposes a range of optional settings. Stream technology is controlled with mode, and the full default value is webrtc,webrtc/tcp,mse,hls,mjpeg, which represents the fallback order when a technology fails. Setting mode to a single value disables fallbacks.

Digital pan, tilt and zoom are enabled via the digital_ptz key. It defaults to all interaction methods active: mouse_drag_pan, mouse_wheel_zoom, mouse_double_click_zoom, touch_drag_pan, touch_pinch_zoom and touch_tap_drag_zoom are all true by default. Setting persist: true under digital_ptz preserves the zoom factor and viewport position across page reloads. Disabling all digital PTZ is done with digital_ptz: false.

Two settings control stream load behaviour. intersection determines when the card auto-stops the stream as you scroll; the default threshold is 50%, meaning the stream pauses when more than half the video element leaves the visible area. Setting it to 0.75 raises that threshold. background: true does the opposite, keeping the stream alive even when the card is off-screen, which trades bandwidth for faster initial display.

Custom shortcuts add action buttons to the card overlay. Each entry in the shortcuts list names an icon, a Home Assistant service and service data, as in the Record example that calls switch.toggle on a switch entity. Hardware PTZ controls are covered separately in a wiki page linked from the README.

## The component creates two services and no entities

After installation, the component registers two services in Home Assistant and a Lovelace custom card. No devices or entities are created.

That design shapes what is and is not available in automations. A camera viewed only through this component has no state to trigger on, no attribute to read in a template, and no history. An RTSP camera connected only through go2rtc and the webrtc-camera card shows up in Lovelace but is invisible to the automation engine unless a separate HA camera entity already exists for that camera.

For users who already have camera entities, the entity parameter in the card configuration bridges both worlds: the card shows the go2rtc stream while the entity continues to serve automations and record history through the rest of HA. For users who are adding cameras that have no HA entity, the viewing side works but the automation layer is absent by design.

## Two-way audio, snapshots and stream casting are in the TOC but not in the README excerpt

The README table of contents lists sections for two-way audio, snapshots to Telegram, cast or share stream, and stream to camera. Those are real documented features according to the TOC, but only the headings appear in the available portion of the README. No configuration keys, limits or protocol requirements for those features are present in the text that was retrievable.

This matters if two-way audio or casting is the reason you are evaluating this component. Both features exist according to the project's own documentation structure, but the specific configuration required, the protocols involved and any hardware requirements are in sections that would need to be read directly in the full README on GitHub.

Pan, tilt and zoom over hardware (physical PTZ cameras) is a separate feature from digital PTZ. Physical PTZ configuration is documented in a linked wiki page at the PTZ Config Examples URL, not in the README body.

## v3.6.1 on 2025-08-13, MIT license, last push on 2026-10-06

Version 3.6.1 was released on 2025-08-13. Before that, v3.6.0 was released on 2024-10-12 and v3.5.2 on 2024-04-07. Last push to the repository was on 2026-10-06. It is not archived.

Licensing is MIT, which means copying, modifying and redistributing with the license notice are allowed without restriction. The component is listed in HACS as a default integration, which simplifies installation and updates for users already on HACS.

Upgrade cost is a practical consideration here. Since go2rtc also updates independently, a component update and a go2rtc update can happen at different times. The basic user path lets go2rtc auto-update, but users who installed go2rtc as a separate binary or add-on manage its version separately. Breaking changes between a new go2rtc version and an older component version, or the reverse, are not documented in the WebRTC component README.

## Conclusion

Use this component if you run Home Assistant and want low-latency live video from an RTSP, RTMP, ONVIF or HomeKit camera in a Lovelace card, and you are prepared to configure go2rtc to restrict or disable its port 1984 web interface. Skip it if you need Home Assistant entities for each camera stream, since the component does not create them. Before relying on this in a production setup, check whether your camera codec is H264, H265, AAC, PCMU/PCMA or OPUS directly; if it is not, FFmpeg transcoding will run on the go2rtc host, and the README does not document the CPU cost of that path.

## FAQ

### How do I install the AlexxIT WebRTC component?

Via HACS by going to HACS > Integrations > Plus > WebRTC > Install, or manually by copying the webrtc folder from the latest GitHub release to /config/custom_components. After either method, add the integration at Settings > Devices & Services > Add Integration > WebRTC.

### What cameras does AlexxIT WebRTC support?

Go2rtc, which backs the component, accepts input from RTSP, RTMP, HTTP (FLV, MJPEG and JPEG), HomeKit cameras and USB cameras. The card also accepts any entity from Home Assistant's camera platform.

### Is the AlexxIT WebRTC component free and open source?

Yes. The repository is licensed MIT. It is listed as a default integration in HACS.

### What is port 1984 in WebRTC for Home Assistant?

Go2rtc, the server component, opens its own web interface on port 1984. According to the README, anyone on your local network can access active camera streams there without a password. The README notes that this can be disabled in the go2rtc config.

### Does AlexxIT WebRTC create Home Assistant entities?

No. According to the README, the component creates only two services and a Lovelace custom card. It creates no devices or entities.

## Sources

- [AlexxIT/WebRTC on GitHub](https://github.com/AlexxIT/WebRTC)
- [Issues](https://github.com/AlexxIT/WebRTC/issues)
- [License: MIT](https://github.com/AlexxIT/WebRTC/blob/master/LICENSE)
- [README](https://github.com/AlexxIT/WebRTC/blob/master/README.md)
- [Releases](https://github.com/AlexxIT/WebRTC/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/alexxit-webrtc
