Starting at Boot
If you are using Docker, the recommended startup command includes the
--restart on-failure option, which is sufficient to have Docker restart the container at boot time and any time the executable exits with an error. This should be sufficient on its own. If you are using
docker-compose, the restart policy is included in the recommended compose file. See the Installation section for the startup command and reference compose file.
Linux users using the "bare metal" install method will need to know whether their host system supports
systemd or init-scripts. The former is pretty much ubiquitous these days, and the default on most distributions. If you're not sure, try doing
ps -p 1.
If your system uses
systemd, you can copy-pasta and modify the reference service file. Pay special attention to the
ExecStart values. For
ExecStart, make sure the path to your
nodejs executable (i.e.
node) is correct.
If you're using a Raspberry Pi running Raspian Buster, the install script
tools/rpi-install.sh can be run any time to give you the option of installing Reactor under systemd without hand-editing any system configuration files.
[Unit] Description=Multi System Reactor After=network.target [Service] Type=simple User=pi Environment=NODE_PATH=/home/pi/Documents/reactor WorkingDirectory=/home/pi/Documents/reactor ExecStart=/home/pi/.local/lib/nodejs/node-v14.15.4-linux-armv7l/bin/node app -p Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target
Please contribute a recipe!
See the Windows bare-metal install instructions for instructions on running Reactor as a Window service.