Read the statement by Michael Teeuw here.
Auto start does not work
-
Hello,
I have a little problem. I use PM2 to do an auto start but it does not work. I followed the tutorial: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror
I need to manually start: pm2 start mm.sh
Thank you for your help. -
Here you have the solution!
Good Luck!
-
Hi
I tried this procedure but it did not work. I still have the same automatic restart problem.
Thank you. -
See my previous post here: https://forum.magicmirror.builders/topic/1094/pm2-mm2-not-starting-on-start-up/20
This method may help you:
Set
pm2to startup usingsystemdwith userpiand home directory/home/pisudo pm2 startup systemd -u pi --hp /home/piAnd then use
pm2 saveto save the state. -
Hi
I followed instructions now it works and I figured out how it works.
THank you so much -
I installed Nodejs 9.8.0 on my raspberry Pi 3 model B before run the installation script for raspberry.
MagicMirror does not autostart until I found a fix on internet:
sudo env PATH=$PATH:/usr/local/bin pm2 startup systemd -u pi --hp /home/pi -
@greda, I was able to figure a solution I’d sort of seen elsewhere to this exact issue, as I was having the same problem. Created an account to document the solution as this is the first thread that comes up when searching for a solution.
On a completely clean installation, and copy/pasting the terminal commands to install, I could get MM running just fine using pm2, but it would not auto-start. As it turns out, I missed a part of the auto-start instructions, and this caused the problem. Here’s my solution:
- Look for the step “Starting PM2 on Boot”
- Command is “pm2 startup”
- There’s an instruction line there that’s easy to miss, which is this: "PM2 will now show you a command you need to execute."
- IN THE TERMINAL, there is an output to the “pm2 startup” command when it’s done running saying that you need to copy and then re-paste to sent environmental variables
- Copy/paste the output text from “pm2 startup” out of, then back into, Terminal
- Proceed with the rest of the auto-start instructions as documented
This cleanly and easily solved the issue for me - it’s an easy step in the instructions to miss as it’s the only one where you need to do something with the output of the setup commands.
-
@ntmatter you can also run the fixuppm2 script from my automation library listed as alternative in the mm doc
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