Anonymous
HOBBYOP
2 months ago
Hi Railway team,
I'm running SurrealDB (surrealdb/surrealdb:latest) on Railway using a scratch-based Docker image. The service works perfectly with the memory backend, but I'm unable to use a persistent volume due to a permission error.
Setup:
- Service image:
surrealdb/surrealdb:latest(scratch-based, no shell) - Volume mount path:
/data - Custom start command:
/surreal start --bind 0.0.0.0:8000 --user --pass --allow-all surrealkv:/data/brainx.db
Error:
ERROR surrealdb_server::cli: There was a problem with the datastore: IO error: Permission denied (os error 13)I tried:
- Mount paths
/mydata,/data,/tmp/mydata - Storage engines
surrealkv,rocksdb,file:// - Adding a pre-deploy
chmod 777 /data— but the scratch image has no shell, so pre-deploy commands fail - Deleting and recreating the volume
All combinations result in the same permission denied error. The volume appears to be mounted as root, but the SurrealDB process runs as a different user with no write access.
Question: Is there a way to configure the volume mount permissions for scratch-based images on Railway? Or is there a recommended workaround for running SurrealDB with persistent storage?
Thank you!
0 Replies