• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Change to Server only

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 1.3k Views 2 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.
  • P Offline
    Pijwarren
    last edited by May 20, 2020, 12:04 PM

    I have set up MM on an RPi4 and got my modules all up and running the way I want, but im wondering how can I switch this to be a server only set up?
    I installed using the curl install script, and every time I try and close the browser kiosk it reopens a few seconds later. Tried setting serverOnly to true in the config.js but it doesnt seem to have any effect. I’m guessing its because of pm2 but I’m a bit lost on how to stop this from happening. Please help :)

    S 1 Reply Last reply May 20, 2020, 12:31 PM Reply Quote 0
    • S Offline
      sdetweil @Pijwarren
      last edited by sdetweil May 20, 2020, 12:46 PM May 20, 2020, 12:31 PM

      @Pijwarren the serverOnly config setup was removed when they took out the run-start.sh
      you can add it back… by downloading the script from here https://github.com/sdetweil/MagicMirror_scripts

      cd ~/MagicMirror
      curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/run-start.sh >run-start.sh
      

      make sure its executable

      chmod +x ./run-start.sh
      

      then edit the package.json and change the start script from

          "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron
      

      to

      "start":"./run-start.sh",
      

      but the restart is because of pm2… its job is to keep MM running…

      so, open a command prompt and type

      pm2 stop 0

      once u use the run-start.sh script, u can change modes in config.js and still keep the pm2 auto running

      if u want to do it manually , you will have to do

      cd ~/MagicMirror
      node serveronly
      

      I built up run-start.sh to help make it easier for everyone to get their system up and running
      and provide this configuration capability, but the project didn’t want the responsibility to maintain
      the install, upgrade and run-start scripts

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      P 1 Reply Last reply May 20, 2020, 12:41 PM Reply Quote 1
      • P Offline
        Pijwarren @sdetweil
        last edited by May 20, 2020, 12:41 PM

        @sdetweil Cheers for the quick reply, I’ll have a run at the in the morning!

        S 1 Reply Last reply May 20, 2020, 12:49 PM Reply Quote 0
        • S Offline
          sdetweil @Pijwarren
          last edited by May 20, 2020, 12:49 PM

          @Pijwarren cool… I should add that they added a new run script to do this too

          npm run server
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            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