Тёмный

Self host Next.js website on an Ubuntu server with Auto Deploy on commits! 

Digital CEO
Подписаться 3,7 тыс.
Просмотров 3,6 тыс.
50% 1

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@deanelie7775
@deanelie7775 5 месяцев назад
Your tutorials are absolute gold! Thank you so much! 😊
@thedigitalceo
@thedigitalceo 5 месяцев назад
Wowza, thank you!
@iSkayer
@iSkayer Месяц назад
This was a really great tutorial, thank you for walking us through the steps. I already knew most of them, but needed a refresh, especially on the pm2 part. Keep up the great work!
@arfazchhapawala2892
@arfazchhapawala2892 2 месяца назад
Thanks for sharing an amazing tutorial 🙏. I was really searching for the perfect one, and it is well explained 🙌
@Shasa.t
@Shasa.t 4 месяца назад
The RU-vid algorithm brought this to me right when I needed it! getting myself a droplet and learning
@josemarceloalexandre3656
@josemarceloalexandre3656 2 месяца назад
Wow, best video I've ever watched on RU-vid! Congratulations!!!
@alexkey9372
@alexkey9372 5 месяцев назад
You are back!! great news!
@simonboddy7415
@simonboddy7415 Месяц назад
Really good! I'm still getting over the fact that nextjs has to be built in situ. A build can always fail, so it seems very risky to overwrite your live site with some new code that needs to be built. Folk are likely handling this with containers but I think I'm going to try a blue/green strategy and switch the nginx config when the build has succeeded. I'm also a bit startled to see the PATH modified in the deployment pipeline. Why should I need to modify my pipeline every time my node version changes? I think I need a better solution there. God I wish we still had server guys.
@pongtswaila7922
@pongtswaila7922 2 месяца назад
Very helpful content. Tnx so much! 🙏
@marchello6826
@marchello6826 3 месяца назад
Thank you for the incredibly helpful content!
@ywywywyw612
@ywywywyw612 4 месяца назад
There is a slight problem with this and it is that you cannot run build while running PM2 because building causes the files that are being served by PM2 to be modified, you have to copy them to another directory before hand, I think you can use `next build [directory to which you copied the files]` to fix this, otherwise awesome video! edit: use next JS standalone mode, not `next build [directory]`!
@thedigitalceo
@thedigitalceo 4 месяца назад
A good point. I haven’t run into a lot of issues in most cases but what you suggested is definitely best practice. Thank you!
@samsHandle
@samsHandle 5 месяцев назад
Awesome tutorial! Any idea on how DigitalOcean pricing compares to AWS?
@thedigitalceo
@thedigitalceo 5 месяцев назад
I think Digital Ocean is going to be the best value and very easy. The interface is so clean and easy. Aws interface is very confusing and the pricing is complex. The servers may be similar in cost but with AWS there’s added cost to bandwidth which makes it even more elusive. If you’re scaling something massive AWS would be good if you will use other services . For most apps Digital Ocean is really nice.
@achrefmtir8250
@achrefmtir8250 3 месяца назад
this content is legendary !
@AyushKumar-ow1od
@AyushKumar-ow1od 5 месяцев назад
sir i am facing this issue ubuntu@13.200.235.21: Permission denied (publickey). Error: Process completed with exit code 255.
@thedigitalceo
@thedigitalceo 5 месяцев назад
It means when you created the server you didn’t place your ssh key on the server. If creating from digital ocean you need to add the ssh key during the process of creating the server. If it’s not added when creating you won’t be able to login. You can delete the server and start over.
@MrAlao675
@MrAlao675 5 месяцев назад
This is absolutely amazing... Been looking/waiting for this. What about full stack with something like prisma? Thank you!
@thedigitalceo
@thedigitalceo 5 месяцев назад
Thanks! Yeah that's another wonderful aspect, you can put a database on the server too.
@amremam4188
@amremam4188 9 дней назад
Then what is the point of npm run build
@alleggs
@alleggs 3 месяца назад
something wrong with this. i tries to run two apps on same domain with subomains, but only one app runs on domain
@sakshambista0
@sakshambista0 5 месяцев назад
LIFE SAVER ❤
@bphil4859
@bphil4859 5 месяцев назад
mongodb in host bro !
@thedigitalceo
@thedigitalceo 5 месяцев назад
Right! I'm all about mysql, but that's another cool thing about your own server, you can place the database on the same server! mongodb, or any other.
@Benni1000games
@Benni1000games 4 месяца назад
nvm, pm2 and npm should not be running as root, this is dangerous and asking for trouble. If anybody wants to follow this guide I really highly recommend that you create a separate user account for this and also for cloning and updating the code. Root is the Linux equivalent of an admin user and anything that does not require admin privileges should never run as root. If there is ever an RCE in your code or nextJS and you are running this setup the attacker has full admin access to your server. Create a sandboxed user account with limited privileges, a separate SSH key and read/write only allowed to their own files for every project, project A should not be able to read files from project B.
@thedigitalceo
@thedigitalceo 4 месяца назад
That is a good point. I believe I mentioned this the tutorial. Just kept root for the demo. Thank you for clarifying
@bimwerx
@bimwerx 4 месяца назад
The title reads 'Self host' - using Digital Ocean is not self hosting. How about using Ubuntu-server on a local machine to deploy a live Next.js app?
@haiffy
@haiffy 3 месяца назад
Digital ocean droplets are just ubuntu server under the hood, literally same thing, you can use this tutorial on any ubuntu server anywhere
@PongLenis99
@PongLenis99 Месяц назад
@@haiffy yah it worked for me on my self hosted ubuntu. great tut
Далее
The BEST way to host Next.js websites
17:37
Просмотров 49 тыс.
Песня РАСПУТИН на русском!🔥
00:56
Пчёлы некроманты.
00:46
Просмотров 28 тыс.
One Bit Food API - Deploy
1:03:49
Просмотров 26
Next.js 14 Deployment to VPS with GitHub Actions CI/CD
52:31
Coolify Crash Course | Self Host 101 | Secure Set up
1:29:06