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.

    MagicMirror install on proxmox LXC Container?

    Scheduled Pinned Locked Moved Solved Troubleshooting
    37 Posts 3 Posters 10.3k Views 3 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.
    • kusselinK Offline
      kusselin
      last edited by

      Sam, can you help me? What stopped the Server when i closed the putty Software?

      S 1 Reply Last reply Reply Quote 0
      • wishmaster270W Offline
        wishmaster270 Module Developer @kusselin
        last edited by

        @kusselin
        Hi,

        if your problem is only to keep the command running while/after you disconnected to the container you can use the “screen” command.
        It you should be installed with Ubuntu already. If not you can install it with

        sudo apt update && sudo apt install -y screen
        

        You then start a new screen with

        screen -S NAME
        

        while NAME is simply an alias and could be something like “mm”.

        After this you can start the mirror with

        npm run server
        

        And you can leave the screen with the keyboard combination

        CRTL+ad
        

        The screen then keeps running. If you want the resume to the screen you can use

        screen -r NAME
        
        kusselinK 3 Replies Last reply Reply Quote 0
        • S Offline
          sdetweil @kusselin
          last edited by

          @kusselin when u disconnect a terminal session any app still running is terminated…

          u can spinit off in the background with & at the end of the command

          npm run server &

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          wishmaster270W 1 Reply Last reply Reply Quote 0
          • wishmaster270W Offline
            wishmaster270 Module Developer @sdetweil
            last edited by

            @sdetweil You are right in running apps with & in the background but if you disconnect the ssh session all background commands will be disconnected as well.
            Either screen or a command like nohup needs to be used to keep the command running.

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

              @wishmaster270 never had one disconnected w &

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • kusselinK Offline
                kusselin @wishmaster270
                last edited by

                @wishmaster270 said in MagicMirror install on proxmox LXC Container?:

                @kusselin
                Hi,

                if your problem is only to keep the command running while/after you disconnected to the container you can use the “screen” command.
                It you should be installed with Ubuntu already. If not you can install it with

                sudo apt update && sudo apt install -y screen
                

                You then start a new screen with

                screen -S NAME
                

                while NAME is simply an alias and could be something like “mm”.

                After this you can start the mirror with

                npm run server
                

                And you can leave the screen with the keyboard combination

                CRTL+ad
                

                The screen then keeps running. If you want the resume to the screen you can use

                screen -r NAME
                

                Thanks, so it is going :-)

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

                  @kusselin and typically you would setup the container to run MM inside without user intervention… so none of those commands would be needed

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  kusselinK 1 Reply Last reply Reply Quote 0
                  • kusselinK Offline
                    kusselin @wishmaster270
                    last edited by

                    @wishmaster270 said in MagicMirror install on proxmox LXC Container?:

                    npm run server

                    have today what changed at the mirror udn had to make reboot… now it no longer works :-(

                    After I executed the commands like :

                    screen -S MM (MM is the Name)

                    then

                    npm run server

                    and when i close the terminal the MMis stopping:-(

                    and the same when i going to cd /MagicMirror

                    and then i take this:

                    npm run server &

                    when i close the terminal MM is stopping…

                    what is my problem guys?

                    1 Reply Last reply Reply Quote 0
                    • kusselinK Offline
                      kusselin @sdetweil
                      last edited by

                      @sdetweil said in MagicMirror install on proxmox LXC Container?:

                      @kusselin and typically you would setup the container to run MM inside without user intervention… so none of those commands would be needed

                      Hi sam, unfortunately I have not yet understood why the server always stops when closing putty???

                      With the command npm run server I start the server… why does the container stop again?

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

                        @kusselin because that is the way it works. when the terminal window closes, any running app also is forced closed. it’s a security thing

                        during development I would not close the window. after you are happy, I would make the container auto start mm as part of it’s startup.
                        a containers design is to run ONE app.

                        I do not know how I do this w lxc containers
                        w docker, u add a property to the Dockerfile to tell what app to start

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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