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.

    troublems with systemd and serveronly

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 827 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.
    • D Offline
      dnj0104
      last edited by

      Hello I have setup my magicmirror (latest) as follows

      Virtual machine on a dell optiplex running magicmirror serveronly

      Raspberry pi running chromium-browser in kiosk pointing at VM

      BUT when running npm run serveronly on VM my mm-client (raspberrrypi fetch and shows magicmirror interface from server)

      then I stop npm serveronly and make a systemd script as the one in magicmirror documents.

      [Unit]
      Description=MagicMirror
      After=network.target
      StartLimitIntervalSec=0
      
      [Service]
      Type=simple
      Restart=always
      RestartSec=1
      User=sentinel
      WorkingDirectory=/home/sentinel/MagicMirror/
      ExecStart=/usr/bin/node /home/sentinel/MagicMirror/serveronly
      
      [Install]
      WantedBy=multi-user.target
      

      and systemctl start and then status magicmirror.service result in following

      ● magicmirror.service - MagicMirror
           Loaded: loaded (/etc/systemd/system/magicmirror.service; enabled; vendor preset: enabled)
           Active: active (running) since Sun 2024-04-21 18:36:18 CEST; 1ms ago
         Main PID: 1016038 ((node))
            Tasks: 1 (limit: 8826)
           Memory: 256.0K
              CPU: 224us
           CGroup: /system.slice/magicmirror.service
                   └─1016038 (node)
      
      Apr 21 18:36:18 MagicMirrorVm systemd[1]: Started MagicMirror.
      

      but after this action my mm-client (raspberry pi) cant connect to server anymore I get “this site cant be reached”

      How do I solve this, to me it seems that mm-serveronly does not start but I’m not sure .

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @dnj0104
        last edited by

        @dnj0104 is the vm with desktop.or only text mode?

        I hate systemd setup, it is SO sensitive to os details.

        that is why i use pm2 ( node process manager) in my Installation script.

        try my script fixuppm2
        see
        https://github.com/sdetweil/MagicMirror_scripts

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          dnj0104 @sdetweil
          last edited by

          @sdetweil the VM has only terminal interface I access it with ssh

          oo cool script. shall i run it inside my MagicMirror directory or outside in my user directory or in my root folder ?

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @dnj0104
            last edited by sdetweil

            @dnj0104 script doesn’t care where it is run. assumes ~/MagicMirror

            you would delete the systemd stuff.

            I have not tried the script on cli mode only

            it uses the script at
            ~,/MagicMirror/installers/mm.sh

            it is trying to do npm start
            change it to npm run server
            or node serveronly

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              dnj0104 @sdetweil
              last edited by

              @sdetweil

              Thanks! I will try that, seems smooth.

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

                @sdetweil

                It worked with the pm2 way ! thanks

                In mm.sh I wrote npm run server and everything is up n runnin again .

                Thanks again !

                S 1 Reply Last reply Reply Quote 1
                • S Do not disturb
                  sdetweil @dnj0104
                  last edited by

                  @dnj0104 awesome! thanks for the feedback

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S sdetweil has marked this topic as solved on

                  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 / 1
                  • 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