Install Magic Mirror on Raspberry Pi 3: Step-by-Step Guide

Transforming your bathroom or hallway into a smart, interactive space has never been more accessible, thanks to the Magic Mirror platform. By installing this open-source software on a Raspberry Pi 3, you can turn an ordinary glass mirror into a dynamic portal for weather, calendars, news, and home automation data. This guide walks you through the entire process, from hardware selection to final configuration, ensuring you build a reliable and stylish smart mirror.

Understanding the Magic Mirror Ecosystem

Magic Mirror is an application developed in Node.js that runs on devices like the Raspberry Pi. It operates through modular "modules" created by a global community, allowing for extreme customization. Before diving into the installation, it is vital to understand that the Raspberry Pi 3, while slightly slower than newer models, provides more than enough power for a basic, non-video-heavy setup. The choice of monitor is equally critical; you will need a two-way mirror or acrylic sheet to create the reflective surface that defines the project.

Prerequisites and Hardware Preparation

To begin, you must gather the necessary hardware. Beyond the Raspberry Pi 3 and a power supply, you need a monitor with a HDMI port and sufficient brightness for indoor use. A keyboard and mouse are required for the initial setup, although you can switch to SSH (remote access) once the system is configured. Ensure your Wi-Fi connection is stable, as the mirror requires internet access to fetch data. If you are building a framed mirror, now is the time to construct the frame that will hide the screen's edges.

an electronic device sitting on top of a wooden table
an electronic device sitting on top of a wooden table

Installing the Operating System

The recommended operating system for this project is Raspberry Pi OS (formerly Raspbian). You will need to flash the microSD card using a tool like Raspberry Pi Imager or BalenaEtcher. Download the latest version of Raspberry Pi OS, and use the imager to write it to the card. Once complete, insert the SD card into the Raspberry Pi, connect the monitor, USB peripherals, and power. The device will boot into the desktop environment for the first time, where you should immediately configure the Wi-Fi settings and update the system software via the terminal.

Setting Up Remote Access

For a clean installation, it is advisable to set up SSH and VNC immediately, allowing you to disable the physical monitor and keyboard later. Open the terminal and run sudo raspi-config. Navigate to "Interface Options," enable SSH, and optionally enable VNC. This step is crucial for managing the space behind the mirror, as you likely will not want a keyboard and mouse permanently attached to the wall.

Installing Node.js and Magic Mirror

Magic Mirror relies on Node.js to run. The recommended method is to use the Terminal on the Pi to pull the latest dependencies. First, update the package list with sudo apt update. Then, install the "screenly-o-matic" display manager, which simplifies loading the Magic Mirror interface on boot. Next, clone the Magic Mirror config repository using git clone and navigate into the directory. Finally, run npm install or yarn install to download the core application and its modules.

Magic Mirror
Magic Mirror

Configuring the Modules

After installation, you configure what appears on the mirror by editing the config.js file. This file dictates the layout, weather location, calendar feeds, and token authentication for services like Google or Facebook. You can start with the default configuration provided by the installer and gradually add modules for smart home integration, such as Domoticz or Alexa voice control. Remember to restart the mirror application after every change to the configuration to see the updates.

Final Assembly and Calibration

With the software installed and configured, you can proceed to the physical assembly. If you built a frame, secure the monitor inside, ensuring the two-way mirror is clean and positioned correctly in front of the screen. The angle of the mirror is important; a slight tilt usually helps reduce glare from overhead lights. To finalize the software setup, set the Magic Mirror software to launch on boot using the terminal command npm start within the module directory, or configure it as a background service. Once the time and date appear clearly on the glass, your Raspberry Pi smart mirror is complete.

Raspberry Pi-powered magic mirror - Raspberry Pi
Raspberry Pi-powered magic mirror - Raspberry Pi
Magic Mirror: Spiegel zeigt Wetter und Nachrichten beim Zähneputzen – dank Raspberry Pi | t3n
Magic Mirror: Spiegel zeigt Wetter und Nachrichten beim Zähneputzen – dank Raspberry Pi | t3n
NEW Raspberry Pi Magic Mirror Modules!
NEW Raspberry Pi Magic Mirror Modules!
Raspberry Pi Smart Magic Mirror - Becky Stern
Raspberry Pi Smart Magic Mirror - Becky Stern
Raspberry Pi Magic Mirror
Raspberry Pi Magic Mirror
the raspberry pismart mirror is displayed in this screenshoter image
the raspberry pismart mirror is displayed in this screenshoter image
an electronic device with wires attached to it on a table next to a circuit board
an electronic device with wires attached to it on a table next to a circuit board
How to Build a Smart Magic Mirror With Raspberry Pi
How to Build a Smart Magic Mirror With Raspberry Pi
How to change the Repository Mirror on Raspbian
How to change the Repository Mirror on Raspbian
Build A Raspberry Pi Magic Mirror With MagPi Issue 54 (video)
Build A Raspberry Pi Magic Mirror With MagPi Issue 54 (video)
Raspberry Pi 5-Powered Magic Mirror Can Play Retro Games Too
Raspberry Pi 5-Powered Magic Mirror Can Play Retro Games Too
The 8 Best Raspberry Pi Smart Magic Mirror Projects
The 8 Best Raspberry Pi Smart Magic Mirror Projects
Raspberry Pi Smart Mirror
Raspberry Pi Smart Mirror
How to Make Raspberry Pi 3 Boot From USB
How to Make Raspberry Pi 3 Boot From USB
Magic Mirror — Raspberry Pi Official Magazine
Magic Mirror — Raspberry Pi Official Magazine
How to Build a Raspberry Pi Smart Mirror!
How to Build a Raspberry Pi Smart Mirror!
How to Install RetroPie on Raspberry Pi
How to Install RetroPie on Raspberry Pi
Orange Pi - Magic Mirror
Orange Pi - Magic Mirror
Make Your Own Smart Mirror for Under $80 - Using Raspberry Pi
Make Your Own Smart Mirror for Under $80 - Using Raspberry Pi
Redirecting...
Redirecting...
How to Turn an Old Laptop Screen Into a Magic Mirror
How to Turn an Old Laptop Screen Into a Magic Mirror
an open laptop computer sitting on top of a wooden desk next to a book shelf
an open laptop computer sitting on top of a wooden desk next to a book shelf
Smart Mirror -Raspberry Pi 3
Smart Mirror -Raspberry Pi 3
an open laptop computer sitting in a cardboard box on top of a wooden table next to a piece of paper
an open laptop computer sitting in a cardboard box on top of a wooden table next to a piece of paper