Deployng Nextjs app on Windows Server 2019
Has anyone succed in doing it? I've tried everything and simply can't figure how to make it work.
15 Replies
My unfortunate experience with windows server is that in nearly every case, you will pay more in support costs trying to get/keep it working, than going with a more traditional option; In this case something like Vercel, or a cheap vps.
If it takes me 4 hours to get it set up once... Vs a full year of a $10/mo service... And every time I have to spend hours fighting with it, because it decided to stop working after an update or just randomly... the savings only gets better.
Unfortunately, that's not a option, because that's the client infrastructure. I'm thinking of changing to pages router and working with client side rendering, only.
next.js app router can built as a static website, which you should be able to host anywhere. does mean you can't use server actions or Next's API endpoints, but it sounds like you're either not using them or prepared to rip them out anyway
I'm using both server actions and server components, and yes, the solution that came to mind was replacing them with RTK Query. Although, we're trying to convince the client to setup a virtual machine with Windows 10/11, so that we could install Docker Desktop.
yeah, actions would be a problem then. though server components would work in a static app, they just run once on build
rral funny
real funny
latest docker desktop doesnt work in windows server 2019
my experience was installing old docker desktop
@Styly thanks for the advice. Going to give it a try.
if it is good, please let me know
and I am not @Styly 🤣
its so terrible i thought it was a very elaborate troll
its just a waste of money
what do you mean?
not worth the troble dangers and risks
in all cases linux will be soo much cheaper
yeah, its true
using linux or online free services will be better than using windows server 2019 vps
Here's the thing, there's no Linux options. The client, can only provide VM's running Windows.
The solution was to ditch Next, refactor to vannila React SPA, and move the backend to a REST API.
Based on what I know which admittedly isn't much that sounds like the right choice.