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

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.

Watch the 1st video on setting up a VPS here: Watch the 2nd video where CJ answers your questions here: View all the Self Host 101 videos here:

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
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!

DNS on Wikipedia - Cloudflare DNS - dig (command) -

Cloudflare Email Routing -

How DNS Works Zine - Mess with DNS - a simple DNS lookup tool -

netcat -

Comparison of web server software - Apache HTTP - nginx - traefik proxy - Caddy Server - Listen to Syntax Episode 340 -

Caddyfile Reference - Caddy Architecture - Keep Caddy Running -

Install Caddy -

Caddyfile root - Caddyfile file_server - Caddyfile redir - Caddyfile Common Patterns redirect www -

ln (command) -

chown command -

Caddyfile file_server hide - Caddyfile handle_errors -

Generate an SSH key - Github deploy keys -

Node Version Manager -

Caddyfile reverse_proxy -

Run node.js with systemd - pm2 -

Caddyfile concepts - How logging works in Caddy - Caddyfile SPA redirect -

Example sites: - Holidays API - Express API Starter TS - Big Timer -