I like to keep my n8n version updated for all the new feature. I dont have much there just under 50 workflows. However, my community nodes get deleted after every update. I have self hosted at railway.app. I think it happens due to not attaching a volume at me primary instance? If yes, then can anyone tell me at what path should I mount it. Should i mount it at both Primary and Worker?
Yes, you need to attach a persistent volume on your Primary instance at the n8n user folder, which by default is at /home/node/.n8n.
Since workflows are saved in your database, they persist through updates. Community nodes, on the other hand, are stored on the file system (typically in /home/node/.n8n), so without a persistent volume, they get overwritten during updates.
As for the Worker, I think they don’t typically require a volume mount, unless you also expect it to handle persistent data.
I think the Worker usually acts as a stateless runner, so mounting wouldn’t be necessary. But I could be wrong need someone else to confirm this.
If my reply answers your question, please remember to mark it as a solution.
Sorry for the late reply, I tried that before but it didnt worked. Strangely something else worked. When i added it to path “/n8n/volume” worked. I copied it from another railway template which is not so popular. I couldnt find any documentation regarding it either. Maybe its specific to how the template was created.
I’m using the Railway N8N (w/ workers) template ( https://railway.com/template/r2SNX_) and tried adding a volume to the Primary service with the path /home/node/.n8n, but it didn’t work for me either.
I noticed my N8N primary service didn’t have a N8N_USER_FOLDER variable, so I tried setting that to /home/node/.n8n, but it still didn’t work.
Is there an environment variable I need to add to point to the new volume for these community nodes? I read something about N8N_CUSTOM_EXTENSIONS but I’m not sure if that is applicable.
@Ahmad_Rajput - I tried adding the volume with the path /n8n/volume but it also failed for me. Did you have set any other variables to get that working?
I’m also having issues with community nodes after updates. My problem isn’t that the community nodes get deleted, as much as them getting disabled after an update, and need to be re-installed, meaning any workflows that rely on them fail until I re-install them. But, it seeming like a parallel problem.
Would love to understand the solution to it. I’m also on Railway.