Project

General

Profile

Support #980

Install MagicMirror on Debian

Added by Daniel Curtis 1 day ago. Updated about 17 hours ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Node.js
Target version:
Start date:
06/21/2025
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

This is a guide for installing MagicMirror with Debian Bookworm on a Raspberry Pi 2

Prepare the Environment

  • Make sure everything is up to date:
    sudo apt update && sudo apt upgrade
    
  • Install nodejs repo:
    curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
    sudo bash nodesource_setup.sh
    
  • Install required dependencies:
    sudo apt install wayfire seatd xdg-user-dirs git nano openssl ca-certificates wget gnupg libgtk-3-0 libx11-xcb-dev libnss3-dev libxss1 libxtst6 libasound2 libdrm2 libgbm1 fonts-arphic-uming procps arp-scan libatk1.0-0 libraspberrypi-bin libllvm14 libgl1-mesa-dri libglapi-mesa libsensors5 libdrm-radeon1 libelf1 libdrm-amdgpu1 libdrm-nouveau2 libgpiod-dev nodejs
    
  • Edit cmdline.txt :
    sudo nano /boot/firmware/cmdline.txt
    
  • Add wayland=on to the command line options:
    console=serial0,115200 console=tty1 root=PARTUUID=ef31a647-01 rootfstype=ext4 fsck.repair=yes wayland=on rootwait cfg80211.ieee80211_regdom=US
    
  • Create the magicmirror user and add it to the video group:
    sudo adduser --uid 1001 -ingroup users --shell /bin/bash --comment "magicmirror" mm
    sudo usermod -aG video mm
    
  • Create a wayfire service file:
    sudo nano /etc/systemd/system/wayfire.service
    
    • And add the following:
      [Unit]
      Description=Wayfire Wayland Compositor
      After=rc-local.service
      
      [Service]
      User=mm
      Type=simple
      ExecStart=/usr/bin/wayfire
      Restart=on-failure
      Environment=XDG_RUNTIME_DIR=/var/run/user/1001
      
      [Install]
      WantedBy=multi-user.target
      
  • Reload systemd and enable the service at boot:
    sudo systemctl daemon-reload
    sudo systemctl enable wayfire
    

Install MagicMirror

  • Switch to the magicmirror user:
    sudo su - mm
    
  • Add XDG_RUNTIME_DIR to .bashrc:
    echo "export XDG_RUNTIME_DIR=/run/user/1001" >> ~/.bashrc
    
  • Clone the MagicMirror repository:
    git clone https://github.com/MagicMirrorOrg/MagicMirror
    
  • Install the application:
    cd MagicMirror
    npm run install-mm
    
  • Create the config file:
    cp config/config.js.sample config/config.js
    

Autostart MagicMirror

  • Create a launch script:
    nano /home/mm/launch-mm.sh
    
    • And add the following:
      #!/bin/bash
      cd /home/mm/MagicMirror
      npm run start:wayland
      
    • Don't forget to make it executable:
      chmod +x /home/mm/launch-mm.sh
      
  • Create a wayfire config
    nano /home/mm/.config/wayfire.ini
    
    • And add the following:
      [core]
      plugins = autostart
      
      [autostart]
      boot = /home/mm/launch-mm.sh
      

Resources

#1

Updated by Daniel Curtis about 22 hours ago

  • Estimated time set to 1.00 h
  • % Done changed from 0 to 90
  • Status changed from New to In Progress
  • Description updated (diff)
#2

Updated by Daniel Curtis about 22 hours ago

  • Description updated (diff)
#3

Updated by Daniel Curtis about 17 hours ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Resolved
  • Description updated (diff)

Also available in: Atom PDF