Requirements
- a machine running a recent Linux distro
- python 2.7
- tornado 3.1+
- jinja2
- PIL or pillow
- curl, libcurl & pycurl
- motion (optional)
- ffmpeg (optional)
- v4l-utils (optional)
The Motion Daemon
The motion
daemon itself is optional, but needed in most cases. Install it (along with ffmpeg
and v4l-utils
) unless you configure a machine that will only act as a hub for other motionEye-based cameras.
Install Instructions
motionEye releases are uploaded to PyPI, so you can use the pip
(or pip2
) command to install it as well as (some of) its dependencies. Following are detailed instructions for some common distributions.
note 1: The given commands normally need to be run as root; type them in a root shell or use sudo
before each command.
note 2: On systems where Python3 is the default Python interpreter, you should use the pip2
command instead of pip
.
note 3: If you are configuring a motionEye system that will only act as a hub for other motionEye-based cameras (i.e. no locally connected cameras and no IP cameras), you can skip installing motion
, ffmpeg
and v4l-utils
.
note 4 : All commands require root; use sudo
before each command or become root using su
.
Installation:
- Install
motion
,ffmpeg
andv4l-utils
:- apt-get install motion ffmpeg v4l-utils
- Install the dependencies from the repositories:
- apt-get install python-pip python-dev python-setuptools curl libssl-dev libcurl4-openssl-dev libjpeg-dev libz-de
note: Python 2.7 is required. If your system still runs Python 2.6 or older, please upgrade.
- apt-get install python-pip python-dev python-setuptools curl libssl-dev libcurl4-openssl-dev libjpeg-dev libz-de
- Install
motioneye
, which will automatically pull Python dependencies (tornado
,jinja2
,pillow
andpycurl
):- pip install motioneye
note: Ifpillow
installation fails, you can try installing it from official repos usingapt-get install python-pillow
.
- pip install motioneye
- Prepare the configuration directory:
- mkdir -p /etc/motioneye
- cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
- Prepare the media directory:
- mkdir -p /var/lib/motioneye
- 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 motioned
- 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 - systemctl restart motioneye
- pip install motioneye –upgrade
Accessing The Frontend
After having successfully followed the installation instructions, the motionEye server should be running on your system and listening on port 8765. Fire up your favorite web browser and visit the following URL (replacing [your_ip]
with… well, your system’s IP address):
Use admin
with empty password when prompted for credentials.
Upgrading
Upgrading should be as easy as running the following command (as root):
- pip install –upgrade motioneye
Enable network storage
Change the smb_shares in the motioneye.conf file from false to true
- nano /etc/motioneye/motioneye.conf