how to stop magic mirror 2

How to Stop Magic Mirror 2: Ultimate Guide

By Hannah Allen
AD

Magic Mirror 2 is a powerful open-source platform that turns a Raspberry Pi or computer into a smart mirror, but there are times when you need to stop it. Whether you are troubleshooting a crash, rebooting hardware, or simply stepping away from the device, knowing how to stop Magic Mirror 2 cleanly is essential for any smart mirror setup. This guide covers safe methods to halt the application without risking data corruption or configuration issues.

Understanding How Magic Mirror 2 Runs

Before you stop Magic Mirror 2, it helps to understand how the service operates in the background. On most installations, Magic Mirror 2 runs as a Node.js process, often managed by tools like PM2 or launched directly from the terminal. The application continuously renders modules, polls APIs, and listens for interactions, which means an abrupt stop can leave temporary files or sessions in an inconsistent state. Recognizing this behavior is key to stopping the platform safely.

Stopping Magic Mirror 2 from the Terminal

If you launched Magic Mirror 2 from the command line, the quickest way to stop it is by returning to that terminal window and pressing Ctrl + C. This sends an interrupt signal that allows Node.js to gracefully shut down the application. You should see log messages indicating that the server is closing connections and saving states. If the process does not terminate, you may need to locate and kill the specific Node process.

AD
More tips
More tips
a woman is pointing at the mirror with her finger
a woman is pointing at the mirror with her finger
Man Reveals How to Build Your Own Futuristic \
Man Reveals How to Build Your Own Futuristic \

Using PM2 to Stop the Service

Many users rely on PM2 to keep Magic Mirror 2 running continuously, which changes how you stop the application. To halt the service managed by PM2, use the command pm2 stop magicmirror in your terminal. This gracefully shuts down the instance while preserving logs and startup configurations. You can verify the status with pm2 list to ensure the process is no longer active.

Method

Magic Mirror — Joe's Projects
Magic Mirror — Joe's Projects
How to Spot a 2-Way Mirror
How to Spot a 2-Way Mirror
Spiritual Witchcraft, Protection For Witches, Bedroom Protection Spell, Bedroom Witchcraft, Room Protection Sigil, Mirror Cleansing Ritual, Mirror Work Witchcraft, Protection Ward, Protection Magick
Spiritual Witchcraft, Protection For Witches, Bedroom Protection Spell, Bedroom Witchcraft, Room Protection Sigil, Mirror Cleansing Ritual, Mirror Work Witchcraft, Protection Ward, Protection Magick

Command

Use Case

AD

Direct Terminal

Hoodoo Spells, Pagan Spirituality, Charmed Book Of Shadows, Evil Eye Art, Glam Mirror, Which Witch, Magick Spells, Witch Spirituality, Magical Herbs
Hoodoo Spells, Pagan Spirituality, Charmed Book Of Shadows, Evil Eye Art, Glam Mirror, Which Witch, Magick Spells, Witch Spirituality, Magical Herbs
Hoodoo Spells, Easy Spells, Grimoire Book, Witch Spirituality, Magic Spell Book, Wiccan Spell Book, Magick Book, Witchcraft Spell Books, Witch Spell Book
Hoodoo Spells, Easy Spells, Grimoire Book, Witch Spirituality, Magic Spell Book, Wiccan Spell Book, Magick Book, Witchcraft Spell Books, Witch Spell Book
Build a DIGITAL MAGIC MIRROR
Build a DIGITAL MAGIC MIRROR
mickey mouse and minnie mouse on the cover of disney's musical mirror starring mickey mouse
mickey mouse and minnie mouse on the cover of disney's musical mirror starring mickey mouse
How to lock and protect your mirrors
How to lock and protect your mirrors
How to Spot a 2-Way Mirror
How to Spot a 2-Way Mirror

Ctrl + C

Quick stop for foreground processes

AD

PM2

