Magic mirror serving multiple clients
I have a server running a Debian virtual machine that I am currently running in server only mode. I have 3 devices connecting to this through the browser, but obviously it would be nice to have different displays on each mirror. How can I configure the server to serve multiple configurations, presumably a different port for each instance. I need some help configuring the client to have at least 3 different connections open for my various clients. Is this possible, has anyone had experience with this before?
@zack949 I think you’ll need to run three separate instances, but should be straightforward. You’ll want three installs (e.g.
~/MagicMirror2, etc.). Suggest you install/build MM, then just copy the directory twice with all the dependencies. You’ll need to set each up on its own port to avoid collisions.
Interesting idea to permit multiple server instances from a single install, but I think it would become confusing for many. The single server/client does satisfy the vast majority of use cases atm.
I will look into that, is there a place where I can find a list of available commands for server controls. For example how do I stop the server once I start it? I do not have much in the way of experience for this and would appreciate any help you can give me.
@zack949, could you report back after you got it solved? I think this is an interesting use case, which might be relevant for more people.
If you start your mirror with
pm2as suggested in documentation, then you can use commands like
pm2 stop mm,
pm2 restart mm,
pm2 start mmto control your mirror.
I would make three different start scripts, e.g.
mm3.sh, where each one starts one specific instance. This is in line with @ninjabreadman’s suggestion to have three install directories.
What @ninjabreadman suggested worked wonderfully and could act as a long term solution. A gui could make the whole process of managing instances easier.
@zack949 I suggest you register
pm2(per manual install guide). I would then also create a
pm2 start mm1 && pm2 start mm2 && pm2 start mm3and likewise for
stop. You might even create an
mm.shthat just sends the following command (e.g.
mm.sh start) for all three MM instances managed by
pm2, but that will require some bash scripting.
Is there currently any development to make a GUI for better visualizing config.js changes?
@zack949 Not of which I’m aware. Most dev effort is spent on the display/features end. It would also have to track the config options for dozens of regularly changing modules, which presents its own challenges.
I recommend using a syntax-highlighting code editor, like (the free) Atom. It will help with closing brackets/braces, and using the proper quotes. You can also run “Atom Beautify” in “Packages” regularly to keep formatting for legibility.
@strawberry 3.141 didn’t you help someone accomplish this? I would LOVE to do this so my big mirror and bathroom mirror are both running the same thing…