MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10

    Scheduled Pinned Locked Moved Troubleshooting
    324 Posts 55 Posters 781.8k Views 59 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer
      last edited by Mykle1

      Install MagicMirror on a PC Windows 7/10 - Complete walkthrough

      I just finished a fresh install of Windows 7 on a Compaq Presario CQ57 laptop with 3.5GB of RAM and 32-bit OS.
      Worthless really, but it runs Magic Mirror like a champ, as it is far more robust than a Pi of any kind.
      No graphics problems. No system load issues. Even this old laptop makes a decent MM dev machine.
      Ok, lets get to it!

      First things first

      • Go to https://nodejs.org/en/download/ and download the Windows Installer. In this case it’s the
        node-v6.11.0-x86.msi file because I’m running 32-bit Windows 7. Double Click the installer and
        let it do its thing. You don’t have to change anything. The default installation is what you want.
        You may have noticed that npm was also installed. Isn’t that nice? :-)

      • Now go to https://git-for-windows.github.io/ and download git for Windows. Double Click the
        installer. Again, you can use the defaults but if you want to use TrueType fonts in your terminal
        windows then choose that in the Components section of the installer. Also, you can choose to use
        Git only from the Git Bash terminal. The default allows you to use Git commands from the Windows Command
        prompt. Other than that, this walkthrough assumes the defaults for Git installation.

      Lets get the MagicMirror software

      • Go to https://github.com/MichMich/MagicMirror to get the MagicMirror software.
      • Click on the green Code button on the right and copy the url (https://github.com/MichMich/MagicMirror.git)
      • Open and new terminal and type git clone and one space, then paste the url you just copied.
      • It should look like this git clone https://github.com/MichMich/MagicMirror.git

      Now you wait patiently as it installs.

      You’re so close you can taste it!

      Remember we installed Git? Click Start/All Programs/Git/Git Bash. This opens your Git Bash terminal
      window.

      • Type cd MagicMirror and press the Enter key. Now you’re in the ~/MagicMirror directory.

      • Type npm install and press the Enter key. This will install the dependencies for MagicMirror.
        It will take some time to complete depending on your PC. Mine took 6 minutes.
        You may see npm WARN for a few items but these are NOT errors and don’t affect anything.
        When that’s done, we continue, still in the ~/MagicMirror directory.

      • Type npm start and press the Enter key. You WILL get a “Please create a config file.” message
        I just wanted you to see it. No worries. We’re almost done. Follow me!

      • Press the Alt key on your keyboard. This drops down a menu bar at the top of your screen.
        You won’t see your mouse cursor until you move it all the way to the top of the screen into the
        menu bar. There it is! Click on the File menu and click Exit. This brings you back to your
        desktop. If there is a “Windows Security Alert” window concerning “Electron” click the Allow access button.
        You’ll notice “fatal: Not a git repository (or any of the parent directories): .git” in your teminal window.
        Not to worry. Minimize your terminal window or move it out of the way.

      Here we create your working config.js file.

      We’re not going to use the terminal to do this. This way is just easier, especially for beginners.
      From your desktop, navigate to your MagicMirror folder. Remember where it is? :-)

      • Double click the MagicMirror folder.
      • Double click the config folder.
      • Right click the config.js.sample file.
      • Choose Copy
      • Right click somewhere else in that same window and choose Paste.
      • Rename the “COPY” you just pasted to config.js
        Windows may ask about changing the file type. Accept! It’s now a JScript Script File.
        The config.js file that you just created is your working config file.
        This is where you’ll add your entries for other modules to your mirror.

      Had enough? Lets run that MagicMirror, NOW!

      If your Git Bash terminal window is still open (I never told you to close it) we can continue.
      If you need to open a new one then do so now and type cd MagicMirror to enter the MagicMirror directory.
      Now that you’re in the ~/MagicMirror directory of your terminal:

      • Type npm start and press the Enter key.

      Your Clock, Calendar, Compliments and Newsfeed modules are now operational!

      You’re welcome!

      Why did I bother?

      Well, for a number of reasons. When I discovered MagicMirror (January 2017) I knew less than you.
      I am completely serious. I had to learn all of this from scratch. Fortunately for me, there were some
      very generous and kind users on this forum that helped me. One in particular continues to help and
      tutor me to this day. I will call him, “Broffessor” for the sake of this walkthrough. I approached
      him for help on my very first module and he was more than willing. Now, I have 10 modules under
      my belt (7 published, 2 about to be released and 1 that will NEVER be released) and a good friend
      to go along with them. This walkthrough is a way for me to say thank you to those people that helped
      me, by helping others. I hope I have done so.

      How it all began

      My son mentioned the Raspberry Pi in passing one day. Now I’m doing some simple coding and creating
      modules for MagicMirror.

      Who woulda thought?

      Edit! Windows 10 users!

      I have not tested this but I’ve been assured that MM will indeed work on Windows 10, following the instructions above. You must absolutely use the Git Bash terminal window because the Windows CMD window does not recognize bash or sh. However, Git Bash creates a linux-like environment in which MM runs very well. :-)

      Create a working config
      How to add modules

      D H J U G 8 Replies Last reply Reply Quote 19
      • D Offline
        Damian @Mykle1
        last edited by Damian

        @Mykle1

        Hello. Thank you for this guide.
        Can you help me with one very small problem?
        I did this word for word and everything went perfect. I have MM showing up with the stock modules clock, calendar, compliments, news feed.

        I then go to the config.js file I created with the config.js sample as you stated, to have a look at it before I start getting other modules downloaded, but I get the following error when I try and open it.
        I did try and delete the config.js, and C/P the sample again and rename to config.js but same thing happens. MM works with stock modules, just that I cannot get into the config.js file at all.

        Windows Script Host

        Script:  C:\Users\Damian\MagicMirror\config\config.js
        Line:    26
        Char:    3
        Error:   Expected identifier, string or number
        Code:    800A0404
        Source:  Microsoft JScript compilation error
        

        Edit - I have now tried to open the other JS files, with same result. Just tried to open Compliments JScript Script File and that is showing similar error.

        This is a fresh install of Win 7 Home Premium SP1 and wondering if this needs anything downloaded to be able to read/execute the file, or whether there is another problem in the MM files/install?

        Mykle1M 1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @Damian
          last edited by

          @Damian

          What are you trying to open the config.js file with? Open it with your text editor. I prefer Notepad++ because it can open, edit and save just about any code file but any text editor should work on the config.js file.

          Create a working config
          How to add modules

          D 1 Reply Last reply Reply Quote 1
          • D Offline
            Damian @Mykle1
            last edited by Damian

            @Mykle1 said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7:

            @Damian

            What are you trying to open the config.js file with? Open it with your text editor. I prefer Notepad++ because it can open, edit and save just about any code file but any text editor should work on the config.js file.

            Ahhhhhh I was simply clicking on it as I do with my Pi which then opens the file straight away. So I have to right click on it > open with > and then select Notepad, ect?
            I was too impatient and uninstalled everything, to download and start again incase I did something wrong first time, so it is just finishing off now, and will try as you suggest.

            Thank you for fast reply.

            Edit: Thanks, that worked. Although, even with Word Wrap in notepad enabled, the document is a continuous line that I will have to sort out to resemble the proper layout as it is within my Pi - Neat and tidy.

            Thanks again for your time making this Guide, which was very helpful, and to your timely manner in reply to helping with my school boy error problem

            Mykle1M 1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @Damian
              last edited by

              @Damian

              Yes, that should do it. The default Win7 Notepad will work just fine. Notepadd++ is a free download and makes life a whole lot easier if you’re going to be coding or making many edits.

              Oh no! You trashed the entire installation??? But it was working. That was NOT in my Complete Walkthrough.

              :^)

              Create a working config
              How to add modules

              D 1 Reply Last reply Reply Quote 1
              • D Offline
                Damian @Mykle1
                last edited by Damian

                @Mykle1 said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7:

                @Damian

                Notepadd++ is a free download and makes life a whole lot easier if you’re going to be coding or making many edits.

                I will download that now as Notepad seems to just make an unworkable continuous line in every MM file, and seeing as I will be adding more modules, and editing them, your suggestion might work better?

                Oh no! You trashed the entire installation??? But it was working. That was NOT in my Complete Walkthrough.

                :^)

                Yeah, your guide did indeed work, I just overlooked the obvious that I’m back on a PC, with a fresh win7 install, and need to allocate what opens what first. I was just way too excited to see MM through a PC, my brain was far too much on the end game :-(

                Thanks again for your help.

                Edit:
                Notepad++
                Brilliant, just brilliant. :-)

                Mykle1M 1 Reply Last reply Reply Quote 1
                • Mykle1M Offline
                  Mykle1 Project Sponsor Module Developer @Damian
                  last edited by

                  @Damian said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7:

                  Yeah, your guide did indeed work, I just overlooked the obvious that I’m back on a PC, with a fresh win7 install, and need to allocate what opens what first. I was just way too excited to see MM through a PC, my brain was far too much on the end game :-(

                  Been there. Done that. No worries.

                  Thanks again for your help.

                  You’re welcome, mate. Cheers!

                  Edit:
                  Notepad++
                  Brilliant, just brilliant. :-)

                  There are other text editors for coding (my son uses Atom) but I have taken a liking to Notepad++. I think it’s safe to say that you’ll enjoy it too.

                  Enjoy your PC/mirror.

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 1
                  • L Offline
                    luizcarlosnery
                    last edited by

                    Hello mykle1,
                    I followed your guide in: https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners, however my problem is not installing modules, I can install almost all, but some do not work … like, voice-control and play-music for ex …
                    Remembering that I’m following your guide complete-walkthrough-install-magicmirror-on-a-pc-windows-7-10
                    My MagicMirror is in Windows 7 64Bits.

                    Thank you so much.

                    Mykle1M 1 Reply Last reply Reply Quote 0
                    • Mykle1M Offline
                      Mykle1 Project Sponsor Module Developer @luizcarlosnery
                      last edited by Mykle1

                      @luizcarlosnery said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10:

                      some do not work … like, voice-control and play-music for ex …

                      So, based on your comments I can assume that your MM software is up and running. Some modules are a bit more complicated than others to get working. Perhaps voice-control and play-music are 2 such modules. I don’t use them so I am unable to help you with them. Pay particular attention to the README files that come with them.
                      You can post another topic in TROUBLESHOOTING and ask for help there. Hopefully, someone with experience with those modules can help you.

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        barnosch
                        last edited by

                        great tutorial. Will give it a try later on.
                        I made the complicated way around it and created a VirtualMaschine with Debian, with a standalone MM installation.

                        This natively running thing is way better. Thanks

                        Mykle1M 1 Reply Last reply Reply Quote 1
                        • Mykle1M Offline
                          Mykle1 Project Sponsor Module Developer @barnosch
                          last edited by

                          @barnosch said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10:

                          great tutorial. Will give it a try later on.
                          I made the complicated way around it and created a VirtualMaschine with Debian, with a standalone MM installation.
                          This natively running thing is way better. Thanks

                          You’re welcome.

                          Yes, MM runs beautifully on a PC running windows. Alternately, if you prefer Linux, you can install uBuntu on a PC. That also runs beautifully.

                          Create a working config
                          How to add modules

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            barnosch
                            last edited by

                            Runs perfect on a Win 10 x64.
                            One thing for me is, i don’t like the fullscreen, because i want to test some stuff before i bring it to the real MM.
                            Try instead of
                            “npm start” a
                            “node serveronly”
                            This launches the MM not in full screen. You can point now to your browser and type
                            localhost:8080
                            This will show your MM installation in your favourit browser.
                            In my case, the better option :)

                            1 Reply Last reply Reply Quote 1
                            • WominatorW Offline
                              Wominator
                              last edited by Wominator

                              Hi Mykle1!
                              Great job! I installed it on an older Lenovo Miix 8 tablet as my “kitchen mirror” and it works smooth.
                              Have you or anyone else tried to make a “start.bat” or something like that to auto start it with windows or by a shortcut on the desktop?
                              That would be a great improvement.
                              Thanks in advance and regards
                              womi

                              If you want to make it idiot proof, someone will build a better idiot.

                              Mykle1M 1 Reply Last reply Reply Quote 0
                              • Mykle1M Offline
                                Mykle1 Project Sponsor Module Developer @Wominator
                                last edited by

                                @Wominator said in Complete Walkthrough - Install MagicMirror on a PC - Windows 7/10:

                                That would be a great improvement.

                                Well, I never did, but you can try this. I can’t test at the moment, but it should work. Save this as a .bat file and put it on your desktop.

                                :: This should work if this bat file is on the desktop
                                :: Also, CMD window needs ability to run bash commands (done during install of GIT)
                                
                                :: Start CMD window
                                start cmd.exe /k
                                
                                :: cd back one directory
                                cd ..
                                
                                :: cd to MM directory
                                cd MagicMirror
                                
                                :: start MM
                                npm start
                                

                                Create a working config
                                How to add modules

                                WominatorW 1 Reply Last reply Reply Quote 0
                                • WominatorW Offline
                                  Wominator @Mykle1
                                  last edited by yawns

                                  @Mykle1
                                  Hi!
                                  Thanks for the quick reply!
                                  It didn’t work out that way. I found a documentation on:
                                  https://stackoverflow.com/questions/21564275/windows-shortcut-to-run-git-bash-script

                                  So, I generated a script C:\Users\USER\npmstart.sh with

                                  cd ..
                                  cd ~/MagicMirror
                                  npm start
                                  

                                  Afterwards I generated a shortcut on the desktop with following path:
                                  "C:\Program Files\Git\bin\sh.exe" -l -i "C:\Users\USER\npmstart.sh"

                                  And it works. It starts the Bash and runs MagicMirror and leaves the Bash open in the background, so I can get back to it by pressing the Windows-Button. (remember, I run the MagicMirror on a tablet without keyboard and mouse)
                                  In the Bash, I can stop MagicMirror with the onscreen keyboard by pressing Ctrl+C.

                                  Regards
                                  womi

                                  If you want to make it idiot proof, someone will build a better idiot.

                                  Mykle1M 1 Reply Last reply Reply Quote 2
                                  • Mykle1M Offline
                                    Mykle1 Project Sponsor Module Developer @Wominator
                                    last edited by

                                    @Wominator

                                    Well done!

                                    Create a working config
                                    How to add modules

                                    1 Reply Last reply Reply Quote 0
                                    • H Offline
                                      Henrik @Mykle1
                                      last edited by

                                      @Mykle1 Fantastic, thanks!

                                      Mykle1M 1 Reply Last reply Reply Quote 0
                                      • Mykle1M Offline
                                        Mykle1 Project Sponsor Module Developer @Henrik
                                        last edited by

                                        @Henrik

                                        You’re welcome, mate! Enjoy your mirror. :-)

                                        Peace!

                                        Create a working config
                                        How to add modules

                                        H 1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          Henrik @Mykle1
                                          last edited by

                                          @Mykle1 I fully am. :) Now the time has come to develop my first module.

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            djsunrise19
                                            last edited by

                                            I switched from raspberry to a mini-itx windows10 system, too. With my raspy system I had way too much performance issues. Thanks for your walkthrough, it works really well. But, modules like MMM-voice or Hello Lucy won’t work, am I right? That would be too bad :/.

                                            H 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 16
                                            • 17
                                            • 1 / 17
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy