I wanted to update you on the success of installing n8n on cloudways, its working now.
It was quite a nightmare to get resolved. I had a technical person assist me but there were many issues and needed multiple support requests with cloudways to assist.
I wanted to thank everybody who assisted here and especially Anderson_Rogerio_Gab who has assisted me over PM about this alot as well.
I want to give some info here for others that want to do this install successfully and the problems that may need to be addressed
So the basic process is like so:
You need to install a basic php application on cloudways to get started with.
You then need to upgrade Node and and NPM on the new application instance itself, not on your main master credentials. Ask support to do this for you, upgrade to latest versions.
You then need to try install n8n with ‘npm install n8n’ without -g because cloudways does not provide root access or the correct permissions for some things.
But the install wont work because it needs to create 2 folders in your application root and even your cloudways master credentials dont allow that level of access.
So you need to get support to create 2 directories (.n8n and .pm2) for you here:
Then support needs to give permissions to the credentials of that application instance to access or execute files in those directories (i think they did that at least)
Once that is done you can actually install n8n with ‘npm install n8n’ successfully. But then there is more:
- Here is a good resource on how to install a node app on cloudways: How to host a nodejs app on Cloudways - The Cloud Keeper
Basically you cannot access certain ports on cloudways so the solution is that you need to reroute the traffic from default port (i.e from 80 or 443) to port on which your app is running (5678 for n8n) using Apache mod_proxy module.
So your htaccess looks like this:
RewriteRule ^(.*)?$ http://127.0.0.1:5678/$1 [P,L]
The problem is cloudways does not have have the Apache mod_proxy module enabled so you need to get support to enable it for you, then it will work.
So I think that is all the important factors. It seems like n8n runs now but I need to still use it and see if there are any problems in operation. If there is any way to test this the fastest please let me know.
It is awesome that I can now use my existing wordpress website hosting server which is grossly underutilised to host n8n as well instead of needing to pay for a new server.
Note: Everybody should be hosting with cloudways anyways (vultr high frequency or DO) because the website speed/performance is amazing, the support is instant and incredible and the price is great :-).
Let me know if you have any questions.