Issue with Persistent Volume Mount Causing "Error: Command 'start' not found" When Deploying n8n

uhorizon-ai
HOBBY

9 days ago

Hello Railway Support Team,

I am experiencing a persistent issue when deploying the n8n workflow automation tool on Railway with a persistent volume mounted at /home/node/.n8n (or an alternative folder). Although the container builds successfully, upon starting the container, I receive the following error repeatedly:

text

No encryption key found - Auto-generating and saving to: /home/node/.n8n/config Error: Command "start" not found

I have thoroughly verified my configuration. In my railway.toml, I have specified the start command exactly as a string literal under the [deploy] section like this:

text

command = "n8n start"

My Dockerfile uses the official docker.n8n.io/n8nio/n8n:1.102.3 image with minimal environment variables and no overridden CMD entry, as Railway ignores CMD when a command or startCommand is specified.

When I deploy without mounting the persistent volume, everything works perfectly. However, mounting a persistent volume correctly (either /home/node/.n8n or an alternative such as /home/node/n8n-data) causes Railway to attempt to execute "start" only, thus failing with the error above.

I have tried:

  • Using command and startCommand in different sections of railway.toml

  • Mounting the volume in different paths and updating N8N_USER_FOLDER accordingly in the Dockerfile

  • Deleting and recreating fresh persistent volumes multiple times

The error persists, indicating that Railway might be mishandling the volume mount when executing the start command or there is a platform issue related to command execution with mounted volumes.

Could you please help me resolve this issue or provide guidance on how to properly configure the deployment so that n8n starts correctly with persistent storage on Railway?

I can provide any logs or configs you need for troubleshooting.

Thank you very much!

Solved$10 Bounty

2 Replies

Railway
BOT

9 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


9 days ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody β€’ 9 days ago


uhorizon-ai
HOBBY

9 days ago

I found the solution in another thread. It’s already fixed β€” we just need to add USER root at the end of the Dockerfile.


Status changed to Solved brody β€’ 9 days ago


Issue with Persistent Volume Mount Causing "Error: Command 'start' not found" When Deploying n8n - Railway Help Station