
Running as root (the default) is a bad idea. # stop the service gracefully if the runlevel changes to 'reboot' # only start this service after the httpd user process has started I started by using a very simple script, like the one below. You can be as simple or as comprehensive as you like. I called mine 'foobar' because I'm inventive like that, so the file is /etc/init/nf. You name the script 'nf', where 'servicename' is whatever you want it to be called. Upstart scripts live in /etc/init by default, and that's also the place they live on your Synology NAS. So, here's how I got my node.js application running on startup by using Upstart. It's most prevalent on Debian and derivatives (notably Ubuntu). So I decided to have a look at starting my project as a Linux service.Īfter doing a lot of research into how Synology does services, and a few failed attempts at init scripts, I found that Synology DSM (since version 5 perhaps) bundles Upstart, which is a neat little tool to deal with services on Linux. My project has a 'That's hardly useful when I'm away from home, or on a different PC. In the meantime, you can start your project when you SSH into the NAS. Synology has a node.js package but that just installs the tools - it has no 'container' or any other support to drop files and have it run automagically. The other day I created a little node.js project to keep track of some finances. Synology NAS - How to make a program run at startup
