/
Starting pico engine on system reboot

Starting pico engine on system reboot

The pico engine runs on a host system.

When using ssh to start it, one needs to take steps so that it won’t be stopped when that session ends. Some possibilities:

  • nohupa Linux system command

  • forever a npm module

When the host system reboots for whatever reason, steps have to be taken to ensure that the pico engine is started once the system has booted up sufficiently.

This can be done with systemd which is built-in to Linux. Here is a sample configuration file (named /etc/systemd/system/pico-engine.service):

[Unit] Description=pico-engine After=remote-fs.target [Service] User=USERNAME Environment="PICO_ENGINE_BASE_URL=http://HOSTNAME:PORT" ExecStart=/usr/local/bin/pico-engine Restart=always

Where:

  • USERNAME is the Linux user who/which will be running the pico engine

  • HOSTNAME is the externally visible hostname of this server machine

  • PORT is the port on which the pico engine listens

Notes:

  • The After item identifies the point in time, during the boot process, at which the pico engine is to be started. In this example, we are waiting until network-mounted filesystems are available.

  • Environment variables are set in the Environment item. Since PICO_ENGINE_HOME is not set, the default will be used. See Configuration for the environment variables used by the pico engine.

  • Finally, ExecStart is the full pathname to the executable pico engine.

 

Related content

Pico Engine Quickstart
Pico Engine Quickstart
More like this
Developer Tips for Pico Engine
Developer Tips for Pico Engine
More like this
Developer UI
Developer UI
More like this
Setting up a Manifold EC2 Instance (For Pico Lab Employees)
Setting up a Manifold EC2 Instance (For Pico Lab Employees)
More like this
Setting up Manifold
Setting up Manifold
More like this
Account management using the Root Pico
Account management using the Root Pico
More like this

Copyright Picolabs | Licensed under Creative Commons.