Skip to content

Install on Raspbian Bullseye

starbasessd edited this page Feb 3, 2022 · 7 revisions

Before Proceeding

  • Read the general Installation page first.
  • These instructions apply only to an up-to-date Raspbian Bullseye.
  • Due to changes in Bullseye (specifically changing from raspivid to libcamera) if you are using an MMAL / CSI ribbon cable camera, and it doesn't work, please use RaspberryPiOS Buster and the Buster install instructions. These changes do not affect USB or Network cameras. These instructions will be updated when RPiFoundation updates Bullseye. (17 Nov 2021)
  • All commands require root; use sudo before each command or become root using sudo -i.
  • If you want to use the CSI camera module for the Raspberry PI, make sure you have enabled it in raspi-config.
  • Installation instructions confirmed on RaspberryPiOS 20211030 Lite, on 27 Jan 2022 (Bullseye)
  • Installation instructions confirmed on RaspberryPiOS 20211030 Desktop, on 27 Jan 2022 (Bullseye)
  • Installation instructions confirmed on RaspberryPiOS 20220128 64 bit Lite on 3 Feb 2022 (Bullseye)
  • Installation instructions confirmed on RaspberryPiOS 20220128 64 bit Desktop on 3 Feb 2022 (Bullseye)

Instructions

  1. Install ffmpeg and other motion dependencies:

     apt-get install ffmpeg libmariadb3 libpq5 libmicrohttpd12 -y
    
  2. Install motion:

     wget https://github.com/Motion-Project/motion/releases/download/release-4.3.2/pi_buster_motion_4.3.2-1_armhf.deb 
     dpkg -i pi_buster_motion_4.3.2-1_armhf.deb 
    

    Disable motion service, motionEye controls motion

     systemctl stop motion
     systemctl disable motion 
    
  3. Install the dependencies from the repositories: (do NOT copy as a block, copy/paste as single lines)

     apt-get install python2 python-dev-is-python2 -y
    
     curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
    
     python2 get-pip.py
    
     apt-get install libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev -y
    
  4. Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):

     pip2 install motioneye
    

    note: If pillow installation fails (hangs and ends at 99%),
    you can install it from official repos using
    apt-get install python-pil -y
    and rerun
    pip2 install motioneye.

  5. Prepare the configuration directory:

     mkdir -p /etc/motioneye
     cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
    
  6. Prepare the media directory:

     mkdir -p /var/lib/motioneye
    
  7. Add an init script, configure it to run at startup and start the motionEye server:

     cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
     systemctl daemon-reload
     systemctl enable motioneye
     systemctl start motioneye
    
  8. To upgrade to the newest version of motionEye, just issue:

     pip install motioneye --upgrade
     systemctl restart motioneye
    
Clone this wiki locally