YouTube2Text

Coolify's NEW Dashboard Makes Self-Hosting Too Easy (Next.js + PostgreSQL) — Transcript

by ByteGrad · 4,802 words · 643 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Coolify version 4.3 is out, and this
  2. 0:02video we're going to talk all about it.
  3. 0:04So, in case you missed it, this version
  4. 0:07comes with a completely redesigned UI of
  5. 0:09the dashboard. So, previously we
  6. 0:11actually used Coolify in some other
  7. 0:13videos, and you could see that when we
  8. 0:15deployed something, the UI looked a
  9. 0:17little bit clunky. It did not look very
  10. 0:20modern, but they completely fixed it. I
  11. 0:22think it looks really slick now. So,
  12. 0:24I'll show you what it actually looks
  13. 0:25like in practice in a second. Of course,
  14. 0:28it's not only the dashboard UI that has
  15. 0:30changed. There are a few other
  16. 0:31improvements as well. For example,
  17. 0:33adding a custom domain is much easier
  18. 0:35right now, and a few other things as
  19. 0:36well. Now, in case you don't really know
  20. 0:38what Coolify is yet, it's basically a
  21. 0:40very easy way to self-host a lot of
  22. 0:43different services. For example, with
  23. 0:45one click essentially, I can self-host
  24. 0:47Postgres. But, we can also self-host our
  25. 0:49apps like Next.js. So, I did a video
  26. 0:52here on deploying Next.js with Coolify.
  27. 0:55This was about a year ago, and you can
  28. 0:56see it was a very popular video. So, now
  29. 0:58I want to see what the differences are,
  30. 1:00and how you would do it uh today with
  31. 1:02the latest version. If we go to the
  32. 1:05website, we can see a little bit more
  33. 1:06about what this is. So, we can
  34. 1:08self-host, and they're trying to
  35. 1:09basically replicate some of the popular
  36. 1:11managed platforms. Right? So, they have
  37. 1:14about 280 plus uh services that we can
  38. 1:17self-host. And it's actually really
  39. 1:18powerful. We can do a lot of different
  40. 1:19things. We can use all sorts of
  41. 1:21different frameworks, different
  42. 1:22languages. Um it can be your own server.
  43. 1:25So, in this video we will use a VPS. You
  44. 1:27can do a single server or even
  45. 1:29multi-servers. And basically, it works
  46. 1:32with any Docker compatible service. So,
  47. 1:34under the hood, Coolify basically uses
  48. 1:36Docker. We can integrate with your Git
  49. 1:38host. This is actually really nice for
  50. 1:40redeployment. So, if you make a change
  51. 1:42in your app, and you re-push to uh your
  52. 1:44Git host, it will automatically redeploy
  53. 1:46the app for you. You get free SSL
  54. 1:48certificates out of the box. We can just
  55. 1:50add our custom domain with HTTPS in
  56. 1:52front. Okay, so no vendor lock-in. We
  57. 1:55can set up automatic uh database backups
  58. 1:58with uh S3 compatible storage. We can
  59. 2:00integrate other services with web hooks.
  60. 2:03So, if you're using GitHub actions, for
  61. 2:04example, you can also integrate it with
  62. 2:06an API. There is actually a built-in
  63. 2:09real-time terminal as well. We can share
  64. 2:11our projects with our team. And if you
  65. 2:14want some kind of review workflow or
  66. 2:16staging workflow, you can deploy
  67. 2:19different pull pull requests separately.
  68. 2:21There are several automations and there
  69. 2:24is a bunch of monitoring built in as
  70. 2:26well. For example, we can see the logs
  71. 2:28as our app is being deployed. Very
  72. 2:30powerful and to actually demonstrate
  73. 2:32this to you, we're going to deploy a
  74. 2:34super simple Next.js app just by itself
  75. 2:37as the first app and then the second app
  76. 2:39will be an app with a database. So, you
  77. 2:42can see how you would self-host a
  78. 2:43full-stack app from absolute scratch
  79. 2:45with Coolify. But let's start off very
  80. 2:47simple with just the most basic Next.js
  81. 2:50app that you can think of. It's just one
  82. 2:52page. This is a one Next.js app. And
  83. 2:55what does it have? Well, it just
  84. 2:57displays a bunch of text, but it does
  85. 2:59use the Next.js image component. So,
  86. 3:01we'll see if that works on the VPS. It
  87. 3:03also has a server action. So, if I click
  88. 3:06on this, we want to see a response here
  89. 3:07from a server action. This is all
  90. 3:09running locally for now and also a route
  91. 3:11handler. So, we do have a little bit of
  92. 3:13interactivity here to see if these
  93. 3:15essential features will still work on
  94. 3:17the VPS as well. So, let's actually try
  95. 3:19deploying this with the latest Coolify
  96. 3:22to a VPS. For the VPS, I'm going to use
  97. 3:24Hostinger. Yes, I'm partnering with them
  98. 3:26on the video, but I like using Hostinger
  99. 3:28for this because they already have a
  100. 3:30Coolify VPS template out of the box. So,
  101. 3:32they're already familiar with what we
  102. 3:33want to do. They've had it for a long
  103. 3:35time actually, so they're pretty much on
  104. 3:37the cutting edge. But in case you're
  105. 3:38using a different VPS, I will still show
  106. 3:40you how to set it up without the
  107. 3:41template. Right, so I will actually just
  108. 3:43show you by starting off from SSHing
  109. 3:46into the VPS. But you may want to use
  110. 3:48Hostinger. A lot of people are using
  111. 3:49Hostinger not just for Coolify. There
  112. 3:51are actually a lot of other things we
  113. 3:53can host on the Hostinger VPSs as well.
  114. 3:56You've seen OpenClaw and Hermes Agent,
  115. 3:58for example. There's even Buzz now, so
  116. 4:01all these services keep popping up. And
  117. 4:03when you have a VPS ready to go, it
  118. 4:05makes it much easier to quickly try out
  119. 4:07those new things that are coming out and
  120. 4:09stay up-to-date. So, I think it's always
  121. 4:11a good idea to have a VPS ready to go.
  122. 4:13Well, if you want to use that, check out
  123. 4:14the link in the description. But if we
  124. 4:16scroll down for this video, we can see
  125. 4:19the different options they have. So,
  126. 4:20these are the options that Hostinger
  127. 4:22gives us for their VPS. Now, just to see
  128. 4:24what Coolify recommends as a minimum
  129. 4:26hardware requirements. So, they say your
  130. 4:28server should have at least two CPU
  131. 4:31cores, two gigs of RAM, and 30 gigs of
  132. 4:34free storage. Okay, so if we take a look
  133. 4:36at KVM 2 here, we do get two two V CPU
  134. 4:40cores, eight gigs of RAM, and 100 gigs
  135. 4:42of NVMe disk space. So, not exactly the
  136. 4:45same, of course, V CPU and it's NVMe,
  137. 4:48but I've used this plan for uh other
  138. 4:50videos as well. I've always had a good
  139. 4:52time with that. But in case you are
  140. 4:54anticipating heavier workloads or a lot
  141. 4:56of people that have to connect, for
  142. 4:57example, you may want to check out some
  143. 4:59of these more powerful plans. For this
  144. 5:01video, I'm going to continue here with
  145. 5:02KVM 2. All right, on the checkout page,
  146. 5:04you can use my coupon code, which is all
  147. 5:07uppercase bytegrad, and if you apply
  148. 5:09that, you can get an even better price.
  149. 5:11I would really appreciate it. Uh so,
  150. 5:13that's all uppercase bytegrad, and uh
  151. 5:15you can find a link in the description
  152. 5:17as well. That coupon code will work for
  153. 5:20both the 24-month plan as well as the
  154. 5:2212-month plan. So, if you think 24
  155. 5:25months is a bit much, you may want to go
  156. 5:26with 12 months and still get a bunch of
  157. 5:29savings. Although, 24 months does give
  158. 5:31the most savings, so that's the lowest
  159. 5:33monthly price here. You have some other
  160. 5:35options here. I will just leave the
  161. 5:36defaults. About the server location,
  162. 5:38they try to uh get it as close as
  163. 5:41possible to you personally. If you're
  164. 5:43hosting it for other people, you may
  165. 5:44actually want to host it closer to their
  166. 5:46location. And then here they have a
  167. 5:48bunch of options here to see how we want
  168. 5:50to deploy the VPS. Because I was on the
  169. 5:52Coolify page, I already have Coolify
  170. 5:54selected here. If you don't see it
  171. 5:55selected here, you can simply search for
  172. 5:56Coolify here under control panel. You'll
  173. 5:59see their template. However, I will
  174. 6:01actually go with a plain Ubuntu install
  175. 6:03because I want to show you how to
  176. 6:04install it from scratch. So, I will
  177. 6:06actually just have a plain OS, and I
  178. 6:08will just have a plain Ubuntu install uh
  179. 6:11just so I can show you how to set it up
  180. 6:13from scratch. However, if you are using
  181. 6:15hosting our VPS, and you want to use
  182. 6:16their template, feel free to pick the
  183. 6:18Coolify template. All right, then I will
  184. 6:20continue here to check out. All right,
  185. 6:21so after payment, you may go through an
  186. 6:23onboarding process. Actually, here we
  187. 6:25can pick the location. Um so, this is
  188. 6:27just closest to me. That's fine with me.
  189. 6:29And here we can pick what to install
  190. 6:30again. So, again, you may want to go
  191. 6:31with the Coolify template they have out
  192. 6:33of the box. You can search for it.
  193. 6:35However, I will just go with a plain
  194. 6:36Ubuntu install for this video. In that
  195. 6:38case, of course, it is very important
  196. 6:39that you remember your root password, so
  197. 6:41you can easily SSH into the server in a
  198. 6:43second. So, make sure you store it
  199. 6:45somewhere safe. They actually have a few
  200. 6:46other here as well. Okay, so here we can
  201. 6:49uh set up the VPS, and uh I'll get back
  202. 6:51to you when it's finished. All right, so
  203. 6:52after a few minutes, our VPS is ready to
  204. 6:55go, and you will see the information
  205. 6:57here. It may also install a little bit
  206. 6:59more. Okay, so VPS is created now. We
  207. 7:01can see the IP address of our VPS, and
  208. 7:04we can see that I'm just using the plain
  209. 7:07Ubuntu install. If you picked the
  210. 7:08Coolify template, you would see
  211. 7:10something like that. You would actually
  212. 7:11already see Coolify here at the top. But
  213. 7:13we're going to do it from scratch here
  214. 7:15with SSHing into the VPS. Now, just to
  215. 7:17quickly look around here, so we have our
  216. 7:19VPS details, so where it is. We have
  217. 7:21some other information here. Let's
  218. 7:23actually SSH into our VPS. So, I opened
  219. 7:26up the terminal app on my Mac, and I'm
  220. 7:28going to paste this right here. If
  221. 7:30you're on Windows, you can use the
  222. 7:31Windows PowerShell, but the commands are
  223. 7:33the same. Okay, so I'm going to say yes,
  224. 7:35and then the password that we picked
  225. 7:37during setup. I will paste that right
  226. 7:39here. All right, so now we are in our
  227. 7:41VPS. I'm going to clear this out. And
  228. 7:43actually, if you're using uh a coding
  229. 7:45agent like CloudCode on the VPS, you may
  230. 7:47actually just do it with this. We are
  231. 7:49doing it manually here, like old school,
  232. 7:51like 1 year ago.
  233. 7:52We need to install Coolify. So, if we go
  234. 7:54to the page there, they have self-host
  235. 7:55here, and they have a command here that
  236. 7:58we can run. So, I'm just going to copy
  237. 7:59this one on the website, and I will go
  238. 8:02back here and just paste that in here.
  239. 8:05All right, so here we go. We can see
  240. 8:06installing packages,
  241. 8:08pulling some Docker images. All right,
  242. 8:10here we go. Installation complete. If we
  243. 8:12scroll up a little bit, we can see your
  244. 8:15instance is ready to use. You can access
  245. 8:17Coolify through your public IP. So,
  246. 8:20basically, it's the IP of the VPS at
  247. 8:22port 8000. So, let's actually copy that,
  248. 8:25and let's try and go in there. All
  249. 8:27right, so here we have the Coolify
  250. 8:28onboarding. Make sure you're the first
  251. 8:29person here because this is going to be
  252. 8:31the the root or the admin user, you
  253. 8:33could say. All right, so after that, we
  254. 8:35continue the onboarding, and we're going
  255. 8:37to see the new UI here. So, this is
  256. 8:39already new. So, it says, "Welcome to
  257. 8:41Coolify. What are we going to set up?"
  258. 8:43Well, well, we can just click on
  259. 8:45connect, and we can just click on
  260. 8:46continue here. So, here they have the
  261. 8:48first option here,
  262. 8:50what kind of server type we have. So,
  263. 8:52where are we going to deploy this? You
  264. 8:55could technically have a different
  265. 8:57server, for example. However, we're
  266. 8:58going to do everything on this machine.
  267. 9:00Okay, once I click there, it was already
  268. 9:02able to connect, so we immediately go to
  269. 9:03step three here, in which we create a
  270. 9:06project. So, a project is just a way of
  271. 9:08organizing all the resources we're going
  272. 9:10to deploy. So, if we have a Postgres
  273. 9:12database server, that's one resource
  274. 9:14inside a project. The Next.js app is one
  275. 9:17resource inside the same project. Right,
  276. 9:19so we have one project here, and now we
  277. 9:21have that set up, so we can deploy the
  278. 9:23first resource. All right, here we go.
  279. 9:25So, now we are in the new UI here, their
  280. 9:28new dashboard. I think it already looks
  281. 9:31much more modern. Looks better. You can
  282. 9:33see, as of recording, I am on 4.3. But,
  283. 9:36let's take a here. So, here I am on
  284. 9:39dashboard. We can see all our projects.
  285. 9:41Well, we have one right now. We have not
  286. 9:43deployed any resources. We may have
  287. 9:45multiple servers, right? You may want to
  288. 9:47have Coolify on one server and then the
  289. 9:49actual app or database, for example, on
  290. 9:51some other servers. All of our projects
  291. 9:53here, right? So, only one. Of course, we
  292. 9:55have that terminal here. So, we can
  293. 9:57start a terminal session. We have
  294. 9:59servers here. We have sources. So, as
  295. 10:02you'll see when we deploy Next.js, we're
  296. 10:04going to first do it. We're going to
  297. 10:06connect to our Git host, which will just
  298. 10:08be GitHub in this video. It's going to
  299. 10:10be a private repo. We need to set up a
  300. 10:12source here for that, so it can connect
  301. 10:14to it. We have destinations here. We
  302. 10:16have S3 storage. So, if you want to do
  303. 10:18some backups, for example, this may be
  304. 10:20something you want to do. We have some
  305. 10:22shared variables.
  306. 10:24If you have a team, we can set up a team
  307. 10:26with members, even an admin view here.
  308. 10:28Yeah, you can set up notifications for
  309. 10:30your team. So, you can build out your
  310. 10:32workflows here. So, overall, it's it's a
  311. 10:34simpler here. So, the the sidebar used
  312. 10:36to have way more options, but it's now
  313. 10:38greatly simplified. Let's go out to our
  314. 10:40first project here and actually deploy
  315. 10:42that Next.js app. So, we're going to add
  316. 10:44one resource here. And we're going to
  317. 10:47have the app. We're going to push it to
  318. 10:49a private Git repository, right? So,
  319. 10:51let's actually go to our app and let's
  320. 10:53do that first. So, here is the app. Here
  321. 10:54is the code of the app. Let's deploy
  322. 10:56this to GitHub first. So, we will just
  323. 10:58say new new repository Next.js Coolify
  324. 11:024.3 demo. I'm going to make it a private
  325. 11:05repository. It's a little bit more
  326. 11:06realistic, right? We don't want to show
  327. 11:08our code to everybody in the world.
  328. 11:10Okay, creating repository. And now we
  329. 11:12can just push there. I will just
  330. 11:14copy those commands and just push this
  331. 11:17project to there. Okay, so now this
  332. 11:20should be here on GitHub. Okay, so now
  333. 11:23we have the project right here. How do
  334. 11:25we now deploy this here on Coolify? So,
  335. 11:27we have a few options here to deploy a
  336. 11:29resource. We can do public Git repo
  337. 11:31would be the easiest, but realistically
  338. 11:33you're going to shield your code in a
  339. 11:36private repo. You can do it with an SSH
  340. 11:38key. However, it is a little bit easier
  341. 11:40in my opinion to do it with a GitHub
  342. 11:42app. We just set up a GitHub app once,
  343. 11:44and then whenever you have some kind of
  344. 11:45GitHub repo, you can deploy it. If we go
  345. 11:47to that source
  346. 11:49to do it with a source. So, here we have
  347. 11:50sources. I can simply add a GitHub app
  348. 11:53here.
  349. 11:54I will just leave the default options
  350. 11:56here, and now we can register that with
  351. 11:58GitHub. So, here is all just default
  352. 12:00options, and we will be redirected here
  353. 12:02to GitHub to authorize this. Okay, so
  354. 12:04now we go back here to Qualify. It says
  355. 12:07repository access has not been installed
  356. 12:08yet. So, I'm going to click on install
  357. 12:10repositories. So, here we can now pick
  358. 12:12which repositories Qualify should have
  359. 12:14access to. We can just specify the one
  360. 12:17we just created. So, it just has access
  361. 12:19to that particular one. I'm going to
  362. 12:20install. All right, so now we are back
  363. 12:22here. So, our source is now set up, and
  364. 12:25it should have access to that one get
  365. 12:27repo. So, now we can go back here, and
  366. 12:30we can add a new resource. Okay, so now
  367. 12:32we have this one. We can go back to get
  368. 12:34repository here with GitHub app. We pick
  369. 12:37the one GitHub app that we just set up.
  370. 12:38We can now pick the repository. Well,
  371. 12:40there is only one, so we can load that
  372. 12:42one here onto Qualify on the onto the
  373. 12:44VPS. All right, so here it detects our
  374. 12:46app. It has Real Pack now as the
  375. 12:49default. Um so, this is different
  376. 12:51because previously we had Nix packs, and
  377. 12:53then by default port 3000. So, all of
  378. 12:55this by default in Next.js. Okay, so
  379. 12:57then we have the application specific
  380. 13:00details. So, if I zoom out a little bit,
  381. 13:02you can see some of the options we have
  382. 13:04here. We don't have to do almost
  383. 13:06anything for now. The only thing we have
  384. 13:08to do actually is go here and just click
  385. 13:10on deploy. Okay, so here we go. So, now
  386. 13:12it's going to deploy. We're going to see
  387. 13:14a history of all the deployments we
  388. 13:17have, very similar to some of the
  389. 13:18managed platforms that you're used to.
  390. 13:20We're going to see the logs here while
  391. 13:22it's building that out. And under the
  392. 13:24hood is actually going to dockerize our
  393. 13:26Next.js app. So, previously we were
  394. 13:28actually dockerizing Next JS ourselves,
  395. 13:30and then uh deploying it onto a VPS.
  396. 13:33However, uh Coolify is doing a lot of
  397. 13:34that work for us behind the scenes now.
  398. 13:37All right, so after a few minutes, it
  399. 13:38says it is finished. So, now we can go
  400. 13:40to links here, and it will produce a
  401. 13:42link for us. If we click on that, it
  402. 13:44should open up our app here live on the
  403. 13:47internet. So, we can see it uses an S
  404. 13:49slip domain here, but if we take a look,
  405. 13:51everything here works. We see the Next
  406. 13:53JS image, and actually, let's actually
  407. 13:55try it out to see if that is true. If we
  408. 13:57click on run server action, we do indeed
  409. 14:00get a response. If I click on this one,
  410. 14:02we also get a response here from our API
  411. 14:04route handler. So, some of the essential
  412. 14:07Next JS features seem to work perfectly
  413. 14:09fine here on the VPS uh deployed with
  414. 14:13Coolify as well. All right, very easy
  415. 14:15actually. Now, what happens if I want to
  416. 14:16make a change? So, if I go into my code
  417. 14:18here locally, and let's say I'm going to
  418. 14:20add a bunch of exclamation marks here,
  419. 14:22right? So, here in the code, I'm going
  420. 14:24to replace that period with a bunch of
  421. 14:25exclamation marks. So, now I'm going to
  422. 14:27save it. I saved it here, but this is
  423. 14:28locally on my own computer. How can I
  424. 14:30now redeploy? Well, if I just re-push,
  425. 14:32so if I just add everything, or you can
  426. 14:35use your AI coding agent, of course, and
  427. 14:37now I push to GitHub again. So, now I
  428. 14:40pushed to GitHub. If I now go back to
  429. 14:42the Coolify dashboard, you can see it
  430. 14:44automatically redeploys. So, when you
  431. 14:47set up that GitHub app, it can then also
  432. 14:49be updated by It can then also be uh
  433. 14:52notified essentially when your repo is
  434. 14:54uh being updated. And it will
  435. 14:56automatically redeploy. So, if I click
  436. 14:57on that one, we can see there is already
  437. 14:59a new deployment here in process. And
  438. 15:01this time it's much faster, you can see
  439. 15:03it took about 44 seconds uh because,
  440. 15:05well, uh it can do a bunch of caching
  441. 15:08when it builds uh the Docker image, and
  442. 15:10so on. So, initially it may be a bit
  443. 15:12slow, two and a a bit more than two
  444. 15:14minutes, but after that uh the re- the
  445. 15:15redeployments should be much faster. So,
  446. 15:18now if I refresh here, we see our update
  447. 15:21live in production as well. Now, it's
  448. 15:23not the prettiest URL here, so let's
  449. 15:25actually try connecting a custom domain
  450. 15:27and also HTTPS. So, here on Hostinger, I
  451. 15:30have my domain.
  452. 15:31It's called bitegradcourses.com. I just
  453. 15:33go to the DNS settings. So, here I can
  454. 15:36pick an A record and I'm just going to
  455. 15:39have it for the root. This should point
  456. 15:41to the IP of my VPS. So, if I go here, I
  457. 15:45can just see it here in the address bar.
  458. 15:47I will copy that and paste that right
  459. 15:49here. Just leave off the HTTP. So, this
  460. 15:52is going to point to the VPS. I'm going
  461. 15:54to add the record here. Okay, so now
  462. 15:56when I go to that, the traffic should go
  463. 15:58to my VPS and that should be picked up
  464. 16:00by Coolify here. Now, Coolify will see
  465. 16:02the incoming request and needs to know
  466. 16:04which app to route it to, right? Because
  467. 16:06technically, I could have dozens of apps
  468. 16:08here. So, here we can go to domains and
  469. 16:10here we can simply add one. So, I'm
  470. 16:12going to add it with protocol HTTPS and
  471. 16:14it's going to be bitegradcourses.com.
  472. 16:17I can leave the port empty and now I'm
  473. 16:19just going to save. Now, here it does
  474. 16:21warn me that there's no
  475. 16:23DNS record for this yet, but it simply
  476. 16:25may be just because it may take some
  477. 16:26time before it propagates. So, I'm just
  478. 16:28going to continue anyway. All right, so
  479. 16:30actually right after it does tell me DNS
  480. 16:32okay. And actually, it also has a nice
  481. 16:34option here. And actually, it also has a
  482. 16:35nice option here for search engine
  483. 16:37indexing and yes, I do want this to be
  484. 16:39indexable. And it also allows you to
  485. 16:41specify what it should do here with www.
  486. 16:44and actually, I want to redirect to the
  487. 16:45non-www version. Okay, so redirect is
  488. 16:48updated and we can see there are now
  489. 16:50some changes pending. So, this is really
  490. 16:53nice because previously, it was not
  491. 16:54really clear if we had to redeploy or
  492. 16:56not. Here, it does specify that we have
  493. 16:58to redeploy to apply that. We can
  494. 17:00actually see all the changes that we
  495. 17:02made. That's also really nice and it
  496. 17:04says redeploy required. Okay, so now I
  497. 17:06want to redeploy, so I will say
  498. 17:08redeploy. You can also manually trigger
  499. 17:10a redeploy here from the dashboard and
  500. 17:12here we go. We just have to wait. Well,
  501. 17:14actually super short, so 6 seconds now.
  502. 17:17That's very fast. And now if we go to
  503. 17:19links, we should see our custom domain
  504. 17:20here. Let's actually try going there.
  505. 17:23The HTTPS version may take
  506. 17:25a bit longer to kick in, but if I try
  507. 17:27the HTTP version, it will actually
  508. 17:30already show my app here on that custom
  509. 17:32domain. All right, so bike that
  510. 17:34courses.com seems to work perfectly fine
  511. 17:36here. I get the results still everything
  512. 17:38working. We just have to wait a little
  513. 17:39bit for HTTPS. Okay, so when you deploy
  514. 17:41with Qualify, it's using traffic under
  515. 17:44the hood to set up SSL or HTTPS. It
  516. 17:48didn't work for me initially because I
  517. 17:49still had some outdated records here
  518. 17:51because I've been using the domain for
  519. 17:52other videos as well. However, I
  520. 17:54actually tried adding a subdomain here.
  521. 17:56So I have another A record now for a
  522. 17:58subdomain also pointing at the VPS IP,
  523. 18:01and I set up that one here as well. I
  524. 18:04just did app one bike that courses.com.
  525. 18:07I just added that here. And then
  526. 18:09actually it was working for both the
  527. 18:11root as well as the subdomain. So the
  528. 18:13root domain now has HTTPS, as you can
  529. 18:16see. However, I can also go to app
  530. 18:18one.bikethatcourses.com,
  531. 18:20and it also works perfectly fine on the
  532. 18:22subdomain. So there you go, very easy to
  533. 18:24deploy Next.js with the latest Qualify.
  534. 18:27But that was an easy one, right? just
  535. 18:29one page. Let's very quickly take a look
  536. 18:31at how we could do it with a full stack
  537. 18:33app with a Postgres database. So I have
  538. 18:35this CRUD app running here locally, just
  539. 18:38a to-do's app here. I can click on add.
  540. 18:41We can click on done, undo, and done
  541. 18:43again. I can delete. It's using a SQLite
  542. 18:46database here locally. Okay, so now how
  543. 18:48can we deploy it with Postgres in
  544. 18:50production with Qualify? So I pushed it
  545. 18:52to a private repo again, and then here
  546. 18:55I'm going to go to that GitHub source.
  547. 18:57Here for the repositories, I'm going to
  548. 18:58also allow that particular repo as well.
  549. 19:02Save. So now we have access to that repo
  550. 19:04on GitHub as well. But first, we're
  551. 19:06going to deploy Postgres. It's actually
  552. 19:09a bit easier to do the database first.
  553. 19:10So we go to our project here. We're
  554. 19:13going to add a new resource in the same
  555. 19:15project. This time I scroll down, you
  556. 19:17can see all of the services that we can
  557. 19:19add here, right? So, lots and lots of
  558. 19:20services, but here we just want to have
  559. 19:22Postgres. I'm just going to go with the
  560. 19:24default option there, and I'll click on
  561. 19:26start. So, just the default options.
  562. 19:28It's literally a few clicks. It's going
  563. 19:29to pull the Docker image here, and now
  564. 19:33after a few seconds, it's already saying
  565. 19:35database started. By default, it sets up
  566. 19:37a username and password. The only thing
  567. 19:39that we need here, though, is the
  568. 19:41Postgres URL internal. This contains the
  569. 19:44password as well, so it's hidden by
  570. 19:45default. So, with this one running, now
  571. 19:47we're going to deploy a new resource
  572. 19:50again. It's going to be another Next.js
  573. 19:52app, new resource from a Git
  574. 19:55GitHub app, right? So, we just pick this
  575. 19:57one, and this time it's the to-do demo,
  576. 20:00right? So, we can load the repo.
  577. 20:03We will continue here. Before I deploy
  578. 20:05it, I will set up the environment
  579. 20:06variables. So, here we have an option
  580. 20:08for environment variables. I will add
  581. 20:10database provider. So, here in
  582. 20:11production, it should be Postgres. So,
  583. 20:14I'm using Prisma under the hood, and now
  584. 20:16it will know that to use Postgres, and I
  585. 20:18will add another one for the actual URL,
  586. 20:20so that Prisma can connect to that
  587. 20:23database. I'm going to add that one.
  588. 20:25Okay. Now, I can go back here. So,
  589. 20:28I made changes, so I need to save it,
  590. 20:29and then we can actually deploy. Okay,
  591. 20:32let's see how this will work. All right,
  592. 20:34so after a few minutes, it is ready
  593. 20:35again. Let's go to the link. All right,
  594. 20:37here we go. We have our app here. Let's
  595. 20:39actually see if we can submit it to do.
  596. 20:41Okay, I can submit it here. I can click
  597. 20:43on done, undo, and I can also delete it.
  598. 20:46Let's actually see what happens if I
  599. 20:48refresh here, so you can see as I
  600. 20:49refresh, we keep the data. What happens
  601. 20:52if I redeploy? Do we still
  602. 20:55get the data like before, right? Because
  603. 20:58we want to persist data, so the data
  604. 21:00should not be removed when we redeploy.
  605. 21:02And that's the real test there. So, I'm
  606. 21:03going to redeploy the app, and we'll see
  607. 21:05if this TST2 to do will be brought back
  608. 21:08from the database into the app again.
  609. 21:10Okay, after 9 seconds we have a
  610. 21:13redeployment here. If I refresh now, you
  611. 21:15can see we still get this data here. So,
  612. 21:18this seems to work perfectly fine here.
  613. 21:21A full stack app with a Postgres
  614. 21:22database here deployed with Coolify. Of
  615. 21:25course, I can enable HTTPS again with a
  616. 21:27custom domain just like before. We can
  617. 21:30also see the logs here. So, we can see
  618. 21:31runtime logs here actually. So, you can
  619. 21:34see some next JS logging. Let's actually
  620. 21:36go to the Postgres uh database. So, here
  621. 21:39we have Postgres. Here we can see
  622. 21:41runtime logs. So, here we can also see
  623. 21:43Postgres up and running. And that's how
  624. 21:46easy it is to deploy full stack
  625. 21:48applications or all the other services
  626. 21:50that Coolify offers as well. I would say
  627. 21:52set up a Coolify instance on a VPS and
  628. 21:55you can go through the catalog of
  629. 21:57services that Coolify offers out of the
  630. 21:58box. And you'll see how easy it is to
  631. 22:01set up and deploy those services. In any
  632. 22:03case, check out Hostinger's VPS with the
  633. 22:05link in the description and my coupon
  634. 22:07code all uppercase bytegrad. I would
  635. 22:09really appreciate it. There's all these
  636. 22:10new things coming out. So, it's always a
  637. 22:12good idea to have a VPS ready to go at
  638. 22:14any moment. So, it's not just for
  639. 22:16Coolify. You may want to try other
  640. 22:18things later as well. You can find the
  641. 22:20link in the description. In any case,
  642. 22:21thank you for watching and I hope to see
  643. 22:23you in the next one. Bye.

About this transcript

This page contains the full transcript of Coolify's NEW Dashboard Makes Self-Hosting Too Easy (Next.js + PostgreSQL) by ByteGrad, generated from the public captions YouTube serves with the video. The transcript has 4,802 words across 643 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.