Install Magic Mirror² on Raspberry Pi 3
Magic Mirror² is an open-source modular smart mirror platform. Transforming a standard monitor into a personalized information hub, it offers a customizable interface to display everything from weather forecasts and calendars to news feeds and transit information. This comprehensive guide provides a step-by-step process for installing Magic Mirror² on a Raspberry Pi 3.
Prerequisites
Before beginning the installation, ensure the following prerequisites are met:
- Raspberry Pi 3 Model B or B+
- Monitor (HDMI compatible)
- Power supply for Raspberry Pi and monitor
- MicroSD card (8GB or larger recommended)
- HDMI cable
- Keyboard and mouse (for initial setup)
- Active internet connection
Installing Raspberry Pi OS Lite
First, download the Raspberry Pi Imager tool from the official Raspberry Pi website. Using this tool, flash the Raspberry Pi OS Lite image onto the microSD card. The Lite version is recommended for Magic Mirror² as it minimizes resource usage. After flashing, safely eject the microSD card.
Enabling SSH
Enabling SSH allows remote access to the Raspberry Pi, simplifying the installation process. Create an empty file named `ssh` (without any extension) in the `boot` partition of the flashed microSD card. This automatically enables SSH upon the first boot.
Connecting to the Network
For headless setup (without a monitor and keyboard), connect the Raspberry Pi to the network via Ethernet. For Wi-Fi setup, add the network credentials to the `wpa_supplicant.conf` file located in the `boot` partition. Include the following information, replacing the SSID and password placeholders with the correct credentials:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="YOUR_NETWORK_SSID"
psk="YOUR_NETWORK_PASSWORD"
}
First Boot and Configuration
Insert the microSD card into the Raspberry Pi and power it on. After a few minutes, the Raspberry Pi should be accessible on the network. Use an SSH client (like Putty or Terminal) to connect to the Pi. Determine its IP address using a network scanner or by checking your router’s DHCP client list. The default username is `pi` and the default password is `raspberry`.
Once connected, execute the following commands to update the system and install necessary packages:
sudo apt update
sudo apt upgrade -y
Installing Magic Mirror²
Clone the Magic Mirror² repository to your Raspberry Pi using the following command:
git clone https://github.com/MichMich/MagicMirror.git
Navigate to the Magic Mirror² directory:
cd MagicMirror
Install the required Node.js dependencies:
npm install
Configuring Magic Mirror²
Copy the sample configuration file to create a custom configuration:
cp config/config.js.sample config/config.js
Open the `config.js` file using a text editor (nano or vim) and customize settings like language, location, modules, and display options. This file provides extensive control over the appearance and functionality of the Magic Mirror².
Starting Magic Mirror²
Start Magic Mirror² using the following command:
npm start
This launches Magic Mirror² in server-only mode. Access the interface on any device within the same network by navigating to the Raspberry Pi's IP address in a web browser (e.g., `http://[Raspberry_Pi_IP_Address]:8080`).
Autostarting Magic Mirror² on Boot
To automatically start Magic Mirror² on every boot, create a systemd service. Create a new file named `mm.service` in `/etc/systemd/system/` with the following content:
[Unit]
Description=MagicMirror
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/MagicMirror
ExecStart=/usr/bin/npm start
Restart=on-failure
[Install]
WantedBy=multi-user.target
Enable and start the service with the following commands:
sudo systemctl enable mm.service
sudo systemctl start mm.service
Rotating the Display (Optional)
If the monitor requires rotation, modify the `/boot/config.txt` file and add the following line, adjusting the rotation degree as needed:
display_rotate=1
Where `1` represents 90 degrees clockwise, `2` is 180 degrees, and `3` is 270 degrees clockwise (or 90 degrees counter-clockwise). Reboot the Raspberry Pi for the changes to take effect.

How To Install Magicmirror² On A Raspberry Pi Flemming S Blog

Raspberry Pi Smart Mirror How To Make A Magic All3dp

How To Install Magic Mirror On Your Raspberry Pi Howchoo

Complete Raspberry Pi Magic Mirror Tutorial Newbie Friendly Central

How To Build A Super Slim Smart Mirror Raspberry Pi

How To Setup Build A Magic Mirror With Raspberry Pi Beginners Guide Okdo

How To Build A Super Slim Smart Mirror Raspberry Pi

How To Setup Build A Magic Mirror With Raspberry Pi Beginners Guide Okdo

Raspberry Pi Magicmirror Without The Mirror Part 1 Basic Setup

Build A Smart Magicmirror With Two Displays Running On Raspberry Pi Florian Müller