8 hours ago
Could a Railway engineer clarify the platform contract for manual Restart (not Redeploy)? This is a general documentation question, not a request to change any service.
The deployments reference describes Restart as restarting the process inside the container:
https://docs.railway.com/deployments/reference#restart
The recovery guide describes the existing container:
https://docs.railway.com/guides/roll-back-bad-deploy#rollback-vs-redeploy-vs-restart
But the Agent SDK guide says ephemeral files disappear on deploy or restart:
https://docs.railway.com/guides/claude-agent-sdk-app
For a single-replica Docker-image service with an existing attached volume:
- Does manual Restart guarantee preservation of runtime-created files and runtime changes to the entrypoint in the writable root filesystem, or can it recreate/reset that filesystem?
- Does the old process tree completely exit before the entrypoint runs again, with the volume already mounted?
- What SIGTERM/grace/SIGKILL behavior applies specifically to manual Restart? Is RAILWAY_DEPLOYMENT_DRAINING_SECONDS relevant to that action?
- If preservation is not guaranteed, is there a supported way to stop application writers gracefully and copy an ephemeral directory to the existing volume before the old filesystem is discarded?
A successful individual restart test or reuse of the same image would not establish a preservation guarantee. Please distinguish guaranteed behavior from best effort, including failure/host-replacement paths. No project identifiers, logs, credentials or customer data are included. Thank you.
1 Replies
8 hours ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 8 hours ago
4 hours ago
No — don’t treat a manual Restart as preserving runtime files written outside a mounted Volume. Railway’s container filesystem is ephemeral, and runtime writes can disappear on the next restart or redeploy.
If the data must survive, attach a Volume and write to its mount path (for example /app/data). Also note that Volumes are mounted only at runtime, so files written during the build phase will not be stored in the Volume.
In short: container disk = temporary; mounted Volume = persistent storage.