Knowledge Base
Running Restreamer in Docker
ReStreamer is an app that allows live video streaming on your website without having to use a streaming provider. It runs in Docker on pretty much any platform, like Windows, Ubuntu linux, RaspberryPi's, as long as you have Docker installed of course. In this article I'll show how to first install Docker on Ubuntu 20.04 and directly after we run the ReStreamer docker.
![](https://livestream.puntenel.nl/wp-content/uploads/sites/14/2021/02/restreamer_resied.png)
Installing Docker and Docker Compose
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io
There is more information on installing Docker available on their website if you need it: https://docs.docker.com/engine/install/ubuntu/.
Let's run ReStreamer now
Now let's run the ReStreamer Docker using a set of directives that allows us to set our own username & password to login. Edit this first before you paste the next command. You can also choose to run the web interface on a different port as 8080.
docker run -d --restart always \ --name restreamer \ -e "RS_USERNAME=admin" -e "RS_PASSWORD=YourPassword" \ -p 8080:8080 -v /mnt/restreamer/db:/restreamer/db \ datarhei/restreamer:latest
![](https://livestream.puntenel.nl/wp-content/uploads/sites/14/2021/02/restreamerlogin.jpg)
Once it is running you can open the web interface by opening in your browser: http://server.ip.address:8080/.
![](https://livestream.puntenel.nl/wp-content/uploads/sites/14/2021/02/restreamermain.jpg)
Much more information on using ReStreamer can be found in the documentation on the official website here: https://datarhei.github.io/restreamer/docs/index.html.
Stopping ReStreamer / Docker
To stop ReStreamer we'll need to stop the Docker container that it's running in. Here's how to do this. This fist command will list all the running Docker instances.
sudo docker ps -a
This will return a list with all running Dockers, and each line starts with the ID of the Docker. We're going to use this ID to stop the container.
sudo docker container stop {docker ID}
When you run the previous command again you'll see that the Docker has exited.
![](https://livestream.puntenel.nl/wp-content/uploads/sites/14/2021/02/dokerstopped.jpg)