webhooks github to strapi

Posted May 28, 2021 1.2k views
NginxDigitalOcean DropletsGitHub ActionsStrapi


I’ve been following a tutorial for deploying Strapi on Digital Ocean and I’ve got to the point of trying to make the GitHub action:

I have been through it all, and tested the webhook which appears to be working, no errors.

I then run the following:

sudo systemctl enable webhook.service
sudo systemctl start webhook

and all good, or no errors.

but when I check the status:

sudo systemctl status webhook

I get the following error:

● webhook.service - Github webhook
     Loaded: loaded (/etc/systemd/system/webhook.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-05-28 11:42:40 UTC; 4s ago
    Process: 9113 ExecStart=/usr/bin/nodejs /home/jordan/NodeWebhooks/webhook.js (code=exited, status=203/EXEC)
   Main PID: 9113 (code=exited, status=203/EXEC)

May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Scheduled restart job, restart counter is at 5.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: Stopped Github webhook.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Start request repeated too quickly.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: webhook.service: Failed with result 'exit-code'.
May 28 11:42:40 strapi-cms-mac-pro systemd[1]: Failed to start Github webhook.

I have tried a few different things and made some changes but nothing seems to change the “active” status.

My webhook.js and /etc/systemd/system/webhook.service are the same as in the tutorial, except the name and path. I am using node and not nodejs as I am running Ubuntu 21.04 x64, my GitHub repo is private.

I thought maybe that could be an issue? I did not git clone, and would need to setup ssh between them I guess.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi there @yedroj92,

It seems like that the main process is failing:

    Process: 9113 ExecStart=/usr/bin/nodejs /home/jordan/NodeWebhooks/webhook.js (code=exited, status=203/EXEC)

If you run the command manually does it work as well or does it also crash?

I could suggest checking the syslogs logs to see why the Node JS process is crashing.


I just solved this issue today. The logs like @bobbyiliev said to check wasn’t able to find nodejs. Since we are using node and not nodejs we simply edit the webhook.service file at ExecStart=

Description=Github webhook

ExecStart=/usr/bin/node /home/your-name/NodeWebHooks/webhook.js