Self-Hosting Next.js

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 235

  • @WebDevCody
    @WebDevCody 3 месяца назад +451

    We appreciate you Lee

    • @ElHeloint
      @ElHeloint 3 месяца назад +4

      You see Cody? "Just use Neovim, bro" 😂

    • @sinaasadi3800
      @sinaasadi3800 2 месяца назад

      He is employed by vercel

    • @ElHeloint
      @ElHeloint 2 месяца назад +1

      @@sinaasadi3800 And? Is something salty for you?

    • @WebDevCody
      @WebDevCody 2 месяца назад +1

      @@sinaasadi3800 why does that change if we appreciate anyone or not?

  • @codewithantonio
    @codewithantonio 3 месяца назад +208

    Amazing, lovely resource to redirect my viewers when they ask about self hosting! :)

  • @paramaggarwal
    @paramaggarwal 2 месяца назад +20

    Knowing I can self-host anytime makes me feel more comfortable using Vercel.

  • @TeamEternalEmpire
    @TeamEternalEmpire 3 месяца назад +141

    Seeing a Vercel employee teaching this makes me trust Vercel more. Finally they're being open about it. I don't believe Vercel would lose much by doing this, most people will stick with the convenience. Those who want to move to self-hosted solutions will do so whether Vercel hides that it's possible or not.

    • @Innesb
      @Innesb 3 месяца назад +17

      I don’t think Vercel are trying to hide anything; Vercel have provided self-hosting documentation for as long as I remember. There’s no step-by-step tutorial in their documentation but they cover self hosting in the deployment documentation.

    • @PraiseYeezus
      @PraiseYeezus 3 месяца назад +3

      finally they're being open about it? lol

    • @TeamEternalEmpire
      @TeamEternalEmpire 3 месяца назад

      ​@@PraiseYeezusHow often do you see Vercel advocates talking about it? I thought it was a no-brainer that Vercel makes it seem like letting them host is a silver bullet, feels free to share more content like this one

    • @nikilk
      @nikilk 3 месяца назад +3

      A lot of mid to large companies need to be able to deploy on their infrastructure.

    • @lamarredavy8145
      @lamarredavy8145 3 месяца назад +2

      Why vercel does not provide self hosting on their plateform too ?

  • @nick-ui
    @nick-ui 3 месяца назад +31

    Lee, that's a good step to open-source community, really appreciate it

  • @r34ct4
    @r34ct4 3 месяца назад +7

    Holy crap, I spent countless hours trying to figure this out on my own a few months ago and eventually gave up - this is the first tutorial of its kind, I am beyond excited. Will edit my comment if I can get it working, and what kinks I experienced along the way

  • @wlockuz4467
    @wlockuz4467 3 месяца назад +2

    I love everything about this video. Its very comprehensive and to the point while staying completely unbiased. Hope to see more!

  • @codewithmarcin
    @codewithmarcin 2 месяца назад +1

    Thanks for making this video Lee. Super handy resource that I'll be sharing around at work.
    Also great to hear you guys have taken feeback on board from people like Brandon.
    Keep up these type of videos. Super insightful.

  • @typesafeui
    @typesafeui 3 месяца назад +6

    Lee is coming in clutch with the NextJS as always 🔥

  • @jessequartey
    @jessequartey 2 месяца назад +1

    I am really happy for this video, my startup is not ready to leave vercel but i have been thinking of sustainability and that made Remix look good but deep down i know Nextjs is the 🐐 .

    • @jessequartey
      @jessequartey Месяц назад

      Scratch that theo made a video about improving vercel bill. We are moving no more

  • @mathesonstep
    @mathesonstep 3 месяца назад +4

    Although I know a lot about self hosting my own apps I still found this video to be very useful as I am still a beginner to NextJS and there was a ton of info here specific to NextJS, I recommend everyone watch this before deploying. There are a few changes I would make it to the script like forcing SSH keys and setting up fal2ban for SSH and I'm not sure if you're taking pull requests but there are a few other things too, if you are taking PR's, I'd be willing to help add to the script. Otherwise, I totally understand because then the video may become out of date.

    • @samiullahsheikh5015
      @samiullahsheikh5015 3 месяца назад

      Can I connect with you as I don't know much about hosting but learning. It would be great connect with you on LinkedIn or some other platform

  • @gabrielbianchi2246
    @gabrielbianchi2246 2 месяца назад

    Thank you so so much Lee. The part where you talk about caching was extremely important to me. I think the vercel docs need to better explain WHERE all of the caching is stored when you deploy on a VPS, or when you deploy to Vercel. I think that your explanation helped me understand where the unstable_cache() function for example might store all of its data, depending on the environment

  • @jonymusky
    @jonymusky 2 месяца назад

    I respect engineers when I see their vi skills :)

  • @nicko9958
    @nicko9958 3 месяца назад

    Best video for self hosting Next.js on RUclips

  • @PiyushChauhan2011
    @PiyushChauhan2011 2 месяца назад +1

    Ultimately, this helps reunite the community and encourages people to place greater trust in Next.js.

    • @googleusers
      @googleusers 2 месяца назад

      You’re right, at first I was excited, I was on my third project using Next.js, and then I felt trapped, lol.

  • @karsongrady
    @karsongrady 3 месяца назад +2

    Great video. Makes me appreciate vercel more with what they take off my plate

  • @abdelilahou2822
    @abdelilahou2822 3 месяца назад

    Love this type of videos we need more that goes deeper into next.js and how to use some advanced features on otger platforms

  • @Fidicirj
    @Fidicirj 3 месяца назад

    I am absolutely no one and at the same time very valuable (IMO) feedback giver: thanks, Lee, you are doing a very valuable job for sooo many people, you can't even imagine this crowd

  • @ichigokuro3986
    @ichigokuro3986 3 месяца назад +2

    Lee man I know it may be difficult for you to make this full fleged tutorials, but please keem them coming! Would love to see more such videos wherein you build stuff

  • @darkoplax7688
    @darkoplax7688 3 месяца назад +2

    Thanks, I'm getting into DevOps and love learning self-hosting

  • @aralroca
    @aralroca 3 месяца назад

    I appreciate all the effort you are making to clarify these points. And I love that you used Bun runtime as an example!

  • @DurotarCZ
    @DurotarCZ 2 месяца назад

    Thats really great, that Vercel helps developers, to self-host their app.

  • @binh1298ify
    @binh1298ify 3 месяца назад

    Thanks, this is exactly what I’m looking for. Feels nice seeing it from someone who actually works at Vercel

  • @harlaksh
    @harlaksh 2 месяца назад

    Boss tutorial. Appreciate the material you put out for the community :)

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 3 месяца назад

    Great , I was waiting for more videos from you leerob , to learn things with next , thank you!

  • @ekip-123
    @ekip-123 3 месяца назад

    Thank you for this great video! It is educational, very hands on and helps a lot to clear some myths about Next.

  • @magnuserikkeenrobot1117
    @magnuserikkeenrobot1117 3 месяца назад

    amazing video lee! this was really good. BTW, that peace at the end was new :D

  • @gustanobreza
    @gustanobreza 3 месяца назад

    👏 Thanks for the video! It's amazing ✨. This is the kind of video we need to save the link to see later when it's needed.
    Greetings from Brazil 🇧🇷🇧🇷🇧🇷

  • @Max_Jean
    @Max_Jean 3 месяца назад

    Great work, Im just now staring to dive into Next.js and love to see that self hosting is possible

  • @agustin_sz09
    @agustin_sz09 3 месяца назад

    Awesome video Lee! Thanks for your time and effort doing this, it's really helpful

  • @jaecheokkim99
    @jaecheokkim99 2 месяца назад

    You made my day lee!!! I really appreciate it!

  • @ebratz
    @ebratz 3 месяца назад +5

    this is so honest! huge respect for Lee and Vercel even more now!

  • @ploskovytskyy
    @ploskovytskyy 2 месяца назад

    so much gold info in this video, thank you!

  • @alisareini
    @alisareini 3 месяца назад +3

    what an incredible video

  • @farzadmf
    @farzadmf 3 месяца назад +1

    Great video! Small suggestion: it would be nice to zoom in a bit in the terminal so that the text is easier on the eyes

  • @branmuller
    @branmuller 2 месяца назад +3

    Best deployment video for a framework I have ever watched, thanks Lee!

  • @juliusgrybauskas7643
    @juliusgrybauskas7643 3 месяца назад

    This is literally gold.. thank you my man!

  • @zuka_tsu
    @zuka_tsu 2 месяца назад

    Spend management = Pokeball, catching those wild things 😁
    big w

  • @k2p11
    @k2p11 3 месяца назад +4

    Great content, thanks!

  • @mettle_x
    @mettle_x 3 месяца назад

    Thanks for making this video. We really appreciate it.

  • @roycechua
    @roycechua 3 месяца назад

    Thank you for this tutorial. You've covered a lot of useful topics

  • @zaynelovecraft
    @zaynelovecraft 3 месяца назад +1

    Such amazing content !

  • @necipakgz
    @necipakgz 3 месяца назад +1

    I already know. But I will watch it because I might learn something new.

  • @MatiasBaldanza
    @MatiasBaldanza 3 месяца назад +1

    Thanks! This is just what I was looking for.
    Next: how to do this using Kamal.

  • @ankitkumarjat9886
    @ankitkumarjat9886 2 месяца назад

    Very good video, I learnt a lot 👍

  • @leecolbert7943
    @leecolbert7943 15 дней назад

    I wish this like was a vote for knighthood. Thank you!

  • @RonnieGChagas
    @RonnieGChagas 3 месяца назад +1

    very helpful!
    Thx for the great tutorial

  • @dawid_dahl
    @dawid_dahl 24 дня назад

    Respect to Vercel for posting this. 🙏🏻

  • @buildwithharshit
    @buildwithharshit 3 месяца назад

    yeaah boi, Lee always comes to help :D

  • @khantseithu
    @khantseithu 3 месяца назад

    Awesome work, Lee.

  • @_timarney
    @_timarney 2 месяца назад

    It would be great to get more info around deploymentId / x-deployment-id header etc... for skew protection. Running into issues with Next 15 now that ServerAction ids are secure.

  • @ianlaulau
    @ianlaulau 3 месяца назад +3

    docker-compose is now built into docker since a few years ago as "docker compose" iirc, so I don't think it is necessary to separately install docker-compose in the script

    • @josephkoech1985
      @josephkoech1985 6 дней назад

      Sure, I removed it from the script and it worked just fine.

  • @dobroslav.radosavljevic
    @dobroslav.radosavljevic 3 месяца назад +10

    BREAKING: Vercel is announcing a round of layoffs (1 employee) because of forbidden tutorial
    nah, just joking
    This is a good tutorial definitely. A lot of folks fail hard to self-host Next.js and this really helps. Thanks! 😎

    • @codernerd7076
      @codernerd7076 3 месяца назад +4

      Pretty sure Lee kinda became the face together with the CEO of Vercel they likely would not wanna loss him!

    • @jitxhere
      @jitxhere 3 месяца назад

      I started learning React & Nextjs ​because of Lee @@codernerd7076

  • @codebank1645
    @codebank1645 2 месяца назад

    Amazing to have this update 🎉

  • @etceteracreative
    @etceteracreative Месяц назад +1

    @leerob - I am having trouble understanding the build step of a Nextjs application with Prisma. How and when did you push your schema design to the Postgres DB? I am not seeing anywhere in the code base where you actually call `db:push`. Furthermore. With server components, the build step can often require a database connection so that it can cache resources at build time. On the initial deploy, the postgres database doesnt exist, and the `web` service is encapsulated from the other running containers at build time. (at least this is what I have gathered) so i cant simply start the `db` container first.
    Any direction on these issues would be helpful. Thanks for the amazing video.
    PS. I am new to this, and trying to adapt this deploy script into my own application and understand how it works -- not working directly from a fork of yours.

  • @philDL
    @philDL 3 месяца назад

    Powerful move, and great video 👏

  • @rosariosway
    @rosariosway 11 дней назад

    Super video, thanks!

  • @parkerrex
    @parkerrex 3 месяца назад +1

    Dudeeeeee yes. Thank you Lee 🎉🎉🎉🎉

  • @mitchellrcohen
    @mitchellrcohen Месяц назад

    “Items, nice!” 😂🎉 thank you. So. Much.

  • @anuragroy11
    @anuragroy11 Месяц назад

    Thanks Lee, appreciate you so much! Can you make a video on setting up a websocket server in Next.js?

  • @devtux7
    @devtux7 3 месяца назад

    Awesome tutorial, thank you

  • @nikilk
    @nikilk 3 месяца назад

    Her Lee I have an idea for your next video that I believe will benefit a lot of devs. Build this exact thing but on AWS instead. I believe that’s where a lot of mid to large engineering companies are at. I keep hearing the sentiment from a lot of peers that NextJS is for startup and agency type work in my circle.

  • @timeforrice
    @timeforrice 19 дней назад

    I want to give him a "hi fi", this is awesome!

  • @zNermal
    @zNermal 3 месяца назад +1

    Pretty good video actually :)

  • @_techbk
    @_techbk 3 месяца назад

    Man !! this was great !

  • @jitxhere
    @jitxhere 3 месяца назад

    Wow awesome content Lee.
    Can you please add error and performance monitoring

  • @zakir.nuriiev
    @zakir.nuriiev 3 месяца назад

    Thank you for this video!

  • @thecoder1631
    @thecoder1631 3 месяца назад

    yoooo he did it! thank you lee

  • @sumitpurohit8849
    @sumitpurohit8849 3 месяца назад +2

    DHH is really powerful

  • @shahzaibshahzaibkhan6480
    @shahzaibshahzaibkhan6480 3 месяца назад

    Good stuff man ❤

  • @robertuken
    @robertuken 3 месяца назад

    Awesome tutorial, Lee! Would you like to do one using Kamal? It'd be great. Thank you in any case.
    P.S: Kudos to Vercel to not fear doing something like this. It makes me trust you/them (even) more.

  • @prerit714
    @prerit714 3 месяца назад +2

    Vercel got roasted so bad they had to make a video about it. Anyways love this ❤

  • @reze_dev
    @reze_dev 3 месяца назад

    Really nice video.

  • @Ss-zg3yj
    @Ss-zg3yj 3 месяца назад

    I am pleasantly surprised. Thanks

  • @mdahiemstra
    @mdahiemstra 3 месяца назад +1

    Nice vid but I still have some concerns hosting nextjs on kubernetes with a cdn in front; on-demand cache invalidation is still a pain regarding the rsc requests which are also cached on the cdn. There is no way in the framework itself to disable the _rsc param. Since the value of the param contains react router state its also polluting the cache allot ending up in bad cache hit rates. I am forced to manage my own cache keys at cdn level now and invalidate based on tags instead of urls (which is actually fine) but i still would like to see nextjs opening up for users that want some more control regarding this topic. Also controlling cache headers (yes also the stale-while-revalidate header). I now do this with middleware but it feels hacky.

  • @allierobinson4474
    @allierobinson4474 3 месяца назад

    You dropped this……. 👑

  • @bluestar-on-yt
    @bluestar-on-yt 29 дней назад

    Thanks for the vid. Under vercels pro plan how many sites can be hosted / or much monthy traffic can it approx handle?

  • @electroheadfx
    @electroheadfx 2 месяца назад

    Thanks a lots Lee !

  • @animeverse5912
    @animeverse5912 3 месяца назад +1

    What are the trade offs for hetzner?

  • @SharfazSairaz
    @SharfazSairaz 2 дня назад

    @leerob thanks for the video. Really appreciate. I have NextJS 15.1 app, hosted on both Vercel and Self hosted. Everything works on Vercel. But on self hosted with apache server, everything works except Parallel routes. I have three Parallel routes in my dashboard and I get error cannot read the chunks. But chunks are generated. Does Parallel routes works on Self host environment?

  • @carlosricardoziegler2650
    @carlosricardoziegler2650 Месяц назад

    Nice, can you record and share insights baout same approach with turborepo ?

  • @alejandroechavarria539
    @alejandroechavarria539 3 месяца назад

    Great video!!!

  • @ransomecode
    @ransomecode 3 месяца назад +1

    Is there a way to a host a site on Vercel without needing edge deployment. I got a regional site that doesn't necessary benefit from hosting on the edge.

  • @asadsalehumar1011
    @asadsalehumar1011 3 месяца назад +1

    Lee is the new Dan Abramov

  • @bordeo
    @bordeo 3 месяца назад

    thank you Lee. Can you share the excalidraw diagram?

  • @spidfair0
    @spidfair0 3 месяца назад

    Very useful information. One thing that is unclear to me is cache persistance across deployments. Would next.js's default cache handler be able to re-use data, cached from a fetch request with revalidate timer from a previous deployment, when a new docker instance is created? If not, what would I need to do to achieve this?

  • @studiomonty
    @studiomonty 16 дней назад

    Does Coolify's NextJS template use this exact method? Thanks for this video.

  • @codedusting
    @codedusting 2 месяца назад

    I have a question. During all internal meetings, the backend framework is picked up as NestJS. Is there anything NextJS cannot do which Nodejs framework like NestJS in scalable apps?

  • @kamleshpaul414
    @kamleshpaul414 Месяц назад

    how did you handle migration when new database and update column

  • @Showmatic
    @Showmatic 3 месяца назад

    Very nice, though I prefer using VSCode's SSH capabilities so I can work on the server files in the application UI vs a terminal.

  • @asimalqasmi7316
    @asimalqasmi7316 3 месяца назад

    I appreciate you Lee 🌟🌟🌟🌟🌟

  • @virtual5754
    @virtual5754 2 месяца назад

    Can there be some memory leak in next itself? I noticed on different projects of different size and load that they all start (or restart) with very small memory consumption. But after few months of running they all take few gb memory regardless of number of pages and visits per day.
    All projects in question are fully static with on demand revalidation and daily isr. Data is cached on request level

  • @vinialves12362
    @vinialves12362 3 месяца назад

    You're the best!

  • @xav_624
    @xav_624 3 месяца назад

    I can''t decide what i like more : Framer Motion or Lee ? 😄

  • @minhhieple6483
    @minhhieple6483 3 месяца назад +1

    Thanks about your content, what if i want to setup CI/CD. For example auto deploy with github and github action ?

  • @Michael-Martell
    @Michael-Martell 3 месяца назад

    This is awesome.

  • @TomasJansson
    @TomasJansson 3 месяца назад

    Awesome stuff Lee, thanks for sharing! One question though. As I understand it caching on a CDN is not something you would do if you also want to support PPR? I guess for that to work you do need to hit the server so it can assemble the content from the cache in nextjs together with whatever content that is streamed in a suspensed component. Correct?

  • @arpitbhalla
    @arpitbhalla 3 месяца назад

    Awesome Video

  • @zackaryzhang
    @zackaryzhang 2 месяца назад

    What theme is used for vscode endpoints, can you share?It's nice to see.😂

  • @ArunKumar-gx8iv
    @ArunKumar-gx8iv 3 месяца назад

    amazing content