How to efficiently host nextjs on cPanel with tips and tricks for a nice setup.
Unanswered
Japanese jack mackerel posted this in #help-forum
Japanese jack mackerelOP
Hey, I am in the process of learning nextjs and developing a web application with nextjs. With that in mind I am using cPanel at a hosting provider that I am already using for other web solutions and though it would be nice if I could have everything in one place where I also have my databases etc...
I have gotten a simpel setup, but quickly after a bit of time I get that I have ran out of 'Number Of Processes' I have read that pm2 would be great and Cron Job scripts or something of the like would help.
Now my question is how I can efficiently self host nextsj web solution on cPanel from scratch with additional tips and tricks and things to look out for (and smart solutions)
Thanks in advanced to anyone answering or reading.
I have gotten a simpel setup, but quickly after a bit of time I get that I have ran out of 'Number Of Processes' I have read that pm2 would be great and Cron Job scripts or something of the like would help.
Now my question is how I can efficiently self host nextsj web solution on cPanel from scratch with additional tips and tricks and things to look out for (and smart solutions)
Thanks in advanced to anyone answering or reading.
2 Replies
cPanel isn't recommended for running NextJS on. And I would highly doubt anyone else here would be running it on there. Vercel offer a free tier, and VPS are relatively cheap and much better suited for the task. Whilst it can be done it is highly not recommended. Here are a few articles/discussions showing why:
https://medium.com/@reviterif/next-cpanel-a44474decfdd#:~:text=Eventually%2C%20I%20discovered%20that%20Cpanel,improving%20server%2Dside%20rendering%20performance.
https://www.reddit.com/r/nextjs/comments/1fujw76/hosting_nextjs_on_cpanel/
If your web app is small enough that you would consider using cPanel, just run it on vercels free tier. If its big enough to not work within the free tier, then cpanel won't be able to afficiently handle it. User vercel or get a VPS. cPanel is more suited towards wordpress.
https://medium.com/@reviterif/next-cpanel-a44474decfdd#:~:text=Eventually%2C%20I%20discovered%20that%20Cpanel,improving%20server%2Dside%20rendering%20performance.
https://www.reddit.com/r/nextjs/comments/1fujw76/hosting_nextjs_on_cpanel/
If your web app is small enough that you would consider using cPanel, just run it on vercels free tier. If its big enough to not work within the free tier, then cpanel won't be able to afficiently handle it. User vercel or get a VPS. cPanel is more suited towards wordpress.
Japanese jack mackerelOP
Ok thanks, i guess I will be trying to deploy on vercel even though I already have all of my other web solutions on another hosting platform with cPanel.