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.

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.

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.























