Read the statement by Michael Teeuw here.
troublems with systemd and serveronly
-
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 .
-
@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 -
@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 ?
-
@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.shit is trying to do npm start
change it to npm run server
or node serveronly -
Thanks! I will try that, seems smooth.
-
-
@dnj0104 awesome! thanks for the feedback
-