Making a Magic Mirror

This discussion has a more recent version.
Cfresh ✭✭
First Anniversary Photogenic
edited April 2022 in Maker

Have you ever wanted to wake up in the morning, go to your bathroom, and when you see yourself in the mirror, see all the information you need for the day? Calendars, weather, voice assistant. You name it. With a magic mirror, you really can make your house something from a Sci-Fi movie. With a Raspberry Pi, you can create a smart home mirror and upload your own modules to customize it exactly how you like it. This guide will show you how you can start living your dream life of the future and impress your friends.

Programming the Pi

First comes first: you will need to make sure you have set up your PI on Raspberry Pi OS. We have a complete guide on how to do this here! Once you have that setup, you will need to download the code. You can find this on Github for the Magic mirror. Or, you can download it through the terminal on the Pi with system commands! Remember that this requires a Raspberry Pi 3 or higher to work.

  • First, you need to open the terminal on the Pi by hitting the Terminal logo in the top right.
  • Next, you will need to type in the command below! Using this command will download the Node.js command environment for the Pi.
curl -sL | sudo -E bash -
sudo apt install -y nodejs
  • After that, You will need to get the MagicMirror branch from Github. You can do this with a command. Enter the text below into the terminal.
git clone
  • Once downloaded, you will need to install the software. To install, change the directory to Magic Mirror and then run the install command. Both commands are found below and need to be run in order!
cd MagicMirror/

npm install
  • You now have the program downloaded and installed. Copy the default files from the config files, which you can do with the following command.
cp config/config.js.sample config/config.js
  • Lastly, you will need to launch the program with:
npm run start
  • Make sure if you are launching the device from boot that you change directory with CD MagicMirror/ (case sensitive) before running NPM run start. Once done, you will get the display below!

After Setup

  • Sometimes after setting up the Magic Mirror, you may notice that your weather is not working or showing an incorrect location. For the weather to work, you will need to navigate to Home/Pi/Magicmirror/Config/Config.js (pictured below)
  • Open config.js and find the weather module. Once you find this, you will see where it says "API key" This will be where you will paste your weather API key. There are several providers of these keys, but the one we used for this example was from Open Weather Map, where you can make a free account and get an API key for this mirror. Once you've pasted your key in the API, your weather should automatically display.
  • To get your exact location to display, you'll need to download the file at this link and find your locationID - see below for examples.

Your Magic Mirror is Complete!

Now that you have gone through the setup, the magic mirror is fully programmed. Now all you need to do is physically build the mirror. There are many different ways to do this. You can find an excellent guide to follow at All3DP, where they walk you step by step on how to create the frame for this! Once complete and all hooked up, you will have a smart mirror in your house that is fully customizable with modules so that you can customize this mirror to be your own!

We love seeing what our customers build

Submit photos and a description of your PC to our build showcase

Submit Now
Looking for a little inspiration?

See other custom PC builds and get some ideas for what can be done

View Build Showcase


If You Can Dream it, We Can Build it.

Services starting at $149.99