Field notes ·
Passenger on CloudLinux: three failures worth writing down
Deploying a Node application under Phusion Passenger on a CloudLinux shared server is documented as “point PassengerAppRoot at the app and go”. In practice three failures cost us real debugging hours. Writing them down so they cost nothing next time.
1. Passenger does not inherit your environment
The app started locally, died under Passenger with a validation error on a config value that was “obviously” set. Passenger launches the process with a clean environment: .env must be loaded by your own entry point. One extra trap inside the trap: a naive .env parser keeps trailing comments, so REDIS_DB=1 # test arrives as the string "1 # test" and fails numeric validation. Strip comments in the parser, not in your habits.
2. The error log you need is outside your jail
Under CageFS the Passenger log lives outside the account’s filesystem. The browser shows a digest string, the log you are allowed to read shows nothing. The fix is unglamorous: duplicate stderr into a file inside the app directory from the entry point. Every production incident since has been diagnosed from that file.
3. nohup dies with the SSH session
A background build started over SSH with nohup ... & terminates when the session closes — silently, leaving an empty log. The only form that survives is a detached setsid with all three streams redirected. Check progress by polling the log for an explicit exit marker, not with pgrep: the pattern happily matches your own SSH command.
None of this is exotic. All of it is invisible until production. That is the definition of a field note.