Skip to content

Today I am going to show you how to install MagicMirror² Software on your Raspberry Pi 3 B+.

(Step-by-step)

In fact, after reading this article, you will be able to install the software on your own with all of the kinks worked out.

Let’s dive right in…

Step #1: Update the OS

sudo apt-get update
sudo apt-get upgrade

Step #2: Install MagicMirror²

curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

Copy config.js.sample to config.js

cp MagicMirror/config/config.js.sample MagicMirror/config/config.js

Edit config.js (see magicmirror.builders for configuration options)

nano MagicMirror/config/config.js

Turn off the screensaver
edit ~/.config/lxsession/LXDE-pi/autostart:

sudo nano ~/.config/lxsession/LXDE-pi/autostart

Add the following lines:

@xset s noblank
@xset s off
@xset -dpms

Edit /etc/lightdm/lightdm.conf:

sudo nano /etc/lightdm/lightdm.conf

Add the following line below [SeatDefaults]

xserver-command=X -s 0 -dpms

Step #3: Configure Settings

Weather Widget

sudo nano ~/MagicMirror/config/config.js

How to Start Software Automatically When Booting

Install PM2 using NPM:

sudo npm install -g pm2

To make sure PM2 can do it’s job when (re)booting your operating system, it needs to be started on boot. Luckily, PM2 has a handy helper for this.

pm2 startup

PM2 will now show you a command you have to execute.

To use PM2 in combination with MagicMirror, we need to make a simple shell script. Preferable, we put this script outside the MagicMirror folder to make sure it won’t give us any issues if we want to upgrade the mirror.

cd ~
nano mm.sh

Add the following lines:

cd ~/MagicMirror
DISPLAY=:0 npm start

Save and close, using the commands CTRL-O and CTRL-X. Now make sure the shell script is executable bij performing the following command:

chmod +x mm.sh

Start MagicMirror with the following command:

pm2 start mm.sh

Save your configuration:

pm2 save

Your MagicMirror will now start automatically on boot. If you make any changes, you can reload MagicMirror with the following command:

pm2 restart mm

Additional configuration instructions can be found at: www.magicmirror.builders.

3rd Party Modules

MagicMirror² Software is completely open source and people are crafting modules to add additional functionality to the smart mirror widgets.

You can check them out here:

https://github.com/MichMich/MagicMirror/wiki/3rd-Party-Modules

Now I Want to Hear From You.

There you have it:

My complete instructions on how to install MagicMirror² software.

Now I’d like to hear from you…

Did you struggle with any of steps I outlined?

Are you going to install any of the 3rd party modules?

Let me know by leaving a comment below right now.

Comments (13)

  1. I really enjoyed making this guide because I know when I first installed this software, there were many nuances to getting it completely configured. Let me know if this helped you by commenting “SUCCESS” below. 😄

  2. Totally new to this. Installed the Magicmirror software using one line code. But now I don’t know how to make changes/add new widgets. Any help would be greatly appreciated.

    1. Ken,

      That would be a setting on the computer itself rather than the monitor. When you go into your system settings there should be an energy saver section where you can update it to not fall asleep after X minutes.

  3. I’m looking to purchase a mirror (Glass or Plexiglass)for a magic mirror. How uch for a mirror that will be 24″ by 36″?

  4. Do you have any programs that would allow me to make a photo booth instead of on a smart mirror to keep in my living room for guests?

    1. We do sell glass used to make mirror photo booths! It is the same glass for the smart mirrors. We do not sell any programs, however. If you’re interested in ordering the glass from us, feel free to give us a call or send us an email for a quote! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *