Abhishek
Abhishek11mo ago

Alternate hosting options ?

Hi, I am pretty noob with infra part of software engineering. But I wanted to ask apart from vercel and netlify can convex support hosting on other platforms like railway, render for nextjs and convex app ? thanks
20 Replies
erquhart
erquhart10mo ago
It looks like Railway attempts to automatically detect your build command, somewhat similar to Netlify and Vercel. If you have a next project using convex, you can manually update the command in Railway to use the convex build command that you would use on other services. Docs: https://docs.railway.app/reference/build-and-start-commands Render seems to require the build command to be set at project creation time, and should be able to use the standard convex build command that wraps your next build command. Docs: https://docs.render.com/deploy-nextjs-app
Railway Docs
Build and Start Commands | Railway Docs
Documentation for Railway
Deploy a Next.js App | Render Docs
Deploy a Next.js App | Render Docs
Deploy a Next.js application on Render in just a few clicks. Served over a lightning-fast global CDN with fully managed TLS certificates out of the box.
Abhishek
AbhishekOP10mo ago
Thank you @erquhart I will give it a try and share the result So that in future it can help evveryone @erquhart what about aws ? is it possible
erquhart
erquhart10mo ago
Depends on how you're using AWS - what service(s) are you thinking of?
Abhishek
AbhishekOP10mo ago
Amplify or maybe someting like doing next build and through docker file
erquhart
erquhart10mo ago
I imagine amplify takes the same kind of build command as the other services, even if it's defined in a docker file. Should work there, too.
Michal Srb
Michal Srb10mo ago
Github Pages are also a free option for hosting
Abhishek
AbhishekOP10mo ago
I am trying to work with deployment on vercel and getting this error
Running "npx convex deploy --cmd 'npm run build'"
401 Unauthorized: TokenInvalid: Token failed validation: InvalidComponents
Authenticate with `npx convex dev`
Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1
Running "npx convex deploy --cmd 'npm run build'"
401 Unauthorized: TokenInvalid: Token failed validation: InvalidComponents
Authenticate with `npx convex dev`
Error: Command "npx convex deploy --cmd 'npm run build'" exited with 1
I have already pasted the npx convex deploy --cmd 'npm run build' command and CONVEX_DEPLOY_KEY in env still
Abhishek
AbhishekOP10mo ago
also in documentation you see the command is
npx convex deploy --cmd 'npm run build'
npx convex deploy --cmd 'npm run build'
but in image there is equal to I have tried both the command still the err is coming
No description
ballingt
ballingt10mo ago
Without revealing your token (so don't copy and paste it here), what's the general form of your CONVEX_DEPLOY_KEY?
Michal Srb
Michal Srb10mo ago
And be sure you are on the latest version of Convex (1.9.1)
ballingt
ballingt10mo ago
CONVEX_DEPLOY_KEY should look like prod:happy-otter-123|0123456789abcdef... (continues for 98 characters)
Abhishek
AbhishekOP10mo ago
Thanks @ballingt I was using dev: one So quick doubt if i want to test my app while its deployed then i have to use prod setting ? i mean prod token ?
Michal Srb
Michal Srb10mo ago
Deployment with dev key should work fine. Are you on 1.9.1?
Abhishek
AbhishekOP10mo ago
Yup
Abhishek
AbhishekOP10mo ago
No description
Michal Srb
Michal Srb10mo ago
Thanks, I'll have a look Hey @Abhishek, I cannot reproduce the issue, using 1.9.1 and a dev deployment deploy key.
Abhishek
AbhishekOP10mo ago
@Michal Srb I will try reproducing it and if i succeed will attach video or logs if you need Update : Successfully Deployed on both railway and render
erquhart
erquhart10mo ago
Nice! Any notes for future searchers or was it pretty straightforward
Abhishek
AbhishekOP10mo ago
Yeah pretty forward , just add env variables and override the build command
erquhart
erquhart10mo ago
Awesome

Did you find this page helpful?