Ubuntu 14.04 autostartup
I am trying to configure an autostartup for my nodebb when a reboot has been done, I've tried everything that is posted on https://community.nodebb.org/topic/4693/is-it-possible-to-auto-start-nodebb-in-the-startup-of-the-server/3
plus several other things I found online.
Anyone has any ideas on how to make this work? It doesn't seem to autostart on startup even after having the same things on sysv-rc-conf with e.g nginx that has autostartup.
Easiest way is to install supervisor and create a new config file in /etc/supervisor/conf.d.
Lets name ours nodebb.conf:
command = node /PATH/TO/NODEBB/app.js
directory = /PATH/TO/NODEBB/
user = YOURUSERNAME (You can also use root, otherwise it is extremely insecure!!!)
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/nodebb.log
stderr_logfile = /var/log/supervisor/nodebb_err.log
conf.d? How cute :trollface:
Here's a config with Upstart:
start on startup stop on runlevel  respawn env HOME=/home/someuser script cd /home/someuser/nodebb node loader.js --no-silent --no-daemon end script
--no-daemonare required for upstart to function properly, as it relies on the process to not be daemonised. The former flag tells NodeBB to not use the log, and send everything to stdout, so upstart can catch it.
Log file by default:
@julian I've never been able to get upstart to work
thanks for that boys I worked it out