MagicMirror Forum

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

    Multiple instances

    Tutorials
    3
    12
    889
    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.
    • E
      ELMAGO last edited by

      Good morning all

      can we run two maggic mirror instances with different modules on the same RPI? with of course a different port.

      thank you

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

        @elmago sure, I do this on my pi4 on different displays sometimes.

        install one, copy the mm folder tree to another name, MagicMirror2 and change the port and modules used…

        Sam

        Create a working config
        How to add modules

        E 1 Reply Last reply Reply Quote 1
        • E
          ELMAGO @sdetweil last edited by

          @sdetweil

          surely you have to rewrite the mm.sh file too?

          thank you

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

            @elmago yes that too…

            Sam

            Create a working config
            How to add modules

            E 2 Replies Last reply Reply Quote 0
            • E
              ELMAGO @sdetweil last edited by

              @sdetweil super thank you

              1 Reply Last reply Reply Quote 0
              • E
                ELMAGO @sdetweil last edited by

                @sdetweil

                Hello,

                I tried your solution, in absolute terms it works.

                Except that I did not think of a particularity.

                Indeed, I have a screen connected to the RPI which broadcasts the “basic” port 8080 maggic mirror.

                If I apply your policy, the screen will show me the port 8085 or 8080 instance every other time.

                How do I force this screen to open the port 8080 instance?

                Thanks in advance.

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

                  @elmago eh??

                  only ONE can be on screen at a time…

                  on my pi 4 I have 2 screens, 1 on each HDMI port, with a separate MM instance on each

                  which ever is started last will be on the single physical screen

                  Sam

                  Create a working config
                  How to add modules

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    ELMAGO @sdetweil last edited by

                    @sdetweil

                    Hello.

                    I must have expressed myself badly.
                    yes indeed there is only one on the screen but when I restart the RPI it displays one or the other.
                    if I understand your explanation correctly, I have to put in the file mm.sh last the instance that I want to display on the physical screen.

                    thank you

                    Tippon 1 Reply Last reply Reply Quote 0
                    • Tippon
                      Tippon @ELMAGO last edited by

                      @elmago What is it that you want to do exactly?

                      As @sdetweil says, only one instance can be on the screen at a time. Are you trying to run one on the screen and access another one remotely? If you are, this may help.

                      I’ve got two instances running, and they have different modules and a different port. The ‘standard’ MM instance uses the mm.sh that’s generated from @sdetweil’s script:

                      cd ./MagicMirror
                      DISPLAY=:0 npm start
                      

                      while my second instance runs as a server, and doesn’t display on the Pi’s screen. My second instance is in the MagicMirror2 folder and uses this script:

                      cd ./MagicMirror2
                      DISPLAY=:0 npm run server
                      

                      I use a separate .sh script, but someone more knowledgeable could probably combine them. The first section of the config.js lets you define which port you want MM to use, so I changed it on the one I wanted to view remotely.

                      var config = 
                      {
                        address: '0.0.0.0',
                        port: 12345,
                        ipWhitelist: [
                          '127.0.0.1',
                          '::ffff:127.0.0.1',
                          '::1',
                          '::ffff:192.168.0.1/120',
                          '192.168.0.1/24'
                        ],
                      
                      E 1 Reply Last reply Reply Quote 0
                      • E
                        ELMAGO @Tippon last edited by

                        @tippon

                        Hello

                        I did like you and it works perfectly.

                        Thank you so much.

                        S Tippon 2 Replies Last reply Reply Quote 2
                        • 1
                        • 2
                        • 1 / 2
                        • 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