Areas we serve

Self-Hosted go2rtc: One Low-Latency Gateway for Your Cameras

The camera app on your phone is fine until you want the same feed in a browser, in Home Assistant, and on a wall tablet without three different delays. Cloud NVRs solve that by uploading the video. That is the part a shop, a clinic, or a rental office usually did not mean to agree to.

go2rtc (AlexxIT/go2rtc) is a small MIT-licensed streaming gateway, about 15,000 GitHub stars, docs at go2rtc.org. One binary, or the alexxit/go2rtc Docker image, accepts RTSP, ONVIF, WebRTC, RTMP, HomeKit, Tapo, and a long list of vendor protocols, then hands the same stream back out as whatever the viewer can actually play. It transcodes with FFmpeg only when it has to. Home Assistant people already know it as the add-on behind low-latency camera cards. It also runs fine with no Home Assistant at all.

What you actually point it at

A first config is one YAML entry. The web UI on port 1984 will write it for you:

streams:
  hall-camera: rtsp://user:pass@192.168.1.123/cam/realmonitor?channel=1&subtype=0

After that, go2rtc speaks RTSP on 8554 and WebRTC on 8555. A browser can take WebRTC. An NVR or Frigate-style recorder can take RTSP. You can publish a stream onward to YouTube if you really want a public copy, and you can mix audio from one source with video from another. Two-way audio works for a lot of doorbells and Tapo-class cameras, which is the feature people notice the first time they talk through a browser instead of the vendor app.

The private-protocol list is why the project grew so fast. Ring, Wyze, Nest, Xiaomi, Kasa, Doorbird, GoPro, even some robot vacuums. You are not buying another hub. You are telling one process how to log into the camera you already own.

Why keep this on your own machine

A camera URL is a password and a picture of the inside of a building. The vendor cloud already has both if you use their app. go2rtc lets the rest of your tools subscribe on the LAN, so the hallway feed does not have to leave for a status page, a door buzzer, or a staff monitor. That is the residency story: the stream stays next to the cameras.

It is also a latency story. Many “works with everything” recorders re-encode H.264 into something else and add a second or two. go2rtc tries to pass the codec through. You feel that on a door camera. A one-second delay is a person already inside.

Do not put port 1984 on the internet

The author is blunt in the README. If someone reaches the API, they can abuse insecure sources such as exec and get a shell. By default the web UI, RTSP, and WebRTC listen on the local network with no login, so anyone on that network can watch. Put a username and password on the API before the box is reachable past your firewall. If you want to be strict, limit modules and API paths in config, and do not leave exec open to whatever path a caller sends.

Camera passwords live in go2rtc.yaml. That file is a secret. Do not commit it, and do not paste it into a chat to debug a stream.

Running it

On a small VPS or a mini PC on the same LAN as the cameras, the binary is enough. Docker is easier if you want FFmpeg already in the image. Give it a volume for the YAML file so a container update does not forget your cameras. Hardware transcoding images exist when you must re-encode. Most offices should not. Sub-streams from the camera (the lower-resolution RTSP URL) save more CPU than any flag.

If the cameras are at a site and the viewers are not, a VPN back to that LAN beats opening 8554 on the router. Remote WebRTC is possible. It is also how people accidentally publish the loading dock.

Good fit / skip it

Good fit: Home Assistant users tired of vendor delays, shops that want one browser page for several cheap cameras, anyone replacing a cloud NVR subscription with a box they control.

Skip it: you need a full recorder with motion timelines and retention policy (go2rtc is the live gateway, not the archive), or you will not lock the API. An open go2rtc is a camera system with a remote shell attached.

Bottom line

go2rtc is the small piece that turns “this camera speaks RTSP, that one speaks a weird P2P protocol” into one low-latency stream you can view yourself. Keep it on your network, put a password on port 1984, and treat the config file like the keys to the building.

Talk with Swift Host if the cameras and the people watching them are in different cities. We would rather size a Canadian VPS behind a VPN than watch someone forward 1984 to the world.

Tags:
  • go2rtc
  • Cameras
  • WebRTC
  • RTSP
  • Self-Hosted

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.