Most of my short career has been spent working on PHP and WordPress projects so I’ve had a lot of experience setting up server environments for those, but it’s really great seeing how this process can work for a Next.js project, which is pretty much synonymous with Vercel. Good to see I’m not completely stuck on vercel just because I wanted to use next.js. Great and instructive video.
Thank you so so much for this video! This is the explanation of the missing link in the chain. As a self-educator I was desperately searching for exactly this.
A video on how to setup auto deployment on a custom server would be awesome. So our app gets build on the server automatically with the latest changes to branch x on git.
Thank you for such great content. That's exactly the alternative I was looking for. Oh and by the way, totally unrelated... but that fade hair cut is sick!!
That was absolutely brilliant! Thank you so much. I would love to see a video about adding an ssl certificate and adding a domain to the site. Thank you again!
15:21 I get an error when installing npm: "... have unmet dependencied:" ... "Unable to correct problems, you have held broken packages." Did I miss any step?
Hey man! I really enjoyed your videos. I'm currently looking into implementing multi-tenancy (wildcard subdomains). I've read the Vercel documentation and cloned Steves Tey's platform starter kit, but I'm still having trouble understanding the concepts. Would you be able to create a video on this topic that is more beginner-friendly? I'm particularly interested in learning how to use the new Next.js app route feature.
It would be awesome if you Sonny can make a small guide of managing Nodejs apps (like Nextjs) in a VPS (like hostinger's). Cause sometimes it's really hard to find some relevant information like yours, thanks a lot.
As a complete beginner to hosting, how safe is this? Like would I be able to create a nextjs app that i know is safe if i was to host it on vercel and be able to host it on a vps or do i need to take extra security measures? and is the process the same on other hosting websites that let you create a vps?
Sonny! You're raising the top level of education available to us Your videos are enlightening to us and providing new knowledge thanks bro🙂 my English is not Soo good but I hope you under stand
Thanks Sonny like everyone else I was able to follow your instructions and get my VPS setup so this has been a super helpful video. The issue is that in reality we would never follow this process of setting up a new NextJS app on our server, it's almost always going to be setup and built out locally and then when it's ready to be deployed we need to push it to a server. Pretty please can you explain how we would integrate our Github repo so that we can auto deploy to our hostinger VPS 🙏
I don't write comments at videos at all, but this one is such a good video with grained explanation and showcase. Thank you very much!!! (And doc btw is very useful)
Hey Sonny, thanks for the tutorial, very neat and easy to follow! Do you mind sharing what screen recorder software you use? Trying making a few videos for workplace and almost none of them work for me when I'm trying to embed my webcam inside the video in real-time! Thanks
Thanks so much, this video taught me all I needed to know and got everything working on my side. But a quick question, how can you replicate this process for two or more apps that you want to be running on same VPS server. Also how does the server understands from the client's request which repository location that needs to be rendered
Been waiting for these.. Had been deploying my apps to a vps but wanted someone to share latest standards on how to do it esp auto deploys with web hooks or something
Hello, I bought a virtual server with 3 cores and 2GB of RAM, and I uploaded a very simple Next project to it. Inside this project, I installed the libraries `react-icon`, `react-toastify`, `next-auth`, and `tailwind`. Then, when I tried to build the project on the server, it me an error about unsupported CPU and said it couldn't do it. I want to know, is Next.js really that heavy that it can't even build a medium or small-scale project on such a server? Can you guide me and tell me if using Docker would make a? Please explain.
I have a question when I do VPS do I lose the functionality of features such as middleware and API routes? Its kinda of a dumb question seeing as you are using app router. Its just that I may need to do this exact thing to host a PWA Next.js 13 app that Im doing. Great video, you gave me a solution!
There is no way to generate a statci/dist/out folder with all the javascript/css/html and upload this folder in the vps instead of upload the whole app . i mean like we do using vite ??
after deploying next.js e.commerce plateform in hostinger, does it have bills to pay like vercel, cause i've watched a lot of people complaining about the hight bills to pay in vercel and now i'm afraid that this happens too in hostinger, so can anyone lead me to what is the best buisness plan to choose and what are the do's and dont's that i must to have in mind ????
is this only possible by paying? I got a hostinger domain and hosting because youtubers told me to, while i was building nextjs apps, and then i pay for it and find out i can't host nextjs apps, and i have to pay for a vps now? super frustrated. is there a free option?
In Vercel dashboard you can connect your GitHub in the integrations panel, once you do this pushing to master/main can trigger a deployment! Hope this helps!!
This is so beautiful. What if there is an error and I don't want users to see it yet until it's fixed, how do I do that since I'm working directly to the project folder from my remote vscode?
Is it possible to integrate this flow with github? E.g. to have production app on main branch and staging app on develop branch? And when branch is updated then app on the servee also updates?
This is awesome to deploy to custom server, lots of nextjs devs are searching for ... But a Major question here. Will app router middlewares and api route in nextjs work with this way????? Thanks
Thank you for this video! I would like you to explain more about deploy. This topic is quite tricky for a not backender. Perhaps making a clone of functionality of vercel (connecting git to server) on this channel can collect a million of likes
Great video, but I have a couple questions I'm hoping someone can help me out with. 1.) How do you deploy a Nextjs project that I've created that is on my desktop or on GitHub? Sonny only shows how to upload a newly created project. 2.) I followed Sonny's example and it worked perfectly. However, where is the project stored? I cannot find it using the CloudPanel GUI. It is not located under the "Sites" tab, so I'm not sure where I could go to access it. Thank you to anyone that is able to help me. I really appreciate it.
Thank you so much for this guide, it was very helpful! Do you mind if I create my own guide on how to deploy Next.js app to Google Cloud VM on free tier using the knowledge that I got from this video? I think it will be beneficial for the dev community 🙂
Hello my friend, I am following you and I want advice from you. I am a front-end developer and I use next js and I have worked on actual projects and I want to start in the back-end field. You advise me to start with C# or Javascript framework and work. I am very confused. Please help me. From your point of view, what is best?
Sonny - Amazing... Just need SSL and how to forward my domain I purchased From GoDaddy to my IP address, or instructions where to do so! Thank you so much
Finally someone cares about it
As a senior software engineer, I know all of these, yet still watched and enjoyed every second of it, kudos to you 🥳
Hi, Can I know where to store the env variables. I am stuck there. please hepl
@@wazirshehryarali4375 hi! i located environmets in file .env.production and its works, but i don't know is it correct :)
@@wazirshehryarali4375i think set it up in your project directory?
This is literal gold. I didn't find such comprehensive guide any where else.
Most of my short career has been spent working on PHP and WordPress projects so I’ve had a lot of experience setting up server environments for those, but it’s really great seeing how this process can work for a Next.js project, which is pretty much synonymous with Vercel.
Good to see I’m not completely stuck on vercel just because I wanted to use next.js.
Great and instructive video.
But what if we want to host both the next.js site and the php (mysql) site on the same server?
Thank you so so much for this video! This is the explanation of the missing link in the chain. As a self-educator I was desperately searching for exactly this.
Im so glad it could help!
This tutorial video is GOLD! Thanks a lot!
A video on how to setup auto deployment on a custom server would be awesome. So our app gets build on the server automatically with the latest changes to branch x on git.
+1
+1
+1
+1
Coolify?
Thanks Sunny !
The pdf you've given in the description really helps.
Im glad it could help!
Iv been waiting for this for sooo long
Thank you for such great content. That's exactly the alternative I was looking for. Oh and by the way, totally unrelated... but that fade hair cut is sick!!
Excellent demonstration! This has cleared up so much for me. Thank!!
That was absolutely brilliant! Thank you so much. I would love to see a video about adding an ssl certificate and adding a domain to the site. Thank you again!
Awesome video, specially the last part where you actually runs in localhost, this will make my work A LOT faster! Huge thanks
Wow. This video is sooo helpful. I covered all information i want to know. Thank you!
15:21 I get an error when installing npm: "... have unmet dependencied:" ... "Unable to correct problems, you have held broken packages." Did I miss any step?
Thank you so much. I was dealing with the issue of hosting my website on VPS. Now I can easily do that.
Hey man! I really enjoyed your videos. I'm currently looking into implementing multi-tenancy (wildcard subdomains). I've read the Vercel documentation and cloned Steves Tey's platform starter kit, but I'm still having trouble understanding the concepts. Would you be able to create a video on this topic that is more beginner-friendly? I'm particularly interested in learning how to use the new Next.js app route feature.
The Best #papareact 🔥🔥🔥
It was very helpful for me. Big Like!
It would be awesome if you Sonny can make a small guide of managing Nodejs apps (like Nextjs) in a VPS (like hostinger's). Cause sometimes it's really hard to find some relevant information like yours, thanks a lot.
As a complete beginner to hosting, how safe is this? Like would I be able to create a nextjs app that i know is safe if i was to host it on vercel and be able to host it on a vps or do i need to take extra security measures? and is the process the same on other hosting websites that let you create a vps?
I just deployed my nextjs app in shared hosting. Just took 5 mins. App running smoothly.
Sonny! You're raising the top level of education available to us Your videos are enlightening to us and providing new knowledge thanks bro🙂 my English is not Soo good but I hope you under stand
Thanks Sonny like everyone else I was able to follow your instructions and get my VPS setup so this has been a super helpful video. The issue is that in reality we would never follow this process of setting up a new NextJS app on our server, it's almost always going to be setup and built out locally and then when it's ready to be deployed we need to push it to a server. Pretty please can you explain how we would integrate our Github repo so that we can auto deploy to our hostinger VPS 🙏
I don't write comments at videos at all, but this one is such a good video with grained explanation and showcase. Thank you very much!!! (And doc btw is very useful)
Thank you so much!!!
Thanks man!
It was very helpful!
Thank you very much brother. This video really helped me alot.
why does no one tell you about the minimum vps configuration and the recommended one. how do I figure out how powerful a vps I need for next js?
Hi broo..Enjoyed and totally loved it❤
Please bring SSL certification video
wow thumbs up for sure.. well deserved! (and subscribed!)
Hey Sonny, thanks for the tutorial, very neat and easy to follow!
Do you mind sharing what screen recorder software you use? Trying making a few videos for workplace and almost none of them work for me when I'm trying to embed my webcam inside the video in real-time!
Thanks
is there any benefit of using vps over vercel?
it cold, thank you so much sonny, i have one question how if i want to deploy two project in one vps?
Cool from an old grand daddy : i love your Channel.😊
Hey, Can you please tell me where can I store my env variables in this?
dyanamic route is not working.. Its chunk throws 404. Could you help me to resolve that
Thanks you Sonny ! Please make more videos like this !
How can i do if i want to publish more than one site using next ??
Can we do it in simple website hosting plan?
Thanks so much, this video taught me all I needed to know and got everything working on my side. But a quick question, how can you replicate this process for two or more apps that you want to be running on same VPS server. Also how does the server understands from the client's request which repository location that needs to be rendered
2 words => Merci Sonny ! 😎
Thanks for the bonus with remote - ssh . It’s really awesome
How can i connect my custom domain to deployed next.js app to specific IPAddress ?
Amazing, Thank you
But what if we want to host both the next.js site and the php (mysql) site on the same server?
Great! how can you use Deferent node version my various app?
Sunny it's showing an Error called /etc/nginx/sites-available/nextjs.conf : No such file or directory
Hi, I had the same issue just reinstall Nginx by using those command lines:
sudo apt-get remove --purge nginx nginx-common
sudo apt-get install nginx
Hi Sonny! I was wondering if you have any advice about setting up an SSL Certificate in a VPS environment?
Can we deploy Strapi cms project in Hostinger VPS server??
Been waiting for these.. Had been deploying my apps to a vps but wanted someone to share latest standards on how to do it esp auto deploys with web hooks or something
Hello, I bought a virtual server with 3 cores and 2GB of RAM, and I uploaded a very simple Next project to it. Inside this project, I installed the libraries `react-icon`, `react-toastify`, `next-auth`, and `tailwind`. Then, when I tried to build the project on the server, it me an error about unsupported CPU and said it couldn't do it. I want to know, is Next.js really that heavy that it can't even build a medium or small-scale project on such a server? Can you guide me and tell me if using Docker would make a? Please explain.
Is cloudpanel required? or just ubuntu OS is good enough to start with?
Very useful. Subbed.
I have a question when I do VPS do I lose the functionality of features such as middleware and API routes? Its kinda of a dumb question seeing as you are using app router. Its just that I may need to do this exact thing to host a PWA Next.js 13 app that Im doing. Great video, you gave me a solution!
If I understand you right, you forwarded all requests for your web app to the node server, including requests for images, css etc.?
Super content. Thanks !
There is no way to generate a statci/dist/out folder with all the javascript/css/html and upload this folder in the vps instead of upload the whole app . i mean like we do using vite ??
❤ u got your self a new sub with a bench of likes , thank you bro
Very beginner friendly guide. Please do the SSL setup video!
Thanks for this video. I want a video for ssl conf. Thanks in advance 🤜
after deploying next.js e.commerce plateform in hostinger, does it have bills to pay like vercel, cause i've watched a lot of people complaining about the hight bills to pay in vercel and now i'm afraid that this happens too in hostinger, so can anyone lead me to what is the best buisness plan to choose and what are the do's and dont's that i must to have in mind ????
is this only possible by paying? I got a hostinger domain and hosting because youtubers told me to, while i was building nextjs apps, and then i pay for it and find out i can't host nextjs apps, and i have to pay for a vps now? super frustrated. is there a free option?
How do I add images in the public folder of the app? Can anyone help me on this please.
warp is not available for windows, please, recommend any other terminal for this setup
Awesome, how do you do this but have it auto deploy from github? same setup, just auto deploy?
In Vercel dashboard you can connect your GitHub in the integrations panel, once you do this pushing to master/main can trigger a deployment! Hope this helps!!
@@SonnySangha I mean the VPS, not Vercel
I have purchased kvm2 hosting.
and complete initial setups.
how can i upload my nextjs project now. i want to deploy via github.
wow! its tremendes and exellent job :) thanks a lot for this tutorial
Can I use putty on windows 10 to connect with server.
Any resources on maintaining serverless api inside VPS?
Thank you so much!
As a Sr. frontend developer, I already have the above but still enjoyed watching on 2x speed 😅, also it will be great to make the ssh for it too
This is so beautiful. What if there is an error and I don't want users to see it yet until it's fixed, how do I do that since I'm working directly to the project folder from my remote vscode?
Is it possible to integrate this flow with github? E.g. to have production app on main branch and staging app on develop branch? And when branch is updated then app on the servee also updates?
Hello, my backend is PHP. Can I install PHP on Ngix? Can you make a video on how a Next.js app would work with PHP?
Do I get this right? You are entering your root password on a third party terminal emulation website? Are there any security concerns?
Very much appreciated.
This is awesome to deploy to custom server, lots of nextjs devs are searching for ...
But a Major question here.
Will app router middlewares and api route in nextjs work with this way?????
Thanks
Thank you for this video! I would like you to explain more about deploy. This topic is quite tricky for a not backender. Perhaps making a clone of functionality of vercel (connecting git to server) on this channel can collect a million of likes
Big love sony sir ❤❤
Sir ck you create videk for use ssl on this video?
Wow. Why does such an amazing video have just this many likes?
We will grow don’t worry 🙏🏽 thank you so much for the support!!
works with cyberpanel?
or can one create an nginx server for a subdomain because the entire vps is built on apache server
I hope you will create tutorial how to do the same with docker images and github repo
This seems quite complicated, can't I just host the app on my own hosting where I put my regular web pages?
still getting my password denied. Try'd for hours now. Changing it all over again....still not working. Can't even ssh into my Ip.
GOOD JOB!
this is God sent
Great video, but I have a couple questions I'm hoping someone can help me out with.
1.) How do you deploy a Nextjs project that I've created that is on my desktop or on GitHub? Sonny only shows how to upload a newly created project.
2.) I followed Sonny's example and it worked perfectly. However, where is the project stored? I cannot find it using the CloudPanel GUI. It is not located under the "Sites" tab, so I'm not sure where I could go to access it.
Thank you to anyone that is able to help me. I really appreciate it.
Need your guide on ssh for this one ❤
bro I need with external api like python or node js to integrate with nextjs on Login apis
Hey Sonny, you are the one who taught me ReactJs, which opened up the path for my career and startup. Wish you all the best.
Thank you so much for this guide, it was very helpful!
Do you mind if I create my own guide on how to deploy Next.js app to Google Cloud VM on free tier using the knowledge that I got from this video? I think it will be beneficial for the dev community 🙂
production build?
can you deploy a nodejs server on it as well?
Hello my friend, I am following you and I want advice from you. I am a front-end developer and I use next js and I have worked on actual projects and I want to start in the back-end field. You advise me to start with C# or Javascript framework and work. I am very confused. Please help me. From your point of view, what is best?
Thanks a lot. Please teach us load balancing and ssl and dns
This is gold bruh gold👏🏾 goin make shmoneyyy with this
Glad you liked it!
Sonny - Amazing... Just need SSL and how to forward my domain I purchased From GoDaddy to my IP address, or instructions where to do so! Thank you so much
Did this with Certbot and forwarded my domain with A method - sorted
Please, what about it apache configuration.
Would love to see a self-hosted github runner + monorepo project