how to deploy nextjs 14 app router on cpanel?
Unanswered
Pug posted this in #help-forum
PugOP
I'm having trouble deploying the NextJS 14 Router app on CPanel, most of the video tutorials and also Google tell me how to deploy the NextJS Pages Router app, that doesn't help me, there is no clearer documentation about this, maybe if there is one you can let me know , clearly I want to deploy on my own server, not via vercel or a deployment place that can deploy nextjs
65 Replies
Madeiran sardinella
Hi, have you access to the deploy logs? What does it say?
@Madeiran sardinella Hi, have you access to the deploy logs? What does it say?
PugOP
how do I deploy?
startup file is missing, I need instructions to deploy nextjs app roter on my own server
PugOP
tell me how to deploy nextjs app router on cpanel
@Pug tell me how to deploy nextjs app router on cpanel
Eurasian Wigeon
sounds like a great google question
your question mentions you’ve googled it but idk how your description relates to what you’re doing
most of google tells me for nextjs pages router
If you know of documentation or websites that can help me to deploy NextJS on the CPanel router app, I would be very grateful
Eurasian Wigeon
you said “nextjs router app” then “nextjs pages router app” and now “cpanel router app”
which is it
PugOP
you need to read clearly, that I want to deploy the nextjs app router on my own server, but most of the results that appear on YouTube and Google about deploy nextjs pages router are not app routers
Madeiran sardinella
I think that if you want to self deploy a next app (no matter app or pages router), the easiest way is a virtual machine running on the cloud
@Madeiran sardinella I think that if you want to self deploy a next app (no matter app or pages router), the easiest way is a virtual machine running on the cloud
PugOP
nextjs doesn't support custom server deploy?
@Pug nextjs doesn't support custom server deploy?
Madeiran sardinella
You can deploy nextjs in your own server
@Madeiran sardinella You can deploy nextjs in your own server
PugOP
Do you know how?
@Pug Do you know how?
Madeiran sardinella
Yes, I've did it using AWS EC2 instances with Linux, Nginx and pm2
Eurasian Wigeon
i just use docker
@Pug Do you know how?
Cimarrón Uruguayo
you may need to build the nextjs app as an express app
and then run it on your server as you would any other express app
@Cimarrón Uruguayo you may need to build the nextjs app as an express app
PugOP
How, I still don't understand your explanation, make the next application an express application
Eurasian Wigeon
why are you trying to use cpanel
PugOP
because I have my own server that I have bought
and make it a lesson on how to deploy the NextJS App Router application to your own server
Eurasian Wigeon
wait so you’re trying to write a tutorial but you don’t even know how to do it? why?
PugOP
bro try to read properly
I am looking for a way to deploy the nextjs app router application on cpanel
Eurasian Wigeon
WHY ARE YOU TRYING TO USE CPANEL
DONT USE CPANEL
@Pug bro try to read properly
Eurasian Wigeon
you CANNOT say this to people who are trying to help you
you try to TYPE properly and I will be able to UNDERSTAND properly
@Eurasian Wigeon you try to TYPE properly and I will be able to UNDERSTAND properly
PugOP
I want to deploy the nextjs app router application to cpanel
@Eurasian Wigeon DONT USE CPANEL
PugOP
why?, is there a reason behind that?
Cimarrón Uruguayo
if you're not doing a static page deployment then don't use cpanel
vercel is straightforward
just googling around tells me that its not a great idea
@Pug I want to deploy the nextjs app router application to cpanel
Simply put, you need ssh access to your server and maybe even root previlleges
Indeed, there is no other way besides docker, static
I hope the nextjs app router can be deployed on cpanel to make things easier in the future
You can technically host Next app router or pages if you go completely static.
Cimarrón Uruguayo
I doubt OP wants to do this
Fire ant
Shared host?
@Cimarrón Uruguayo I doubt OP wants to do this
PugOP
I have changed to static 😮💨
Dwarf Hotot
no need to change to Static, I've done deployed Next App Router into cpanel shared hosting
@Clown You can technically host Next app router or pages if you go completely static.
PugOP
Well, someone has successfully deployed without static
@Cimarrón Uruguayo if you're not doing a static page deployment then don't use cpanel
PugOP
Seems like that's an old discussion
@Pug Well, someone has successfully deployed without static
Sigh .... You can deploy nextjs normally but using cpanel is not a good way of doing so.
You just need ssh access with root and you can easily deploy the nextjs app.
PugOP
really?
@Dwarf Hotot?
Dwarf Hotot
yes
@Clown Sigh .... You can deploy nextjs normally but using cpanel is not a good way of doing so.
Dwarf Hotot
nah, no need ssh access with root
@Pug just find shared hosting that support NodeJS
I'm using => https://justahost.cloud/ to deploy my app
I'm using => https://justahost.cloud/ to deploy my app
PugOP
ok
Dwarf Hotot
previously, I also deploying HonoJS through shared hosting cPanel
my suggestion is 2 options for deploying NextJS app:
1. Vercel
2. Shared hosting cPanel
why? because both of it no need to setup many tools like pm2, nginx, etc. everyting has been handled by them
1. Vercel
2. Shared hosting cPanel
why? because both of it no need to setup many tools like pm2, nginx, etc. everyting has been handled by them
@Dwarf Hotot previously, I also deploying HonoJS through shared hosting cPanel
PugOP
is there a tutorial for running the router app in cpanel?
@Pug is there a tutorial for running the router app in cpanel?
Dwarf Hotot
I'll make it and publish on my tiktok
can follow first, previously I made tutorial how to deploy nodejs app (honoJS) via cpanel
@devoresyahcan follow first, previously I made tutorial how to deploy nodejs app (honoJS) via cpanel
PugOP
okay
we are doomed
Dwarf Hotot
here's my HonoJS app that I deployed on cPanel
https://nodeapps.my.id/
https://nodeapps.my.id/
i think if you have cPanel that has node js setup feature you might easily deploy that using
next start command?