I have a VPS and I want to use it as an intermediate server so that users can have access to the video stream of RPi Camera remotely. I searched many posts and most of them are about setting up a streaming server on RPi so that the stream can be accessed on LAN and using port forwarding to connect to the Pi directly. How can I use a server to do this?

Basically what I wanna achieve is:

User <---> VPS <---> RPi

RPi pushes the video stream to the VPS, and the VPS sends it to the user using the HTTP protocol (Maybe using the flask framework to implement this part is feasible?). I think it would work, but sadly I don't know the detail about how to implement this. Any suggestion or advice is welcome;-)


My VPS is a DigitalOcean droplet with 1G RAM.

  • can you share some detail about the "VPS" Oct 11, 2018 at 22:04
  • Yeah, my VPS is a DigitalOcean ubuntu droplet.
    – Snjór
    Oct 12, 2018 at 6:14

1 Answer 1


Alright, so finally I used an RTMP server and it worked pretty well.

Basically, I installed an RTMP server at my cloud server. There are a bunch of ways you can do it. You can even use it inside a Docker container. Then a tricky thing is to configure the RTMP server and to integrate the RTMP and the HTTP server. A useful library I found is Watch.js.

To push the video streaming to the cloud server, I used FFmpeg. We just need to define the desired parameters of streaming data and the target server address, port, etc.

Then the user can use a Web browser to have access to the video data captured by the camera on a raspberry pi.

  • Please accept your answer by clicking the tick on the left side. This will finally finish the question and it will not pop up again months for months.
    – Ingo
    Nov 19, 2019 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.