• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Question Programmatically restart Node applications on Plesk

Hunter75

New Pleskian
We are using Plesk to host our production services.

Basically, when I deploy the application to Plesk using Git, I need to press Restart application within the Node page on Plesk GUI and that works well.

But in some cases I need to do that pragmatically, I need to automatically restart Node service. Does Plesk offer such functionality? Maybe, some kind of API that listens to calls or else within Linux shell itself.
 
Hello, @futureweb . There is no native way to restart the application through the command line. The workaround I can suggest is to try the following:

  1. Connect to the server via SSH

  2. Create the restart.txt file at the application's tmp folder:

    sudo -u jdoe -g psacln touch /var/www/vhosts/example.com/tmp/restart.txt

    * jdoe is to be replaced with the subscription's system user. Can be checked at (Domains > example.com > Web Hosting Access)

    Meanwhile, the path should be checked on your end as it depends on the application's location.
 
Back
Top
OSZAR »