1. Learn Where is the n8n

 which n8n 
 /usr/bin/n8n 

 

2. Create Config File

 nano /root/ecosystem.config.js 

 


module.exports = {
     apps: [{
          name: 'n8n',
          script: '/root/.nvm/versions/node/v20.19.2/bin/n8n',
          env: {
               WEBHOOK_URL: 'https://your-domain',
               WEBHOOK_TUNNEL_URL: 'https://your-domain',
               N8N_HOST: '0.0.0.0',
               N8N_PORT: '5678',
               N8N_PROTOCOL: 'https'
                 }
          }]
};

 

For Save Changes

Ctrl + O
Enter
Ctrl + X

 

3. Save Changes and Reboot

 pm2 start /root/ecosystem.config.js 
 pm2 save 
 pm2 startup 
 pm2 save 
 reboot 

		

By using our website, you accept our Cookie Policy.