Next.js Discord

Discord Forum

Hosting on a VPS server

Unanswered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
Hi everyone,

I’m planning to host my Next.js app outside of Vercel for the first time. My app uses MySQL for the database and many of the new Next.js 14 features, like server actions and image optimization. I’ll also likely need something like Apache or Nginx to serve static files because my users will be able to upload their own images.

I have some experience with hosting using the Plesk interface, but not much beyond that. I’m wondering if it’s possible to host this on a VPS and what the process might look like.

Do you know any good VPS hosting providers that make it easy to host a Next.js app?

Thanks! :next1: :react:

4 Replies

@Saltwater Crocodile solved?
@B33fb0n3 <@1026985059728773151> solved?
Saltwater CrocodileOP
I didn't tried it yet but I saw one video that really makes sense. In sort terms I saw that basically I need to get my project in a VPS add the required dependencies configure it to start with a pm2 and let Nginx serve the files. So basically its the npm run start that is running on the vps and Nginx servers the files. Ofc there are more to it like DNS ssl firewall and more. But this is the general plan. And I guess it will support all the things that I need like image optimisation
I don't really want to use an external provider for the user upload files so I will just save them on the filesystem and Nginx will serve them I think