Install MotionEyeOS on Raspberry Pi – Surveillance Camera System

Do you want to turn your Raspberry Pi into a surveillance camera system? The best way to do it is using MotionEyeOS. In this post we’ll show you how to get started with MotionEyeOS on your Raspberry Pi.

What is MotionEyeOS?

MotionEyeOS is a Linux distribution that turns your single-board computer into a video serveillance system. The MotionEyeOS supports the following devices:

  • Raspberry Pi (all versions);
  • Banana Pi;
  • Odroid C1/C1+, Odroid C2, Odroid XU4;
  • Pine A64/A64+.

MotionEyeOS Features

MotionEyeOS is the perfect solution to build your own surveillance system because it is simple to install and has a web-based, user-friendly interface that is responsive in practically any browser.

It supports most USB cameras, Raspberry Pi camera modules, and IP cameras. Additionally, it brings other useful features when it comes to a surveillance system:

  • Motion detection with email notifications
  • You can set set a working schedule
  • Take still images
  • Store your files in SD card, USB drive, or upload your files to Google Drive or Dropbox
  • Access your media files through FTP server or SFTP server

Parts Required

For this project we’re using the following parts:

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!

Installing MotionEyeOS

To install MotionEyeOs in your Raspberry Pi 3, follow the next steps.

Formatting your microSD card

You’ll install MotionEyeOS on a microSD card and then, insert the microSD card into your Raspberry Pi board. But first, you need to format you microSD card – there are several ways to do this, but we recommend following the next procedure:

  1. Go to https://www.sdcard.org/downloads/formatter_4/ and download the SD Card Formatter software for your operating system.
  2. Install the SD Card Formatter software.
  3. With your microSD card connected to your computer, open the SD card Formatter application, and format your microSD card with the “overwrite format” option.

Downloading the OS Image

Choose the right image for your device: MotionEyeOS releases page. If you’re using the Raspberry Pi 3, choose motioneyeos-raspberrypi3-xxxxxxxx.img.gz.

Writing the Image

Next, extract the image from the .zip folder. Then, you can use win32diskimager or Etcher, to write the image onto the SD card.

We’re going to use Etcher. If you don’t have Etcher installed, you can click here and install it on your computer.

With the microSD card formatted, and connected to your computer, open Etcher. Select the image you’ve get previously, select your microSD card, and click Flash!

When the flash is completed, your microSD card is ready!

Booting MotionEye on Raspberry Pi

Follow the next steps to boot MotionEyeOS for the first time on your Raspberry Pi.

1. Insert the microSD card in the Raspberry Pi;

2. Connect an Ethernet cable – this is needed on the first boot;

3. Connect a camera. If you’re using the Raspberry Pi camera V2 module, make sure you’ve connected the camera in the right orientation as shown in the following image;

4. Apply power to your Pi, and wait for about 2 minutes for the system to be ready.

Now, to access your Raspberry Pi, you need to find your Pi’s IP Address

Finding Your Raspberry Pi IP Address

To Find your Raspberry Pi IP address, you can use Angry IP Scanner. The IP you’re looking for is the one with “meye” on the name, as shown in the following figure.

Accessing MotionEye For the First Time

Open your browser and type the Raspberry Pi IP address. You’ll see the MotionEye login page.

At the first boot, use the following credentials:

  • Username: admin
  • Password: [No password, leave blank]

If you have a camera connected to your Pi, it should be detected automatically, and you should see a live image from the camera. We’ve connected two cameras, an USB camera, and the Raspberry Pi Camera V2 module, and it automatically shows live image from both.

Initial Setup

You can configure pretty much everything in your web user interface. We recommend taking a look at the following configurations when configuring the MotionEyeOS for the first time.

  1. Go to the three bars menu, and open the General Settings;
  2. Enable Advanced Settings;
  3. You can change the admin username and set a password;
  4. You can also set a name for a surveillance user, and its corresponding password;
  5. Set your timezone and a hostname.

Click the orange button at the top right “Apply” to apply the changes – this will require a reboot.

You can also enable Wireless Network in the Network menu. You need to enter your network credentials as shown in the following figure.

The software is intuitive to use. Take a look at the menus and see what they can do.

Wrapping Up

This was just an introduction on how to get started with MotionEyeOS on the Raspberry Pi 3. In this example we’re using a single device (the Raspberry Pi board) with two cameras, but it can be more useful using a Raspberry Pi 3 as a Hub, and then use several cameras in different locations, each of them connected to a Raspberry Pi Zero W. Learn how to build a CCTV Raspberry Pi Based System with Storage using MotionEyeOS.

