How to get Phusion Passenger logs for Node.js or Flask apps on Plesk 18

When using Phusion Passenger on Plesk to serve Node.js (or Flask) applications, logs are not displayed in the browser, and do not show up in the related domain log stream. Here is how to get them for Plesk 18 on Alma Linux 8.9.

  1. Login to the server through SSH.
  2. Type tail -f /var/log/passenger/passenger.log

From there, new logs will appear in the stream. If you trigger the error by accessing the URL of the app using a web browser, you will see the error message and logs show up in your terminal.

App 845620 output: Returned final results with 1 lines.
App 845620 output: Connection established.

When errors occur, a stack trace will be shown, and will end with something like that :

Error ID: c20c446f
Error details saved to: /tmp/passenger-error-Px91tC.html

If you download the HTML file locally and open it with a web browser, we will have access to a more detailed debug report.