You can create a startup script to configure Open Canary to start automatically when the server is started or rebooted. To do this, we are going to create a Cron task that runs at boot time.
We are going to make the assumptions that you installed Open Canary as root user and you virtual environment (env) is located in /root. If that’s not the case, ust make the necessary adjustments in the file paths.
Once you have your Open Canary installed, working and tested, it’s time to set up an auto-run script.
First SSH into your server access and switch to root user.
sudo -i
Next, navigate to the /root folder. Use the mkdir command to create a folder named startup.
cd /root
mkdir startup
Inside the folder create a file named startup.sh using nano or your preferred editor.
cd startup
nano startup.sh
Edit the startup.sh file to include the following lines:
virtualenv env/
. env/bin/activate
/root/env/bin/opencanaryd –start –uid=nobody –gid=nogroup

Save the file, then create a Cron task:
crontab -e
Edit the Cron file using nano or your preferred editor and add the following line as depicted below:
@reboot sudo /root/startup/startup.sh

Save the file and exit.
When your server is started or rebooted, the Open Canary daemon will start.