Skip to content

Install on Debian 11 (Bullseye)

starbasessd edited this page Nov 2, 2021 · 5 revisions

Before Proceeding

  • Read the general Installation page first.
  • These instructions apply to Debian and Debian-based distributions. For Ubuntu and Raspbian however, you should check out their specific instructions.
  • All commands require root; use sudo before each command or become root using su -.
  • Install instructions confirmed as of 2 Nov 2021 on Debian 11 (Bullseye).

Instructions

  1. Install motion, ffmpeg and v4l-utils:

     apt-get install motion ffmpeg v4l-utils -y
     systemctl stop motion
     systemctl disable motion
    

    note: Precompiled binaries of motion can be found here, if you're not happy with what you find in the official Debian repos.

  2. Install the python 2.7 and pip2: (enter as separate lines, do not copy/paste as a group)

     apt-get install python2 -y
     curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
     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.
    
  3. Install the dependencies from the repositories:

     apt-get install python-dev-is-python2 python-setuptools curl libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev libffi-dev libzbar-dev libzbar0 -y
    

    note: Python 2.7 is required.

  4. Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):

     pip install motioneye
    

    note: If pillow installation fails, you can try installing it from official repos using apt-get install python-pillow.

  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:

    • Debian 11 and newer, systemd-based:

        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, after it has been released, just issue:

         pip install motioneye --upgrade
    
    **note** that will update all the other required dependecies
    
    * Debian 8 or later:
    
         systemctl restart motioneye
    
Clone this wiki locally