Commercial IP cameras cost thousands of rupees, lock you into proprietary cloud services, and often come with questionable privacy practices. A Raspberry Pi security camera running MotionEyeOS gives you full control: motion detection, instant alerts, remote live viewing, and local recording — all without a monthly subscription and with complete privacy.
MotionEyeOS is a dedicated operating system built specifically for Raspberry Pi camera systems. It transforms your Pi into a powerful network video recorder (NVR) with a polished web interface, multi-camera support, and integration with notification services like email, Telegram, and webhooks.
This guide covers everything from hardware selection to setting up motion alerts that send you a photo the moment something moves.
Hardware Options: Cameras and Pi Boards
Your camera choice significantly impacts image quality, field of view, and performance in low-light conditions.
Choosing a Pi Board
MotionEyeOS supports Raspberry Pi Zero, Zero 2 W, Pi 3, Pi 4, and Pi 5. For single-camera setups, a Pi Zero 2 W is sufficient and runs cool. For multi-camera or high-resolution recording, a Pi 4 or Pi 5 is recommended.
Camera Modules
The Raspberry Pi CSI camera interface delivers better performance and lower CPU load than USB cameras:
USB Cameras
Standard USB webcams also work with MotionEyeOS. They’re easier to position (USB extension cables are cheap) but consume more CPU for video processing.
Camera Extension Cables
Need to position your camera module away from the Pi? Flat flex extension cables are essential:
The Arducam 300mm Ribbon Flex Extension Cable extends your Pi Zero camera module by 300mm — enough to mount the camera on a wall bracket while keeping the Pi tucked away in an enclosure.
Installing MotionEyeOS
MotionEyeOS comes as a pre-built image for Raspberry Pi — download and flash, no manual installation required.
Download and Flash
- Visit MotionEyeOS GitHub releases
- Download the image for your Pi model (e.g.,
motioneyeos-raspberrypi4-20230226.img.xzfor Pi 4) - Flash using Raspberry Pi Imager or Balena Etcher
- Insert the SD card and power on your Pi
First Boot Configuration
On first boot, MotionEyeOS creates a WiFi access point: motionEyeOS (password: motioneye). Connect to it, then navigate to http://172.24.1.1 in your browser.
Alternatively, connect via Ethernet first. Find the Pi’s IP using your router’s DHCP table, then access the web interface on port 80.
Initial Setup
- Log in with username admin and no password initially
- Set admin password immediately (Settings → General Settings)
- Configure WiFi under Network → Wireless Network (if using WiFi)
- Set your timezone under General Settings
Camera Configuration and Video Settings
Once logged in, your connected camera should appear automatically. Click the settings icon (gear) for the camera to configure it.
Video Settings
- Resolution: 1920×1080 for Pi 4/5; 1280×720 for Pi Zero 2 W to keep CPU usage manageable
- Frame Rate: 10–15 fps for recording; 30fps for live streaming if bandwidth allows
- Video Codec: H.264 for efficient storage; MJPEG for lower-latency live view
- Rotation: Rotate 180° if camera is mounted upside down
Recording Settings
- Movies: Enable to record MP4 files on motion detection
- Still Images: Capture JPEG snapshots at configurable intervals
- Storage: Configure a local path or mount an NFS/SAMBA share for centralized storage
Image Quality Tuning
For outdoor cameras, adjust these settings for better results:
- Brightness/Contrast/Saturation: Fine-tune for your lighting conditions
- Automatic Exposure: Enable for varying outdoor light
- White Balance: Set to Daylight for consistent colour outdoors
Motion Detection Setup
MotionEyeOS uses the motion daemon internally — a powerful and highly configurable motion detection engine.
Basic Motion Detection
Enable motion detection in the camera settings:
- Enabled: Yes
- Frame Change Threshold: 1–2% for sensitive detection; 5–8% to ignore minor movement (leaves, shadows)
- Motion Gap: 30–60 seconds — how long to keep recording after motion stops
- Pre-Capture: 2 seconds — records 2 seconds before the motion event starts
- Post-Capture: 10 seconds — continues recording 10 seconds after motion stops
Motion Masking
If your camera sees a road or tree branch that creates constant false alerts, use motion masking to ignore those areas:
- In camera settings, go to Motion Detection → Edit Mask
- Draw black rectangles over areas you want to exclude from detection
- Save the mask
Sensitivity Zones
You can set different sensitivity levels for different parts of the frame. Set the doorway zone to high sensitivity while reducing sensitivity for the background road.
Configuring Alerts (Email, Telegram)
This is where MotionEyeOS becomes truly powerful — instant notifications the moment motion is detected.
Email Alerts
Go to camera settings → Motion Notifications → Email Notifications:
- Send Email Notifications: Enable
- SMTP Server: smtp.gmail.com (port 587)
- Email From: Your Gmail address
- Email To: Your notification email
- SMTP Username/Password: Gmail address + App Password (not your regular Gmail password — create one in Google Account Security)
- Attachments: Enable to receive a photo of the motion event
Telegram Alerts (Recommended)
Telegram notifications are instant, free, and include photos. MotionEyeOS supports webhook notifications that can be routed to Telegram:
- Create a Telegram bot via @BotFather, get the bot token
- Get your Telegram chat ID by messaging your bot and calling the Telegram getUpdates API
- Use the Webhook notification option in MotionEyeOS to POST to the Telegram API
Webhook Notifications
For custom integrations (WhatsApp, Slack, home automation), use webhooks:
- Configure the webhook URL in Motion Notifications → Webhook Notifications
- MotionEyeOS will POST a JSON payload to your URL on every motion event
- Include
%fin the URL/body to send the captured image file path
Remote Access and Live Viewing
Local Network Viewing
Within your home network, access the MotionEyeOS web interface at http://PI_IP_ADDRESS. The interface works in any browser including mobile. The live stream appears directly in the browser — no app required.
Remote Access Options
Option 1: VPN (Recommended) — Set up a WireGuard VPN on the same Pi or a separate Pi (see our WireGuard guide). Connect via VPN, then access the camera interface as if on your local network. Most secure option with zero port forwarding required for the camera itself.
Option 2: Ngrok Tunnel — Install ngrok on the Pi for instant HTTPS tunneling:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc
sudo apt install ngrok
ngrok http 80
Option 3: Cloudflare Tunnel — Free, reliable HTTPS access without port forwarding, using Cloudflare’s global network.
Mobile Apps
MotionEyeOS is fully mobile-responsive. For Android users, TinyCam Monitor supports MotionEyeOS cameras natively for a more app-like experience with push notifications.
Multi-Camera Setup
One of MotionEyeOS’s strongest features is the ability to view and manage multiple cameras in a single dashboard.
Adding Multiple Cameras
In the MotionEyeOS interface, click the plus icon to add cameras:
- Local Camera: A camera physically connected to this Pi (CSI or USB)
- Network Camera: Another MotionEyeOS Pi, RTSP camera, or MJPEG stream URL
Distributed Architecture
For a whole-home surveillance system, deploy multiple Pi Zero 2 W boards as individual camera nodes, each running MotionEyeOS. Then connect them all to a central MotionEyeOS Pi 4/5 running as the NVR hub. The hub displays all streams and handles recording.
Storage Considerations
Motion-triggered recording at 1080p generates approximately 500MB–1GB per hour of motion events. For long-term storage:
- Mount a USB hard drive (2TB+) to the Pi for local NVR storage
- Configure NFS mount to a Synology/QNAP NAS
- Set automatic file cleanup after 30–90 days in MotionEyeOS settings
Frequently Asked Questions
Can MotionEyeOS work without internet?
Yes, MotionEyeOS works entirely on your local network with no internet required for basic recording and motion detection. You only need internet connectivity for remote access from outside your home, email/Telegram alerts, and time synchronisation (NTP). All video is stored locally — no cloud service required.
How much storage do I need for a 4-camera setup?
It depends on activity levels. For a typical home with 4 cameras recording motion events at 1080p/10fps: budget 2–5GB per camera per day in a moderately busy environment. A 2TB USB drive provides approximately 100–200 days of footage with automatic cleanup policies. Use H.264 codec — it’s 3–4x more efficient than MJPEG.
Does MotionEyeOS support night vision cameras?
MotionEyeOS works with any camera, including IR night vision models. The Arducam IMX477 with IR-cut filter switching is ideal — it delivers full-colour video by day and switches to infrared mode at night automatically. For best results, ensure your camera has IR illuminators for the area you’re monitoring.
Can I use AI object detection with MotionEyeOS?
MotionEyeOS uses pixel-difference based motion detection, not AI. For AI-powered detection (person detection, car detection), consider switching to Frigate NVR which runs YOLO/ONNX models on the Pi and integrates with Home Assistant. Frigate requires at least a Pi 4 4GB and optionally a Coral TPU accelerator for real-time processing.
Will the security camera work during power outages?
Not unless you have a UPS or battery backup. For critical security monitoring, use a UPS for both the Pi and your Ethernet switch. The Pi reboots quickly (30–60 seconds) after power restore, and MotionEyeOS starts automatically. For truly uninterrupted surveillance, a solar-charged battery system is the ultimate solution.
Build your security camera today. Find Raspberry Pi boards, Arducam camera modules, and accessories at Zbotic.in — India’s leading source for Raspberry Pi and camera components. Genuine products, fast shipping across India.
Add comment