We hope you’ve found this post useful. If you want to build your own surveillance system, then the MotionEyeOS is the way to go.

You may also like the following projects:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

63 thoughts on “Install MotionEyeOS on Raspberry Pi – Surveillance Camera System”

    • Hi. To make it run wireless you can either:
      – connect an Ethernet cable at the first boot, and then, enter your network credentials in the MotionEye interface, as shown in the “Initial Setup” section; Then, when you reboot, you should be able to run it wireless;
      – or, you can set your network credentials before the first boot, by creating a file with your credentials on the root of the SD card. We show how to do this in this tutorial: https://randomnerdtutorials.com/cctv-raspberry-pi-based-system-storage-motioneyeos/ in the “Setting the Network Credentials” section.
      I hope this helps!

      Reply
  1. That’s great, thanks.
    Sorry to ask again, but do you have to have noobs installed on the pi?
    I’m confused; formatting the sd card will surely delete raspian os, but do you need to use the os to preconfigure settings such as camera access to the pi? Also do you not need to use the os to git clone the repository from github for motioneye?

    Thanks

    Reply
    • Hi Jai.
      No, you don’t need to have noobs installed on the pi, because with the method we show in this post, you are going to install MotionEyeOS on the Raspberry Pi.
      You simply need to write the MotioEyeOS on the SD card. Insert it on your Pi. And then, you can control everything though your computer by accessing the Raspberry Pi IP address.
      I hope this helps 🙂

      Reply
  2. Hi,

    I’ve installed the Motioneye software using my laptop onto the SD card, put it back in the pi, and connnected with an ethernet cable. Now the pi is asking for a meye login and ip address, but when I run Angry IP scanner it doesn’t detect the pi’s address. It’s got two IP addresses that I recognise and are named, then five others that look live but with no names or details. Can you help? As you may have guessed, I’m pretty new to the raspberry pi.
    Thanks,
    Fiona

    Reply
      • Hi Sara,

        It’s a little complicated, I’ll explain. The pi is going to be put on a yacht an hour and a half away from home. I was setting the pi up at home with a mobile data router as we are planning on accessing the pi remotely from the home broadband network.
        This is what I did!
        1. I tried to connect the pi to the mobile router with an ethernet cable after installing Motioneye but the Angry IP scanner wouldn’t detect it. The mobile router was working ok as my phone could pick it up.
        2. I then hardwired the pi to the home broadband router instead (after posting this) and angry IP scanner found the Meye IP address and I accessed the software behind the camera using my laptop. I tweaked a few of the settings – mainly resolution etc and applied, everything ok, the camera was still working.
        3. Then I changed the password from admin – blank to my own password. I also ticked wireless enable and entered the mobile router SSID and password correctly. Then after clicking apply, it crashed and that’s the position I’m in now.

        I tried hardwiring it again first to the mobile router, and then to the home broadband router, but neither IPs are detectable. The ethernet cable at the pi end is flashing so it’s definitely got an address, and boots up until it gets to the request for a Meye login and password. Unfortunately, I can’t access the pi at all on the HDMI display and I can no longer access Motioneye software using the browser of my laptop because I can’t detect an IP address.

        To be honest, I don’t know what to try next, apart from wiping the SD card and installing all the software again, I’m reluctant to jump ahead and do that before I’ve tried everything else.

        Any ideas? I’m very new to raspberry pis, so apologies for naivety and inexperience that’s no doubt shining through!

        Fiona

        Reply
        • Ooh, breakthrough! I’m just playing with it now, and managed to find the IP address in the DCHP table of the router settings. Fingers crossed. ;o)

          Reply
          • Ok, I think I’ve realised that I can’t use angry IP scanner on my laptop to detect IP addresses that are linked to a different router to the one you’re getting wifi from for the laptop, is that correct?

            If that’s the case, I think I need to work out how to remotely control the pi first from the laptop before trying to set up the camera, does that make sense? Sorry to be so annoying throwing all this up here, but I’m trying to work my way through it with no experience. :o)

          • Hi Fiona. To set up the Pi for the first time, your PC needs to be connected to the same network as your Pi. So, if you’re setting the Pi on the mobile router, you need your computer to be connected to that same router to access the Pi via IP address to manage the settings. Then, we don’t have any tutorial on how to access the videostreaming from anywhere. However, I’ve found the following tutorial that shows how to set up motioneye to be accessed from anywhere using port forwarding. I haven’t tried this, but I think it should work.
            youtube.com/watch?v=sT6bIhqdWHI
            I hope this helps.
            Regards,
            Sara-

          • Thanks Sara, that will be a great help. For now though, I can’t appear to sign into the pi at all since installing the MotionEye software. I’m not sure if this issue is related.

            I installed MotionEye software on my pi 3, and have now successfully accessed the software via the ip address of the pi on a laptop web browser, thanks to your help! So far so good. The camera is connected wirelessly to a mobile router – the pi will eventually go onto a yacht and as you know, I’d like to set up remote access to it.

            When I turn the pi on, connected via HDMI to a display, it is asking for a login. The screen shows –
            mey-7a8etc login:

            When I set up the pi initially before installing the camera I changed the password and made a note of it. The username I’m guessing is either raspberrypi or pi from the default setting. The hostname showed as raspberrypi at the time I changed the password.

            Whenever I try and login, however, I get the error incorrect password. I’ve tried using the default passwords thinking it may not have saved my chosen password but they won’t let me login either.

            Do you have any suggestions as to what I can do?

            My next step is to wipe the sd card and reinstall the pi software but I’m reluctant to do this as you can probably tell, I’m quite new to all things pi!

            Thanks again for taking the time to read this.

          • Hi Fiona.
            At the first boot the credentials are:
            Username: admin
            Password: [No password, leave blank]
            If you changed the password and you can no longer access motion eye, I really recommend wiping the SD card and restart all the process.
            Regards,
            Sara

  3. Hi! Great guide, I’ve managed to make it work without any problems. The only thing that I am curious about, is there any way to watch the camera stream when not connected to the same network as the RasPi? For example, I get a notification from my camera when I am out of town, is it possible for me to access the stream to see what the camera has detected?

    Also, the camera doesn’t upload any content to my Google Drive.

    Thanks!

    Reply
    • Hi.
      Yes, it is possible to access the video streaming outside your network.
      You can configure everything on motioneye. We don’t have any tutorial about that subject.
      However, the following video shows how you can do that:
      youtube.com/watch?v=sT6bIhqdWHI
      When it comes to Google Drive, we haven’t tried setting up motioneye with google drive.
      Thank you for your interest in our projects.
      Regards,
      Sara 🙂

      Reply
  4. Hi Tony:
    Do you have any idea whether MotionEyeOS will allow me to monitor a Cisco WVC80N IP camera? I can monitor it with a web browser or a little program on my iPhone called, IP Camera Viewer. But when I try setting it up with MotionEye, I get a message saying, “Not a supported camera”. What am I doing wrong?

    Reply
  5. After, I gone through 4. Apply power to your Pi, and wait for about 2 minutes for the system to be ready. Thern I boot up. Everything is done done done. Then is asking me 016ebaf LOGIN: I tpyed admin. Then asking for password,. Then i leave blank as you’re saying. Then is still asking me against against and so on. Oh, before login. It saying If you want to see friendly, then go to your browser and type your ip address of this board. And I did this. But nothing happened.

    Reply
  6. Excellent tutorial!!
    I started with RaspberryPi a week ago and I fitted the camera yesterday only …. That means that I am not particularly experienced …. However, today I found your explanations relative to MotionEyes and ….. the thing worked well, right from the beginning.
    I am very glad to have discovered MotionEye and …..Your Great Site !!!!
    Thank you!
    Stefan

    Reply
  7. I am trying to get my PiCam to give a picture but it only gives me a gray screen. Camera is enable is raspi-config end tested. It is functioning. could someone help me out? Do i need to change something to get this to work?

    Reply
    • Hi Vincent.
      All the procedures to make the camera work are described in the tutorial (there’s no hidden tricks).
      Did you get the camera to work without using MotionEyeOS before?
      The camera may be broken or the ribbon may be connected in the wrong way.
      Regards,
      Sara

      Reply
  8. thx for the great tutorial. I tried it out, the first time it did not work, problems with setup of wireless. I had to burn again the card, flash it and this time write the correct configuration file, and it worked fine. Playing around I have however one question now: how to set the focus on objects at a certain distance? I there any description how to achieve this ?
    Again thx a lot for this great work
    Yours, Eryk

    Reply
    • Hi Eryk.
      I don’t think it is possible to do what you want.
      But the best way to know is taking a look at the MotionEyeOS wiki on the following link:
      github.com/ccrisan/motioneye/wiki
      I hope this helps.
      Regards,
      Sara 🙂

      Reply
  9. Hi
    I can’t access MotionEye for the first time. I use Angry IP Scanner and it shows up and gives me the IP which is 139.98.34.67 but when I try to connect from another machine on the same network I get nowhere.
    I have also tried specifying port 80 but nothing happens.
    Could this be some firewall issue?

    Reply
    • Hi Morgan.
      I’m sorry you’re getting that issue.
      Honestly, I don’t know what may be wrong.
      The best thing to do is searching for your issue in the MotionEyeOS GitHub here: github.com/ccrisan/motioneyeos/issues
      Regards,
      Sara

      Reply
  10. Congratulations on an excellent explanation. I managed to configure everything perfectly and it works very well. I would like to ask how you can send a telegram image to my smartphone with motion activated. Thank you, Giorgio Sarcletti.

    Reply
  11. Hi,
    Thank you for your guide, i just started “playing” with Raspberry Pi and i’m trying install MotioneyeOS on my Raspberry (i bought the camera).
    i installed the OS for Raspberry first (using SD card), do i need another SD card to install MotioneyeOS on my Raspberry??? how does it work?

    Thanks in advance!

    Reply
    • Hi.
      No. You can use the same SD card to install the MotionEye Operating System, but you need to format it first.
      You can either have one operating system installed or the other.
      Regards,
      Sara

      Reply
  12. Got my first Raspberry Pi3 Yesterday – Installed Noobs and played around – saw this and installed it – worked like a charm! I can’t believe how easy that was. I even was able to have it send me an email on first try.
    THANK YOU!
    Should I be able to connect multiple USB cameras? The lights are showing on both that I have connected but only one comes up in the web page.
    I will keep playing with it. 🙂
    Thanks again!

    Reply
  13. i hope for the motioneye to get a update so it can object / face detect, i have 3 motioneye cams that i’ve used for several years, they got minor bugs but i love them, only real annoying thing is the false motion triggering by sunlight shade moving 🙂

    Reply
  14. I tried MotionEye on an old RaspberryPi A model (the original RPi!) using a RPi Camera v2.1.
    It worked but the A is really too slow. Nevertheless, very interesting!
    The A model has no LAN connection. I had put a wpa-supplicant.conf file in the boot partition.
    MotionEye saves a lot of “tweaking” motion.conf when just trying motion under the Raspbian OS (nb. Buster ver. 2020-08-20 works fine on the A model). One could perhaps further “tweak” the camera-‘n’.conf file(s) perhaps. MotionEye uses a minimal motion.conf file that redirects configuration to individual camera-conf files.
    My camera is a NoIR (no infrared filter) so it gives a very reddish tint. Maybe the stream could be post-processed.
    I might now try it on a RaspberryPi B model that I also have. The B model directly followed the A model. So, all old stuff! Time to update the hardware methinks!

    Reply
  15. hi, i have ried every thing from every where, pi, youtube, your site, nothing works to run MotioneyeOS on the PI 4, i get the message elf.start and need new board software

    can you help,so far every on just say it will work, if so then is my PI 4 8GB unable to use Motioneyeos like about 100 youtubers say.

    I have the lates and update, upgrade, barnd new Pi 4, Rasbian debian 32 and 64, Twister works great, PI os works great, manjaro and other work great boot up, run and play, but MOTION EYE OS is the only OS that will not run.

    thanks

    Reply
  16. Hey, thanks for the helpful guide.
    I was just wondering after I noticed that nobody is updating/maintaining the GitHub repo for MotionEyeOS anymore. Could this be a problem? Will is slowly become obsolete?

    Reply
  17. Make sure you expand the list of OS variants on GitHub if you have a Pi2 (or later) as I was struggling with the ‘standard’ pi OS on my Pi3 which definitely didn’t work!

    Reply
  18. I can’t add my local camera. I choose simple mjpeg camera for the camera type.
    I put in my URL (my local url) plus: 8765.
    I put in admin for the user and blank for the password.
    It doesn’t allow me to type in the camera. It is frozen.
    Please help IT SAYS (NOT A SUPPORTED NETWORK CAMERA.
    Thanks

    Reply
  19. I have a spare Pi zero 2 with the special camera module, but it doesn’t have a ethernet port, is there any way to add a wifi network by editing the SD card files on another computer?

    Reply
  20. Hyy,
    I installed Raspbian lite os in Raspberry pi 3 and connected ip camera for car detection in computer vision model. My model and camera are working fine separately but, when combined together camera is not detecting cars. What should I do?

    Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.