How to Deploy n8n on Laravel Forge Using PM2 and Nginx With Zero Downtime
Developers can run n8n, an open-source workflow automation tool, on Laravel Forge servers despite the platform being primarily built for PHP and Laravel applications. The process involves configuring the site as a Static HTML project and managing the Node.js app entirely through PM2, bypassing PHP-FPM. Three common issues must be addressed: pnpm permission errors during installation, a PM2 crash loop caused by improper wrapper usage, and 502 or 403 errors stemming from missing WebSocket support in Nginx. The pnpm errors are resolved by running package commands through npx, while the PM2 crash loop is fixed by pointing PM2 directly at Node and passing the n8n entry point as an argument. Nginx must also be configured to upgrade connections and support WebSockets to ensure the n8n UI streams execution data correctly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in