Skip to content

How to deploy a Mediamtx instance to a service? #3121

Answered by aler9
andymitch asked this question in Questions
Discussion options

You must be logged in to vote

Hello, the README tells how to expose the server, in Docker or in any other containerized service, by using a limited number of ports:

The --network=host flag is mandatory since Docker can change the source port of UDP packets for routing reasons, and this doesn't allow the RTSP server to identify the senders of the packets. This issue can be avoided by disabling the UDP transport protocol:

docker run --rm -it
-e MTX_PROTOCOLS=tcp
-e MTX_WEBRTCADDITIONALHOSTS=192.168.x.x
-p 8554:8554
-p 1935:1935
-p 8888:8888
-p 8889:8889
-p 8890:8890/udp
-p 8189:8189/udp
bluenviron/mediamtx

set MTX_WEBRTCADDITIONALHOSTS to your local IP address.

You can limit the number of ports further by exp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andymitch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants