R
Railway12mo ago
woozi188

What version of Next.js is supported for hosting in railway, what are the limitations?

I would like to use railway to host my next.js app. I would like to know if I can use latest Next.js, what features are not supported. eg : on demand ISR, SSG, SSR, Image optimizations, app dir.
Solution:
if you want ISR you have to write the code to do that yourself, railway won't do any of that for you
Jump to solution
16 Replies
Percy
Percy12mo ago
Project ID: N/A
Brody
Brody12mo ago
your code is ran as is, so if your code supports those features, then so will railway there are some small limitations, but 8 times out of 10, it's up to your code
woozi188
woozi18812mo ago
could you please tell me the limitations, I know aws amplify has Supported features Server-side rendered pages (SSR) Static pages API routes Dynamic routes Catch all routes SSG (Static generation) Incremental Static Regeneration (ISR) Internationalized (i18n) sub-path routing Internationalized (i18n) domain routing Middleware Environment variables Image optimization. Next.js 13 app directory Unsupported features Edge API Routes (Edge middleware is not supported) On-Demand Incremental Static Regeneration (ISR) Internationalized (i18n) automatic locale detection idk if its the same for railway.app mikestare
Brody
Brody12mo ago
99% of those things are things you'd have to code to support yourself no edge routes though
woozi188
woozi18812mo ago
does On-Demand Incremental Static Regeneration (ISR) work?
Brody
Brody12mo ago
your code is ran as is, so if you want ISR you'd have to code that yourself (or use someone else's code) railway is purely an app runner, it doesn't do anything to your code
woozi188
woozi18812mo ago
on demand ISR happens on the server side though, its a platform feature right? I would write the logic in my code but its executed in the server.
Brody
Brody12mo ago
it might be a platform feature on something like vercel or netlify, but not on railway
Solution
Brody
Brody12mo ago
if you want ISR you have to write the code to do that yourself, railway won't do any of that for you
woozi188
woozi18812mo ago
I see, okey. Where is the hosting done. When i host apps in railway it just chooses its own region?? I would like mine to be closer to where im , could you tell me where i can change that
Brody
Brody12mo ago
railway runs on gcp, and they currently only have one region available, us-west1 they are currently working on adding some more regions
woozi188
woozi18812mo ago
Ohh that makes sense. Is there any limit for Hobby plan users. I sometimes feel like some operations on the DB are a bit slow. Is it due to the region or plan based limitation?
Brody
Brody12mo ago
well it could be unoptimized code?, or your geographical location? on the hobby plan your databases and services each get their own dedicated resources (up to 8vcpu and 8 GB ram) so no limitations there to speak of
woozi188
woozi18812mo ago
How to deploy docker projects on railway? is it also available for hobby users?
Brody
Brody12mo ago
yep hobby users that are a part of beta and you don't need to do anything special for access, just type forward slash beta here