Raspberry Pi MotionEye Camera Setup with Docker Step-by-step guide to setting up MotionEye on a Raspberry Pi using Docker. 14 November 2024 3 minute read By Kevin McAleer Share this article on Table of Contents What is MotionEye?Why Use Docker on a Raspberry Pi?PrerequisitesInstalling Docker on the Raspberry PiStep 1: Install DockerStep 2: Install Docker ComposeSetting Up MotionEye with Docker ComposeStep 1: Create a Working DirectoryStep 2: Create a docker-compose.yml FileStarting the MotionEye ContainerAccessing MotionEyeAdding Cameras to MotionEyeConfiguring Motion Detection and AlertsManaging the MotionEye ContainerStopping the MotionEye ContainerRestarting the ContainerConclusion Tags: Raspberry Pi MotionEye Docker Surveillance Network Camera Difficulty: intermediate Category: raspberrypi Home Blog Raspberry pi motioneye camera setup with docker Raspberry Pi MotionEye Camera Setup with Docker Step-by-step guide to setting up MotionEye on a Raspberry Pi using Docker. 14 November 2024 | 3 minute read | By Kevin McAleer | Share this article on What is MotionEye? MotionEye is a web-based frontend for the motion daemon, making it easy to turn network cameras or USB cameras into a home surveillance system. It allows you to set up motion detection, alerts, and image recording in a user-friendly interface accessible through a browser. Why Use Docker on a Raspberry Pi? Docker simplifies the setup process for applications like MotionEye by: Streamlining installation: Docker contains all dependencies in one container. Isolating services: MotionEye runs in a standalone container, avoiding conflicts. Portability: Docker allows easy movement of configurations between devices. Prerequisites For setting up MotionEye on your Raspberry Pi, you’ll need: A Raspberry Pi with Raspberry Pi OS installed. Docker and Docker Compose installed on the Raspberry Pi. A compatible camera (USB or Pi Camera Module). Network access to the Raspberry Pi for remote viewing. Installing Docker on the Raspberry Pi Step 1: Install Docker If Docker isn’t already installed, add it with the following commands: curl -sSL https://get.docker.com | sh sudo usermod -aG docker $USER Reboot the Raspberry Pi after installation: sudo reboot Step 2: Install Docker Compose To manage MotionEye with Docker Compose, install Docker Compose: sudo apt update sudo apt install -y docker-compose Setting Up MotionEye with Docker Compose Step 1: Create a Working Directory Create a directory for MotionEye and navigate into it: mkdir motioneye-docker && cd motioneye-docker Step 2: Create a docker-compose.yml File In this directory, create a docker-compose.yml file for MotionEye: version: '3.3' services: motioneye: image: ccrisan/motioneye:master-amd64 container_name: motioneye ports: - "8765:8765" # Adjust port if needed volumes: - ./motioneye:/etc/motioneye - /etc/localtime:/etc/localtime:ro - /data/motioneye:/var/lib/motioneye devices: - /dev/video0:/dev/video0 # Use the correct device for your camera restart: unless-stopped The default port is 8765, and /dev/video0 is the default device for USB cameras. Adjust if using a different camera or port. Starting the MotionEye Container Start the MotionEye container by running: sudo docker-compose up -d The container will download and set up MotionEye in detached mode, storing configurations in the motioneye folder. Accessing MotionEye Once the container is running, access MotionEye by opening a browser and navigating to your Raspberry Pi’s IP address on port 8765 (e.g., http://<Raspberry_Pi_IP>:8765). The default login credentials are: Username: admin Password: (leave blank) You can set an admin password in the settings after logging in. Adding Cameras to MotionEye Once logged in, add a camera: Click on Add Camera and choose the camera type (e.g., Local Camera for USB or Pi Camera). Configure options like resolution, frame rate, and motion detection. Configuring Motion Detection and Alerts Motion Detection: Enable motion detection in the settings for each camera, adjusting sensitivity as needed. Alerts: Set up email or web hook notifications to receive alerts when motion is detected. Managing the MotionEye Container Stopping the MotionEye Container To stop MotionEye, use: sudo docker-compose down This will stop and remove the container, keeping your configuration files in the motioneye folder. Restarting the Container To start MotionEye again, simply run: sudo docker-compose up -d Conclusion Setting up MotionEye on your Raspberry Pi with Docker allows for easy, portable home surveillance. With MotionEye’s web-based interface, you can monitor cameras, record footage, and receive alerts, turning your Raspberry Pi into a reliable surveillance solution. Liked this article? You might like these too. 10 Projects for your Raspberry Pi Pico If you've just got a new Raspberry Pi Pico and you're looking for some inspiration, then you've come to the right place. Here is a collection of projects that you can build with your Raspberry Pi Pico. Raspberry Pi Telegraf Setup with Docker "Learn how to set up Telegraf on your Raspberry Pi with Docker to monitor system metrics and integrate with popular time-series databases like InfluxDB or Prometheus." Setting Up Dynamic DNS on a Raspberry Pi for Self-Hosting Learn how to configure Dynamic DNS on your Raspberry Pi to enable easy remote access and self-host your WordPress, Ghost blog, or other web services. Raspberry Pi WordPress Setup with Docker Learn how to turn your Raspberry Pi into a WordPress server using Docker, allowing for an easily manageable and portable WordPress installation. Raspberry Pi WireGuard VPN Setup with Docker Learn how to set up a secure WireGuard VPN on your Raspberry Pi using Docker, allowing remote access to your home network securely and easily. Raspberry Pi Ghost Setup with Docker Transform your Raspberry Pi into a Ghost blogging platform using Docker. This guide covers the setup process and configuration for a personal Ghost site.
Raspberry Pi MotionEye Camera Setup with Docker Step-by-step guide to setting up MotionEye on a Raspberry Pi using Docker. 14 November 2024 3 minute read By Kevin McAleer Share this article on Table of Contents What is MotionEye?Why Use Docker on a Raspberry Pi?PrerequisitesInstalling Docker on the Raspberry PiStep 1: Install DockerStep 2: Install Docker ComposeSetting Up MotionEye with Docker ComposeStep 1: Create a Working DirectoryStep 2: Create a docker-compose.yml FileStarting the MotionEye ContainerAccessing MotionEyeAdding Cameras to MotionEyeConfiguring Motion Detection and AlertsManaging the MotionEye ContainerStopping the MotionEye ContainerRestarting the ContainerConclusion Tags: Raspberry Pi MotionEye Docker Surveillance Network Camera Difficulty: intermediate Category: raspberrypi
What is MotionEye? MotionEye is a web-based frontend for the motion daemon, making it easy to turn network cameras or USB cameras into a home surveillance system. It allows you to set up motion detection, alerts, and image recording in a user-friendly interface accessible through a browser. Why Use Docker on a Raspberry Pi? Docker simplifies the setup process for applications like MotionEye by: Streamlining installation: Docker contains all dependencies in one container. Isolating services: MotionEye runs in a standalone container, avoiding conflicts. Portability: Docker allows easy movement of configurations between devices. Prerequisites For setting up MotionEye on your Raspberry Pi, you’ll need: A Raspberry Pi with Raspberry Pi OS installed. Docker and Docker Compose installed on the Raspberry Pi. A compatible camera (USB or Pi Camera Module). Network access to the Raspberry Pi for remote viewing. Installing Docker on the Raspberry Pi Step 1: Install Docker If Docker isn’t already installed, add it with the following commands: curl -sSL https://get.docker.com | sh sudo usermod -aG docker $USER Reboot the Raspberry Pi after installation: sudo reboot Step 2: Install Docker Compose To manage MotionEye with Docker Compose, install Docker Compose: sudo apt update sudo apt install -y docker-compose Setting Up MotionEye with Docker Compose Step 1: Create a Working Directory Create a directory for MotionEye and navigate into it: mkdir motioneye-docker && cd motioneye-docker Step 2: Create a docker-compose.yml File In this directory, create a docker-compose.yml file for MotionEye: version: '3.3' services: motioneye: image: ccrisan/motioneye:master-amd64 container_name: motioneye ports: - "8765:8765" # Adjust port if needed volumes: - ./motioneye:/etc/motioneye - /etc/localtime:/etc/localtime:ro - /data/motioneye:/var/lib/motioneye devices: - /dev/video0:/dev/video0 # Use the correct device for your camera restart: unless-stopped The default port is 8765, and /dev/video0 is the default device for USB cameras. Adjust if using a different camera or port. Starting the MotionEye Container Start the MotionEye container by running: sudo docker-compose up -d The container will download and set up MotionEye in detached mode, storing configurations in the motioneye folder. Accessing MotionEye Once the container is running, access MotionEye by opening a browser and navigating to your Raspberry Pi’s IP address on port 8765 (e.g., http://<Raspberry_Pi_IP>:8765). The default login credentials are: Username: admin Password: (leave blank) You can set an admin password in the settings after logging in. Adding Cameras to MotionEye Once logged in, add a camera: Click on Add Camera and choose the camera type (e.g., Local Camera for USB or Pi Camera). Configure options like resolution, frame rate, and motion detection. Configuring Motion Detection and Alerts Motion Detection: Enable motion detection in the settings for each camera, adjusting sensitivity as needed. Alerts: Set up email or web hook notifications to receive alerts when motion is detected. Managing the MotionEye Container Stopping the MotionEye Container To stop MotionEye, use: sudo docker-compose down This will stop and remove the container, keeping your configuration files in the motioneye folder. Restarting the Container To start MotionEye again, simply run: sudo docker-compose up -d Conclusion Setting up MotionEye on your Raspberry Pi with Docker allows for easy, portable home surveillance. With MotionEye’s web-based interface, you can monitor cameras, record footage, and receive alerts, turning your Raspberry Pi into a reliable surveillance solution.