Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Change to Server only

    Troubleshooting
    2
    4
    30
    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
      Pijwarren last edited by

      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 Reply Quote 0
      • S
        sdetweil @Pijwarren last edited by sdetweil

        @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

        P 1 Reply Last reply Reply Quote 1
        • P
          Pijwarren @sdetweil last edited by

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

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @Pijwarren last edited by

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

            npm run server
            
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy