How To Build A Simple Raspberry Pi Home Security Camera
If there’s one thing that homeowners should consider, it’s security cameras. They’re great not only for deterring would-be robbers from breaking into your home but also for checking in on your pets while you’re away. And while there’s a slew of options on the market nowadays, they can be expensive or invasive of your privacy (some cameras canshare photos with third parties).
Fortunately, you don’t have to spend a ton of money and compromise your privacy just to keep your home safe. You can simply buy aRaspberry Piboard and create your own security camera from the comfort of your home. This project is easy to set up as it only needs three things: the Raspberry Pi with a microSD card, a camera (which can be an old webcam or the official Raspberry Pi camera), and a power supply. The best part is that you won’t need to code anything.

Step 1: Prepare the materials
Before diving into the software part, you first have to prepare the materials for thisRaspberry Pi project. You will need the following:
After collecting the materials, connect the camera to your board. If you have a Raspberry Pi camera, you need to install it in the ribbon slot between the ethernet and HDMI ports (viaRaspberry Pi). Simply pull up both sides of the slot and insert the camera’s flex cable. verify that the side with the printed words faces the ethernet port. Then, push back the sides of the connector to secure the flex cable.

If you have a USB webcam, you can simply insert this into any of the Raspberry Pi’s USB ports.
Step 2: Install the motionEyeOS on the microSD card
The motionEyeOS is an open-source operating system developed specifically for making a video surveillance system out of single-board computers like the Raspberry Pi (viaGitHub). Instead of the normal Raspberry Pi OS, we will use the motionEyeOS for this project. Follow the steps below to install this on your microSD card:
Step 3: Connect the Raspberry Pi to your Wi-Fi
Once the flashing process finishes, you need toconnect your Raspberry Pi to the Wi-Fi network. Insert the microSD card into the computer again, and do the steps below:
- Download and installAtom. This will be used to create a special file that will automatically connect your Raspberry Pi to the Wi-Fi network.2. Open Atom.3. Click on File and select New File.4. Type the following lines on the new file.

Replace “COUNTRY_ISO_CODE” with your country’s two-letter ISO code (e.g., us for the United States, ca for Canada).6. Replace “YOUR_NETWORK_NAME” and “YOUR_NETWORK_PASSWORD” with your network’s SSID and password.7. Save the file to your microSD card as “wpa_supplicant.conf” (without quotes).8. Eject the microSD card from your computer and insert it into your board.9. Power up the Raspberry Pi.10. While the board initializes, download and installAngry IPon your computer. You will use this to know what the Raspberry Pi’s IP address is.11. Open Angry IP.12. Click on Start.13. Find the IP address with a hostname starting with MEYE.
Launch your computer browser.15. Type the board’s IP address and hit Enter. It should automatically display the stream from your camera.

If you don’t see a video stream, check if the camera is properly connected. If you have the Raspberry Pi camera, it should be firmly seated on the ribbon slot.
Step 4: Change motionEyeOS settings
Assuming that the motionEyeOS works as expected, it’s time to configure the system to fit your needs (viaGitHub).
(Optional) Configure motionEyeOS to automatically upload to Google Drive
If you’d like to upload your photos and videos to the cloud for safekeeping and easy access, you can configure the motionEyeOS to do so. Here’s how you can enable automatic upload to Google Drive (viaGitHub):
- Open the settings by clicking on the hamburger icon in the top-left corner.

2. Scroll down to File Storage.
3. Turn on Upload Media Files.
4. Under Upload Service, select Google Drive.
- In the Location text field, type “/” (without quotes) followed by the Google Drive folder you want to use. ensure this folder already exists in your Google Drive.
6. Click on Obtain Key.
- Sign in to the Google account you’d like to use.
8. Select Allow to let motionEye access your Google account.
Copy the authorization code given and paste it in the motionEyeOS Authorization Key field.
Click on the Apply button at the top of the settings panel.
Click the Test Service button to test if the setup was successful. You should see a notification at the top saying “Accessing the upload service succeeded!”
Try waving in front of the camera. You should see the photos in your Google Drive folder almost immediately.