a year ago
Subject:
hey there,
I'm experiencing a data persistence problem with my Node-RED deployment on Railway. Despite configuring a volume, my data is not persisting after redeployments.
Here are the details:
1. Project Setup:
- Service: Node-RED
- Dockerfile: Using official nodered/node-red base image
- Volume mount path: /data
2. Current Configuration:
- Volume created and attached to the service via Railway UI
- Mount path set to /data in Railway configuration
- Dockerfile WORKDIR set to /data
- CMD in Dockerfile: ["npm", "start", "--", "--userDir", "/data"]
3. Issue Description:
After redeployment, all previously saved Node-RED flows and configurations are lost. The /data directory appears to be empty or not persisting as expected.
4. Steps Taken:
- Verified volume creation and attachment in Railway UI
- Confirmed mount path is set to /data
- Checked for any conflicting environment variables
- Reviewed Dockerfile for correct data directory usage
- Attempted multiple deployments to test persistence
5. Expected Behavior:
Node-RED data (flows, configurations) should persist in the /data directory between deployments and restarts.
6. Actual Behavior:
Data is lost after each redeployment, suggesting the volume is not being properly mounted or persisted.
7. Questions:
- Is there a known issue with volume persistence for Node-RED deployments?
- Are there any specific configurations required for Node-RED to work correctly with Railway volumes?
- Can you verify if the volume is being correctly mounted and persisted on your end?
- Are there any logs or diagnostics I can provide to help troubleshoot this issue?
All the best 
3 Replies
a year ago
thanks @brody!
but does the workdir is not the place where node-red persists data?