Self Host 101 - Run Multiple Apps with Caddy | DNS, Static Sites, Reverse Proxies and Let's Encrypt

preview_player
Показать описание
In this video CJ shows you how to setup DNS records for domains and subdomains with Cloudflare and how to set up, configure and host multiple types of applications with Caddy Server.

00:00 Intro
00:56 Domain Purchase and DNS Setup
02:43 Creating DNS Records
04:32 Query DNS Records with dig
07:50 www subdomain record, CNAME records and TEXT records
10:19 Email forwarding and a catch-all address
11:23 DNS Resources
12:13 SSH to your VPS with a Domain Name
13:08 Responding to HTTP Requests from our Server
16:27 Web Server Software
18:12 Why do we need a Web Server?
19:05 How To Navigate The Caddy Docs
21:32 Caddy Architecture / reloading configuration
22:35 Install Caddy
24:17 Set up https for the root domain
25:39 Redirect IP to the root domain
27:21 Multiple Caddyfile Setup
31:41 Redirect www subdomain to root domain
34:15 Set up /var/www folder
39:05 Transfer files to the server with scp
40:35 Sync a folder with rsync
42:31 Clone a public git repo
44:44 Hide files from Caddy file_server
46:08 handle_errors in the Caddyfile
47:46 Clone private git repos with an SSH deploy key
54:03 Set up Holidays API Example
56:37 Create a reverse_proxy with Caddy
1:00:45 Manage long running processes with pm2
1:09:52 Run a static website that has a build process
1:14:44 Caddyfile concepts and Logging
1:17:12 Common Caddyfile patterns including SPA redirects
1:18:15 Thanks!

Example sites:

------------------------------------------------------------------------------

Hit us up on Socials!

#vps #webdevelopment #selfhosted
Рекомендации по теме
Комментарии
Автор

00:56 Domain Purchase and DNS Setup
02:43 Creating DNS Records
04:32 Query DNS Records with dig
07:50 www subdomain record, CNAME records and TEXT records
10:19 Email forwarding and a catch-all address
11:23 DNS Resources
12:13 SSH to your VPS with a Domain Name
13:08 Responding to HTTP Requests from our Server
16:27 Web Server Software
18:12 Why do we need a Web Server?
19:05 How To Navigate The Caddy Docs
21:32 Caddy Architecture / reloading configuration
22:35 Install Caddy
24:17 Set up https for the root domain
25:39 Redirect IP to the root domain
27:21 Multiple Caddyfile Setup
31:41 Redirect www subdomain to root domain
34:15 Set up /var/www folder
39:05 Transfer files to the server with scp
40:35 Sync a folder with rsync
42:31 Clone a public git repo
44:44 Hide files from Caddy file_server
46:08 handle_errors in the Caddyfile
47:46 Clone private git repos with an SSH deploy key
52:16 Install node.js with nvm
54:03 Set up Holidays API Example
56:37 Create a reverse_proxy with Caddy
1:00:45 Manage long running processes with pm2
1:04:07 Run a TypeScript node.js API
1:09:52 Run a static website that has a build process
1:14:44 Caddyfile concepts and Logging
1:17:12 Common Caddyfile patterns including SPA redirects
1:18:15 Thanks!

syntaxfm
Автор

Please, please, please continue this series! Subjects I'd love to see:

- How to configure things like logging and errors for "globally", so you don't need to configure it separately for each and every site
- Any way to limit repetition in the setup? Saw someone mention something with the @-character in a comment?
- Safe and easy ways to auto-deploy from git when pushing to a branch? Both for plain static sites, ones requiring a build step, and custom (e.g. node) servers

Svish_
Автор

This is seriously top quality content on YouTube. Amazing work as always CJ and the Syntax team!

armaandhanji
Автор

I don't think I've ever watch a clearer, easy to understand and to digest youtube video. Ive loved every bit of it. Il be following you everywhere!

ConstantinChirila
Автор

This is what I need. Please for the next video, guide for securing your server from DDOS, etc. Thanks CJ

vincentpena
Автор

Not gonna lie, this series should be behind pay wall. Absolutely amazing 👍👍

StrMsk
Автор

Gotta say, these are amazing videos. It's so hard to pick the right level of abstraction to learn these topics. CJ's approach to "We're learning here at this level to move the tutorial forward, but if you wanted to dig deeper, here's 30 seconds on DNS records" is an amazing way to teach. Also, the netcat trick is so fun and a good illustration of how two computers "talk" to each other. The HTTP protocol is *just text*.

rasliche
Автор

This is great!! I feel like no one has made decent content about this thank you!!

jakedobler
Автор

I just love how you explain everything. Please keep this up. It's such a good material and the amount of work and care put into it is visible through and through

rodrigojuliani
Автор

Most comprehensive Caddy tutorial so far

adhecson
Автор

I have been doing this type of work for years, yet I learned so many little tricks on this video, insane quality

antoinelebaux
Автор

CJ is the teacher I wished I had in my entire time in university! Thank you, CJ

Sezar_SZ
Автор

now we need a video of docker + Caddy and setting up a remote build server with automated deploys instead of having to git clone.

jonathankurtis
Автор

I have been looking for resources to understand how to hosts applications without all the SAAS's and this series has been a gold mine, thank you so much! If you could further expand on setting up something like continuous deployment automatically via pipelines like github actions that would be amazing.

matez
Автор

these videos are just GOLD, thanks CJ !

zhanezar
Автор

Hey CJ! Just wanted to thank you for this. Caddy is awesome!

Even more powerful when combined with community modules. I'm using a _caddy-dns_ module to do wildcard certificate via a DNS challenge. I'm using that same module to also run Dynamic DNS! Swifty!

codeman-dev
Автор

Man, thank you for these videos. They're great. Tinkering is a lot of fun!

pjos
Автор

Great tutorial! Thanks for taking the time to explain it in such great detail while still being easy to understand!

flwi
Автор

Awesome video! Followup video idea: using Caddy as a reverse proxy for docker containers. 👌🏻

sergeif
Автор

Love the series!
Looking forward to seeing solutions for better isolation between the apps. E.g. nested virtual servers, Docker, etc.

amir-ziaei