Skip to content
On this page

Security Camera

This is a good starting point for learning about using a raspberry pi as a camera.

Camera Hardware

Motion Eyes

A good foundation.

Motion Eye OS

Setting up a raspberry pi as a home security camera.

Motion Eye OS did a good job of getting up and running quickly.
GitHub - ccrisan/motioneyeos: A Video Surveillance OS For Single-board Computers

Motion Eye is the web interface for interacting with the motion client.
GitHub - ccrisan/motioneye: A web frontend for the motion daemon.
Home 路 ccrisan/motioneye Wiki 路 GitHub
GitHub - ccrisan/motioneye: A web frontend for the motion daemon.
Beginner Project: A Remote Viewing Camera With Raspberry Pi | Make:

Create Image

Using an SD card with more memory (e.g. 64 GB) is a good idea here. Sometimes, on windy / partly cloudy days motion gets triggered frequently and records a lot of otherwise empty videos. These can consume a lot of space locally before they get archived and deleted.

Find an image for your board. Download. Flash.
Supported Devices 路 ccrisan/motioneyeos Wiki 路 GitHub

Extract and burn to a micro SD with balenaEtcher

Device Configuration

It's possible to pre-configure networking, but then the default password is set and it's available on the network. Not ideal.

TODO: possible to change default passwords before first boot?

Configure network interface

Create a new file on the 31 MB 'boot' volume named wpa_supplicant.conf (NOTE: supplicant.conf did not work for me!)

    ssid="your network's SSID"
    psk="your network's password"


Static IP

possible to set a static IP via wireless?

Create a new file on the 31 MB 'boot' volume named static_ip.conf



You can use route -n to find your current gateway if unsure (May require sudo apt-get install net-tools)

This worked for the first boot, but second boot obtained a dynamic (different) IP.

After first boot, connect via SSH and apply the same configuration to:

vi /data/etc/static_ip.conf


May be possible to set the password as an environment variable in /boot/environment This would mean that the password is stored in plaintext on the card, but that seems better than an empty root/admin password.

Hoping this allows remote access via SSH.


This did not work for me. Wait until the machine boots, then change the password via the web interface. This should set the password to be the same on both the web admin interface and via SSH.

First Boot

Unmount the SD card and insert it into the camera.

Connect your Pi camera via the CSI connector or plug in a USB webcam using a Micro USB OTG adapter, then apply power. If your setup is correct, the Pi will boot up into MotionEyeOS.

If you did not set up a static IP, you can use a network scanner (e.g. router utility) to find its dynamically assigned IP address.

The device will have a default name, such as MEYE-12345678. Once you find the device name, navigate to the IP address on a web browser connected to the same network. A local website will appear, giving you a nice graphic interface on which to access your camera and settings.

To log in as a user, input user as the username with a blank password, or admin with a blank password as well. If you're setting up the system for the first time, use the admin username.
MotionEyeOS Raspberry Pi Zero W Tutorial: Setup & Uses | |


After logging in to the device via the web interface, there are some configurations to set up.

Timezone to eastern time? Then the timestamps will make more sense

Enable creating movie files Enable file storage

Archiving Recordings

Centralized Media Server

If you want to archive video longer than the device can hold, transfer to a different server

Run Commands

export PIIP=
export SERVERIP=

ssh root@PIIP
ssh-copy-id account@SERVERIP
ssh account@SERVERIP
rsync -av /data/output/Camera1 account@SERVERIP:~/out-data/front-porch
rm -r /data/output/Camera1/*


Keeping a high resolution video feed active in a web browser can consume a lot of bandwidth, even on a home network.

Don't keep the stream active in a browser unless you need to see what is happening.


I was unable to focus the lens with the provided lens extender / adapter. But without that, it feels pretty loosely connected.

Just need to play with it to see.
how to focus raspberry pi camera high quality at DuckDuckGo
Raspberry Pi High Quality Camera Lens Guide: The Key Topics


MotionEyes is based on ThingOS, an iot system. 馃挙 thing os at DuckDuckGo Home 路 ccrisan/thingos Wiki 路 GitHub 馃挙 ThingOS 馃挙 ThingOS