00:00 Intro 00:56 What can you do with Coolify? 02:09 Coolify minimum specs required 02:59 Create a VPS with Hetzner and Set Up with Cloud Config 06:16 ssh into VPS as root and update / upgrade 07:18 Install Coolify 08:29 Coolify: localhost vs remote server 10:25 Update VPS user passwords 11:51 Set up Coolify https instance domain and https wildcard domain 16:04 Why not Cloudflare? 16:41 Create a firewall and lock down all unused ports 17:47 Update Coolify user password and setup 2fa 18:49 Deploy a static website to Coolify with an https subdomain 20:55 www redirects and custom Caddy configs 25:25 Create dynamic proxy configurations 27:04 Create a basic Next.js project in Coolify 28:09 What is nixpacks? 29:37 Deploy a basic Next.js application with nixpacks 31:38 Create a Github application in Coolify 33:31 Deploy a Next.js app with auto deploy 35:41 Create a postgres database for a t3 application 37:10 Create a Dockerfile to push the db schema to our database 40:35 Create a Dockerfile to push the db schema from a private repo 44:46 Deploy a t3 app 47:10 Set up http basic auth with Caddy 51:01 Upgrade Coolify 52:06 Deploy a git repo with an existing docker compose file 59:26 VPS status dashboards 01:00:56 Deploy a service with docker compose 01:04:13 Deploy supabase and monitor VPS status during deploy 01:07:00 Set up minIO / s3 compatible storage 01:10:42 Configure database backups 01:15:17 Coolify cloud demo 01:18:37 Where and how to get help with Coolify 01:22:22 CJ's opinions and final thoughts about Coolify 01:28:20 Thanks!
hi , i am using Coolify as a remote server to deploy a git repo with docker-compose file , and it it not loading the docker-compose.yaml, but when I do it in local server it is working fine.
Great vid, but face and branding doesn't need to take up 30% of the screen. Way too big and compromises legibility of the important content for those of us with smaller screens.
For anyone following the tutorial from September 2024 and onwards, it seems Coolify now has an automatic way to set redirection in it's settings (compatible with caddy). Just add the two domains (www and non-www) in the domain text box like in the video and then in the "Direction" select box pick "Redirect to non-www." to get redirection working, no more looking into the docs to get the proper text config for this relative simple task. Great job simplifying that process Coolify team! Also big thanks Syntax for the great guide!
CJ, wanted to thank you, this has been hands down the best resource for me in setting up coolify and going live for the first time outside of github pages. Really felt the sentiment of your thoughts at the end, for me though as a primarily front end focused dev, coolify has felt like the magic answer to my worries about how intimidating self hosting felt, and not wanting to become reliant on something like vercel hosting, I felt stuck for a long time, so finding coolify and being able to setup my own vps without too much issue, I'm extremely happy. Again thanks to you for walking though so much and providing that extra context or info that docs can't always provide. Great video!
You're one of the best teachers I've ever seen. I swear any other youtuber talking about these topics would lose my attention every 10 seconds, but you, sir, have a special talent.
I think this is the best series I've seen in a while. So many opportunities... I've watched some home labs setups but nothing so deep. Thanks a lot for sharing.
This tutorial is incredible! You've shared your flyhacks and gone beyond just installing and deploying via repo (as on other youtube coolify tutorials). There are no words to describe my gratitude to you CJ!
Deploying apps has never been easier 😊thanks for a well planned tutorial ❤. But I was wondering if you could also do one where you deploy a mern app using vite on the client and mongodb and express on the server back end. How would u deploy this app and integrate them to communicate with each other? I would really appreciate it if you did a tutorial on it. Thank u
Hey CJ and Syntax team, thanks for putting this outstanding video together. It's very thorough and easy to follow. I've set up my Coolify before this video came out and had some difficulties understanding all the different configurations and settings within Coolify. This video shed some light on that and helped me understand how and what I can do with Coolify.
Very well explained, but still i have one doubt on how to allow my nodejs app running in docker container to access internet, basically i was calling one external API which is not working on coolify but working on my local and i have verified and checked, and hets on the conclusion that this is a network issue, can you please help me here, if you know something? Thanks
This is probably one of the greatest tutorial video ever done. So much wealth of knowledge given in such succient, upbeat and concise manner! Thank you! I'm attempting this right now and so far so good.
Can certainly be zero config. I spin up things all the time with one click.
5 месяцев назад
Thanks CJ! Another great video. Also appreciate the opinions at the end. You've covered so much already, but maybe it could be interesting to make a video covering the considerations and best practices when self hosting a production app with 2-3 services (like a service, db and a message queue). This could be like a summary or overview video for the series, tying it together.
I agree about managing docker compose and caddy. What would you say is the best way to do deploys on pr merging? I think that is the last magic I would consider using coolify on.
You could write some custom scripts or use something like Ansible and write playbooks that will run all the commands you need to deploy a certain PR, but compared to using Coolify that would be way more work. It's definitely interesting to explore and learn, but if you are not interested in doing something so manual, then yeah Coolify might be a better way to do.
This project makes it pretty easy to setup webhooks that can run a script in response to a received webhook: github.com/adnanh/webhook Another option is to create a github action that ssh's into a server to re-build / restart the app: github.com/appleboy/ssh-action
I'm a bit confused about the SSL part. You got a valid SSL certificate, where is the cert coming from? I didn't see any letsencrypt or any dns validation config. Is it a namecheap feature like cloudflare has?
I appreciate the opinion section. I use docker, docker-compose, and traefik for my personal server. While watching, i had the urge to get coolify up and running just for that pretty front end. I might still do it. Either way, for people just getting started with these technologies, im jealous that you have something like Coolify. Very cool tool and very informative video.
I'm feeling a bit stupid for asking but I have just recently installed on my proxmox a Ubuntu server instance and there I would like to run docker containers and within those docker containers for example databases. I could now install coolify and don't really have much of the hassle of managing the containers but I could easily spin up databases with the click of a button. Is my understanding correct? What about things like passing through GPU?
I appreciate the honest feedback at the end. You asked for new topics. I would be interested in kubernetes. I've heard good things about it at larger scale, but recently got aware that it's also handy for smaller projects. I like the fact that it's more iac. One thing I found discouraging in this video about coolio, was that everything was "click-ops" and I'm quite bad at remembering things. My dream scenario would be to spin up a vServer at hetzner with sth like terraform to get a one-instance kubernetes cluster and then just deploy the apps with kubernetes tooling all reproducible with code. Wdyt?
I am trying coolify right now. So, this tutorial helped me in a lot of ways. Also, would it make sense to bring docker (I have watched your other video) into this series and make a video about hosting multiple containers (for different stack like express app, nextjs, etc) in a VPS and setting them up with Caddy (with different domain name)? Plus CI/CD etc
Coolify is fantastic! I really appreciate this video. I'm looking forward to hearing your thoughts on Dokku next, it's such an amazing project. Plus, the person maintaining it, Jose Gonzalez, is super cool too!
Thank you. I've only used Railway and Vercel so far, so this video really helped me understand what setting up my own server looks like. Could you set up two servers in a future video to show us an example of how to work with multiple servers and synchronize them with multiple databases?
please anyone havean answer i have a docker compose with django + react apps how we can tell coolify to link the domain to the react app not to the django? i asked Chatgpt but I can't get the answer
Appreciate the opinion section at the end. It's easy to get carried away and just dive straight into using something like this out of ease of use. I agree, in the not to distant future this will be awesome.
The way you divide the relevant parts into chunks made it more easier to consume even those the video is long. This should be the standard format on how to make tutorial videos.
I don't think you should ever make a 1 min TTL. It's absolutely unnecessary and creates extra latency for domain resolution, without any real benefits. They are all being routed to the same IP and I doubt you are replacing the VPS' ip very often, if ever.
When first setting things up a 1 min TTL allows you to easily make changes without having to wait. After you are sure of your DNS settings, you can increase the TTL so domains are resolved quickly for your users.
By the way, in the coolify.caddy file ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-taJlPG82Ucw.html - It shows coolify realtime requiring port 6001, does that mean that port needs to be opened as well?
Hi CJ, Great job on this video! After listening to the syntax episode I tried coolifiy and I agree with your views at the end. I am very interested in how you would do this manually with just a server from 0 to production and what tools you depend on for this. If you already have videos on this I would love to view them. Thanks
I show the basics in these 2 videos: Setting up caddy - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mLznVlBAtcg.html Ways to get CI/CD on a VPS - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZG76DYUlCEs.html I have not gotten into more complex production tasks like load balancing, stress testing, log drains, monitoring / alerts, backups etc. but if there is enough interest, I might start to cover these types of things over on the Coding Garden channel. -CJ
You would probably disable the proxy within coolify settings and then manually configure caddy from there. BUT because coolify does a lot of magic to auto configure caddy for each site, I would not recommend running caddy separately.
Note on firewalls, and maybe this is a "duh." I'm building on my own internal computer, not a cloud-hosted VPS. Using split DNS so I can access internal with domain name and outside access. INTERNALLY, using UFW for firewall, does not actually block the ports that the Docker bits publish as open via IPTables. My internet router also has a firewall and does, of course, block access to any ports into the network that aren't specifically open. Meaning, *internally*, even with UFW only allowing 22, 80, and 443, I can still access 8000 any other port that a container publishes as open. *Externally*, only the ports I open are actually open to that machine. None of this is the fault of Coolify, but a know inconsistency with how UFW and Docker manage ports in IPTables. There are various workarounds/hacks if one is concerned about access behind the network/internet firewall.
I seem to be getting an error 500 everry time i try to change the instance domain: "There has been an error, we are working on it. Error: The string `` is no valid url." Any know what could be the cause of this?
These videos + coolify are a game changer. I don't have a reason to use vercel anymore. I'll still use fly, for some very specific elixir/phoenix stuff, but for everyething else: it's gonna be coolify from now on.
@syntax I noticed you have are big on security, I like that. What are your thoughts on using Coolify with unprivileged containers for a more secure setup? Would you suggest just modifying the yaml file? I am confused on how to do this with Docker containers / templates and/or github app installs. What do you think about Sysbox? Also, I noticed you have an update in your comments saying that you can create a non root user but it says int hat link it is an experimental feature, have you had any problems with this as non root user?
EDIT: never mind. I was trying to find it by scrubbing the video but then I found it w/ the bookmarks in the pinned comment. In what section is the firewall configured? I'm unfamiliar with Hertzner, is there a firewall to configure at that level or just a firewall on the machine itself?
Hands down, this has to be the best technical video on the internet right now. Sir you are an asset to the world and I thank you for what you have openly provided without a paywall to not only me but to everyone watching this. I hope that if you are ever in trouble or down in life, you are blessed with amazing luck and love.
I did my best to keep it approachable for beginners, but there are a lot of considerations to make when working with a VPS, so things can start to get complicated! If you want more foundational videos, definitely check out the earlier videos in this series: ru-vid.com/group/PLLnpHn493BHHAxTeLNUZEDLYc8uUwqGXa And also checkout my video on using Docker: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RHjXPN_h1YA.html
But atually even crazier is how a single person can do so much work ... I am working like crazy maybe 12 hours a day on programming but can't reach that level of greatness and I am doing it 4 years straight no break up, it's demotivating sometimes.
Brother, this is amazing quality content: I commend you on the quality of the information, the pacing, the depth, conciseness and clarity in your explanations and thought processes. Thank you.
I really dont understand the initial part about the user, I have installed coolify in a vps and created the user using the coolify panel, but the user created doesnt exist on the vps I cant even connect with it using ssh. You really need to create a more comprehensible tutorial
could you please go over how to use storage, this is an important step so the app data can persist and not reset after each restart/re-deploy? also if we add hetzner volume. PS, with the caddy setup and cloudflare dns with attack mode on and proxy enabled and ssl set to strict it seems to loop banned for bit.
53:35 "I didn't debug this for 2h" 😂 Those errors are the worst. I recently lost plenty of time because I used an env var wrong. Had the value quoted where it didn't need to be quoted and that was a tough one to spot.
I'm running into issues getting Cloud-init to create the initial "cj" user. When I ssh into the server it doesn't exist in /etc/passwd. Cannot figure what the issue is here
Very helpful one thing, how do I setup a persistent storage on coolify itself I struggled all day with this , cause on a new deploy all images are lost
Detail level: 10/10 Enthusiasm: 10/10 Brevity: 10/10 Honesty: 10/10 Thanks a ton for such a great video, @CJ! I have just come across your vids, and I will definitely subscribe for more. Keep it up man!
The private key I am using here is only used as a deployment key, it is not the private SSH key for the server itself. If the container was compromised, the attacker would be able to use the key to access my private git repo, but if the attacker already gained access to the container... they already have access to the code. This is why you should use unique deploy keys for each repo / deployment.
it's weird, i've noticed it never lets me restart sshd: Failed to restart sshd.service: Unit sshd.service not found but restarting ssh implements all the sshd config changes
Go to 'Configuration' in your resource and go down to the 'Danger Zone' tab. There should be a delete resource button. I struggled for a bit to find it too.
I'm looking at moving over all my side-projects to be hosted on a VPS instead of serverless/cloud providers. I think it would be straightforward with docker-compose + caddy (all of the apps are containerised), without needing something like Coolify. But the one thing that wouldn't work is that deployment would have to be mostly manual (SSH into the server, update the version in the docker-compose file, docker-compose up). Does anyone have a good system for automatically deploying on push (on the master branch) in Github?
@syntaxfm In your cloud-init you covered how you install updates and upgrades in an unattended way. Does this keep the System and other stuff like Docker actually recent or is this a one time thing, when cloud init Runs? It could be cool to modify the cloud init to update everything like with the pkg unattended-upgrades, but the configuration to receive e.g. Mails if there is an error would be handy. Maybe I am missing an easy way out?
After setting up domain to access coolify, Can we disable ip address from accessing coolify? For example, we access coolify using ip, but then we setup domain to access it, then how to block IP
This can be done with a dynamic caddy config. You can redirect requests to the IP address to a domain. I show how to do this at 25:25 - for example to set this up for an IP, specify 192.168.0.1 { redir example.com } in a dynamic config. - the http is important because you cannot have a TLS certificate for an ip address
You only need to set up redirects in one place. If your users are accessing your instance via cloudflare, it is perfectly fine to set them up there only. If users are accessing your coolify instance directly without cloudflare, you'd need to set them up in coolify.
Does coolify need 2 CPUs or 2 “cores”? Because coolify’s website also says it can be run on a raspberry pi which makes me think they are saying it needs 2 “cores”.
I think I would use coolify locally to manage a bunch of server. That way resources are not a problem and I can have multiple instances of my app on-premise but still have a way to control them.
That was my thought too, but wasn't totally sure if it needs to be always available or not. Either way, this is far more interesting than I thought it was!
Can't wait to view this all the way through, this is so useful 👍! You should really have the "Super thanks"-button here on RU-vid. I'm very excited about using Coolify, and everything just feels so smooth, I do find SSL to need a little more documentation, which is why I can't wait to dig deep into this episode ❤!