Site icon eKiwi-Blog.de

Set up Linux as IP camera, streaming server

Use a Linux computer as an IP camera and streaming server in your own network.

Having already set up an old Android smartphone as a streaming server and IP camera on the network, we are now using a Linux computer. Well, it will end up consuming more power, but maybe it’s running anyway.

Streaming server with motion

We use “motion” for streaming. This can be installed with the following command:

sudo apt install motion

We then edit the configuration file.

sudo vim /etc/motion/motion.conf

Here we find numerous settings, e.g. also the frame rate, image size.

The settings for the network are also important, with webcontrol_localhost and stream_localhost we can control access from the network. If these are set to “on”, only local access is possible. We can also specify the port.

Once the file is saved, we can start the service.

sudo service motion start

There are two ways to access it, either the control interface with more options or just the image.

http://localhost:8080/
http://localhost:8081/

Both addresses can be opened in the browser and the image is displayed.

Firewall activation

For external access, the ports may still need to be enabled in the firewall. We can check the status first.

sudo ufw status

The following two adjustments allow access, adjust port if necessary.

sudo ufw allow 8081/tcp
sudo ufw allow 8080/tcp

Access should then also be possible from other devices in the network. Access is initially only possible in the internal network. For remote access, a port share can be set up on the router or alternatively a VPN can be used.

Exit mobile version