Skip to content

Install On Raspbian

starbasessd edited this page Nov 30, 2021 · 44 revisions

Before Proceeding

  • Read the general Installation page first.
  • These instructions apply only to an up-to-date Raspbian Buster or earlier.
  • 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 20210507 Lite (Buster), on 10/23/2021
  • Installation instructions confirmed on RaspberryPiOS 20210507 Full Desktop (Buster), on 10/23/2021

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
    

    note: Raspbian Buster comes with motion version 4.1; it is however recommended that you install version 4.3.2, as indicated above

  3. Install the dependencies from the repositories:

     apt-get install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev -y
    
  4. Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):

     pip 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
    pip 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