Install Motioneye in Ubuntu 20.04/Linux mint 20.02
What is Motioneye?
motionEye is a web-based frontend for motion, a CCTV solution for Linux
What is Motion?
Motion is a nice lightweight, yet capable application for operating surveillance cameras on Linux
How to Install Motioneye
1. sudo apt-get install ssh curl motion ffmpeg v4l-utils -y
2. reboot
3. Install the python 2.7 and pip2
4. sudo apt-get install python2 -y
5. curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
6. sudo python2 get-pip.py
There will be a warning that python 2.7 and pip2 are outdated and will not be updated
This is normal and to be expected, as Python 2.7 is beyond EOL, as is pip2.
When motionEye is updated to Python3, these messages will go away.
Install all prerequisites
1. sudo apt-get install libffi-dev libzbar-dev libzbar0 -y
2. sudo apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y
3. sudo apt-get install python-pil -y
Installing motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):
Install Motioneye
1. sudo pip2 install motioneye
Configuring Motionye
1. Prepare the configuration directory
sudo mkdir -p /etc/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
2. Prepare the media directory:
sudo mkdir -p /var/lib/motioneye
3. Add an init script, configure it to run at startup and start the motionEye server:
sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
4. sudo systemctl daemon-reload
5. sudo systemctl enable motioneye
6. sudo systemctl start motioneye
To upgrade to the newest version of motionEye, just issue:
1. pip2 install motioneye --upgrade
2. systemctl restart motioneye
Saving Motioneye Video's to a Network Share
1. Mounting samba share on boot
sudo apt install samba cifs-utils
sudo nano /etc/fstab
2. Add this line to the bottom of the file
//192.168.0.102/private /mnt/samba-private cifs x-systemd.automount,_netdev,credentials=/etc/samba-credential.conf 0 0
File should look like this
![]() |
| fstab |
3. Create the samba-credential.conf File
nano samba-credential.conf
username=your_username
password=your_password
domain=workgroup
File Should look like this..
![]() |
| samba-credential.conf |
4. Change ownership of the file
sudo chmod 0600 ~/samba-credential.conf
5. reboot
Go to http://your_Ip:8765
default username: admin
no password
You'r All Done. Enjoy you'r new CCTV Solution..!!


Comments
Post a Comment