a person holding up a book with instructions on how to use mirror - gazing
a person holding up a book with instructions on how to use mirror - gazing
Mirroring Spell, Mirror Magick Spells, Mirror Magic Spells, Book Of Mirrors Witchcraft, Mirrored Spell Casting Guide, Mirror Magic Spell, Mirror Witchcraft Spell, Mirror Magick, Book Of Mirrors
Mirroring Spell, Mirror Magick Spells, Mirror Magic Spells, Book Of Mirrors Witchcraft, Mirrored Spell Casting Guide, Mirror Magic Spell, Mirror Witchcraft Spell, Mirror Magick, Book Of Mirrors
How To Check Your Hotel Mirror!
How To Check Your Hotel Mirror!
an animated heart with the word you in it and some hearts around it on a green background
an animated heart with the word you in it and some hearts around it on a green background
an info sheet describing how to use the virtual mirror for facial care and skin care
an info sheet describing how to use the virtual mirror for facial care and skin care
Mirror Manifestation - Law of Attraction Method
Mirror Manifestation - Law of Attraction Method
Mirror Magick Spells, Mirror Work Witchcraft, Book Of Mirrors Witchcraft, Scrying Mirror Witchcraft Spell, Mirror Witchcraft Spell, Mirror Magick, Mirror Magick For Beginner Witches, Mirrors In Magic, Ritual Mirror Spell
Mirror Magick Spells, Mirror Work Witchcraft, Book Of Mirrors Witchcraft, Scrying Mirror Witchcraft Spell, Mirror Witchcraft Spell, Mirror Magick, Mirror Magick For Beginner Witches, Mirrors In Magic, Ritual Mirror Spell
Hoodoo Conjure, Psychic Development Learning, Hoodoo Spells, Old Mirrors, Spiritual Psychology, Witch Spirituality, Divine Feminine Spirituality, Magic Spell Book, Witch Diy
Hoodoo Conjure, Psychic Development Learning, Hoodoo Spells, Old Mirrors, Spiritual Psychology, Witch Spirituality, Divine Feminine Spirituality, Magic Spell Book, Witch Diy
Mirror Spells Protection, Mirror Cleansing Spell, Mirror Magick Spells, Mirror Magic Spells, Mirror Chants, Scrying Mirror Witchcraft Spell, Mirror Magic Spell, Mirror Locking Spell, Mirror Witchcraft Spell
Mirror Spells Protection, Mirror Cleansing Spell, Mirror Magick Spells, Mirror Magic Spells, Mirror Chants, Scrying Mirror Witchcraft Spell, Mirror Magic Spell, Mirror Locking Spell, Mirror Witchcraft Spell
Wiccan Magic, Writers Notebook, Witch Spirituality, Witch Diy, White Witch, Magical Life, Astrology Chart, Energy Healing Spirituality, Wiccan Spells
Wiccan Magic, Writers Notebook, Witch Spirituality, Witch Diy, White Witch, Magical Life, Astrology Chart, Energy Healing Spirituality, Wiccan Spells
the texting app on an iphone is being used to describe what it's like
the texting app on an iphone is being used to describe what it's like
Candle Magic Spells, Goddess Magick, Witch Quotes, Wiccan Witch, Witch Spirituality, Magical Herbs, Magic Spell Book, Wiccan Spell Book, Witchcraft Spell Books
Candle Magic Spells, Goddess Magick, Witch Quotes, Wiccan Witch, Witch Spirituality, Magical Herbs, Magic Spell Book, Wiccan Spell Book, Witchcraft Spell Books
How To Enchant Objects, Enchanting Objects, Enchanting Items Witchcraft, How To Enchant An Object, Enchant An Object, Enchanting An Object Spell, Enchant An Object Spell, Enchant Object Spell, Mirror Witchcraft Spell
How To Enchant Objects, Enchanting Objects, Enchanting Items Witchcraft, How To Enchant An Object, Enchant An Object, Enchanting An Object Spell, Enchant An Object Spell, Enchant Object Spell, Mirror Witchcraft Spell
two pictures with the same caption in different languages, one saying mirror mirror on the wall who's the fairest of them all?
two pictures with the same caption in different languages, one saying mirror mirror on the wall who's the fairest of them all?

pm2 stop magicmirror

Graceful stop for background services

AD

Kill Process

kill <PID>

Force stop when other methods fail

Forcefully Killing the Process

In situations where Magic Mirror 2 becomes unresponsive and does not respond to standard commands, you may need to forcefully terminate it. Start by identifying the process ID (PID) using ps aux | grep "MagicMirror2" or top. Once you have the PID, run kill <PID> to send a termination signal. If the process persists, use kill -9 <PID> as a last resort, though this should be avoided unless necessary to prevent file lock issues.

Preventing Automatic Restart

Stopping Magic Mirror 2 is only half the battle if the service is configured to restart automatically. If you are using PM2, you can prevent autostart with pm2 unref magicmirror or disable the startup script entirely by running pm2 save and pm2 startup reset. For systemd services, you must disable the unit file using sudo systemctl disable magicmirror.service to ensure the mirror does not relaunch after a reboot while you perform maintenance.

Checking for Running Instances

After you stop Magic Mirror 2, it is wise to confirm that no orphaned processes are still consuming resources. Use ps aux | grep node to scan for lingering Node.js instances related to the mirror. Close any remaining processes to free up CPU and memory. On GUI environments, you can also check the system monitor application to verify that the rendering window and backend services are fully closed.

Best Practices for Stopping Magic Mirror 2

To maintain a stable smart mirror environment, always attempt a graceful stop before resorting to forceful methods. Save your configuration, close any active modules that require external permissions, and ensure sensors or cameras are properly disabled to avoid hardware conflicts. Scheduling stops during low usage periods and documenting your shutdown routine can prevent unexpected behavior and streamline future troubleshooting.

AD