Skip to main content

Coolify Crash Course | Self Host 101 | Secure Set up

In this video CJ shows you what Coolify is, what it does, how to choose a server to deploy it to, how to lock it down with https, how to deploy several types of applications on it, how to setup s3 compatible storage for file uploads / backups and more.

View all the Self Host 101 videos here: https://www.youtube.com/playlist?list=PLLnpHn493BHHAxTeLNUZEDLYc8uUwqGXa


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!

List to episode 730 of Syntax: https://syntax.fm/show/730/own-your-own-paas Coolify: https://coolify.io/

Learn more about hetzner: https://www.hetzner.com/cloud/ Sign up for hetzner with coolify affiliate link (supports the coolify creator): https://coolify.io/hetzner

Cloud Config Example: https://gist.github.com/w3cj/cdd447b1a10ce741e4ee968fa6b75553 Cloud init documentation: https://cloudinit.readthedocs.io/en/latest/reference/examples.html

Learn about DNS in the Self Host Series: https://www.youtube.com/watch?v=mLznVlBAtcg&t=56s

Read the Caddy docs: https://caddyserver.com/ Read the caddy-docker-proxy docs: https://github.com/lucaslorentz/caddy-docker-proxy Caddy redir directive: https://caddyserver.com/docs/caddyfile/directives/redir

nixpacks: https://github.com/railwayapp/nixpacks How nixpacks works: https://nixpacks.com/docs/how-it-works nixpacks custom file: https://nixpacks.com/docs/configuration/file

Learn Docker: https://www.youtube.com/watch?v=RHjXPN_h1YA

Dockerfile to clone from private repo with SSH key: https://gist.github.com/w3cj/8b510e32ab568697ecb9b28597896b84

Caddy basicauth directive: https://caddyserver.com/docs/caddyfile/directives/basicauth

glances: https://github.com/nicolargo/glances glances docker docs: https://github.com/nicolargo/glances/blob/develop/docs/docker.rst grafana: https://grafana.com prometheus: https://prometheus.io/docs/introduction/overview/ node_exporter: https://github.com/prometheus/node_exporter Monitoring a Linux host with Prometheus, Node Exporter, and Docker Compose: https://grafana.com/docs/grafana-cloud/send-data/metrics/metrics-prometheus/prometheus-config-examples/docker-compose-linux/

minio: https://min.io/docs/minio/linux/index.html

Coolify cloud: https://coolify.io/pricing

Join the Coolify discord: https://coolify.io/discord Open an issue on Coolify: https://github.com/coollabsio/coolify/issues Have a discussion about Coolify: https://github.com/coollabsio/coolify/discussions

Corrections: 5:08 Since v4.0.0-beta.259 - coolify allows for a non root user with sudo NOPASSWD privileges. See description for link to docs: https://coolify.io/docs/knowledge-base/server/non-root-user