N8n how many instance

Hi, how many instances of n8n can I install on my server with which command and how to uninstall them.
Debian 10, apache, php 7.3, nodejs 14
Thanks for your attention

Hey @marconte!

You can have a single instance and scale it use multiple workers. Here is the doc for that: Scaling n8n | Docs

The number of instances depends on the computing recourses your server has. If you host them using Docker, than it becomes easy to uninstall them. I haven’t tried running multiple instances via npm on the same server.

1 Like

Tanks, but how I uninstall one of this for example in directory /home/myistance1 ?
I explain better: I installed with command npm -g install n8n in the root folder, then I installed again with command npm install --prefix / home / myfirst n8n and then again npm install --prefix / home / mysecond. then with pm2 start I see 3 ids but I do not enter any of the three sites what happens?

Have sadly no experience with npm install --prefix at all. I would probably simply go in a folder and just run npm install n8n. It then installs it directly in that folder.

To make sure it also saves the data in different folders you should then also set the variable N8N_USER_FOLDER. Like for example export N8N_USER_FOLDER=/home/jim/n8n. Best point it to a subfolder in the folder you did install n8n into. Then if you ever want to uninstall n8n and want to get rid of all the data you can simply delete that one folder.

After you did all of that, can you then start n8n either via ./node_modules/.bin/n8n or npx n8n.

Regarding pm2 it is best to check out this topic as I do sadly not have any experience with it at all myself: