9 months 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
9 months ago
Hi! this error you are getting is in the convex dashboard or in your site_armor service?
when I open it, my screen went white and this error popped in the console
9 months ago
and how can you be sure it is related to the convex instance?
9 months ago
Can you access the convex dashboard and try doing some queries?
9 months ago
any error logs on the Convex service?
9 months ago
iirc when you setup Convex with the CLI it shows an option to use a self hosted deployment
9 months ago
but seems like it's somehow connecting to Convex from your screenshot, hopefully
9 months ago
oof
9 months ago
That was going to be my next question 😅
9 months ago
There's no referenced env vars in your service
9 months ago
according to that image
9 months ago
add that command to the pre deploy step of your service and it should work
9 months ago
you can find that by going to your service settings and then look for pre deploy step, should be below the start command
9 months ago
the nextjs one
9 months 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}}9 months ago
but you're hardcoding it instead of using reference variables
9 months ago
basically Railway will pull up your URL automatically from your service
9 months ago
yep, you'll need a deploy key
9 months ago
prefix it with https://
9 months ago
it's somewhere in the Convex dashboard
9 months ago
I don't remember that variable already including https:// so I would check it before hand
9 months ago
oh then I would follow what Convex is saying to do, unfortunately I'm not that familiar with the self hosted option
9 months ago
sorry, it's called pre-deploy step

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









