Skip to content
Langflow Docker deployment crashes on Railway (PORT + filesystem permissions)
jeremy-edwards2021
OP

10 months ago

I am attempting to deploy Langflow on Railway using a Dockerfile from my GitHub repository, but the service crashes at runtime with filesystem permission and port parsing errors.

Repository:

https://github.com/jeremy-edwards2021/langflow

Docker directory:

https://github.com/jeremy-edwards2021/langflow/tree/main/docker

Dockerfile used:

/docker/render.Dockerfile

The service builds successfully but crashes on startup.

I’d appreciate Railway’s help diagnosing this and advising exact changes (Dockerfile, start command, volume config, or Railway settings) so this can run correctly.

$10 Bounty

4 Replies

Railway
BOT

10 months 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 Railway • 10 months ago


10 months ago

railway crashes because it uses a dynamic port and a read-only filesystem. to fix it, add a volume in railway settings with the mount path /data and use this start command:

langflow run --host 0.0.0.0 --port $port --database-url sqlite:////data/langflow.db

this forces the app to the correct port and moves the database to a writable location. don't use brackets in the dockerfile cmd or the port variable won't load.


wubly

railway crashes because it uses a dynamic port and a read-only filesystem. to fix it, add a volume in railway settings with the mount path /data and use this start command: langflow run --host 0.0.0.0 --port $port --database-url sqlite:////data/langflow.db this forces the app to the correct port and moves the database to a writable location. don't use brackets in the dockerfile cmd or the port variable won't load.

g3yw

10 months ago

This helped me alot! thx


jeremy-edwards2021
OP

10 months ago

I am not sure where to go exactly - there is not a option to add volume


10 months ago

Hey, first of all, make sure that you've a volume attached to your service mounted at /app/data . If you don't know what a volume is, please check here: https://docs.railway.com/overview/the-basics#volumes.

Also, there's already a Langflow template that could be used: https://railway.com/deploy/JMXEWp. If that one in specific doesn't suite you, please check others at https://railway.com/templates


Welcome!

Sign in to your Railway account to join the conversation.

Loading...