a year ago
Hello! I have my sideproject that I wanted to host on Railway. But it keep getting an error, I would like some help to host this by myself.
The error I'm getting is on my page "Server Error Called by Client"
I've configured everything on Railway according to the docs
90 Replies
a year ago
Hi! this error you are getting is in the convex dashboard or in your site_armor service?
a year ago
and how can you be sure it is related to the convex instance?
a year ago
Can you access the convex dashboard and try doing some queries?
a year ago
any error logs on the Convex service?
a year ago
iirc when you setup Convex with the CLI it shows an option to use a self hosted deployment
a year ago
but seems like it's somehow connecting to Convex from your screenshot, hopefully
a year ago
oof
a year ago
That was going to be my next question 😅
a year ago
There's no referenced env vars in your service
a year ago
according to that image
a year ago
add that command to the pre deploy step of your service and it should work
a year ago
you can find that by going to your service settings and then look for pre deploy step, should be below the start command
a year ago
the nextjs one
a year ago
also, I would recommend using reference variables for your service as Medim said.
something like this should work:
NEXT_PUBLIC_CONVEX_URL=https://${{"Convex Backend".RAILWAY_PUBLIC_DOMAIN}}a year ago
but you're hardcoding it instead of using reference variables
a year ago
basically Railway will pull up your URL automatically from your service
a year ago
yep, you'll need a deploy key
a year ago
prefix it with https://
a year ago
it's somewhere in the Convex dashboard
a year ago
I don't remember that variable already including https:// so I would check it before hand
a year ago
oh then I would follow what Convex is saying to do, unfortunately I'm not that familiar with the self hosted option
a year ago
sorry, it's called pre-deploy step

a year ago
no, you put npx convex deploy as you're not in dev anymore
a year ago
hmm, can you send full logs?
a year ago
weird that it didn't find the .next build directory
a year ago
hmmm
a year ago
it's using the cloud one
a year ago
no?
a year ago
great but still weird
a year ago
are you sure that you did set on the pre-deploy step and not on the custom build command?
a year ago
oh that's where it failed
a year ago
hmmm maybe Convex somehow needs to know the build command
a year ago
anyway, nice to know it's working!
a year ago









