Course Overview
Locked video preview

Paid video

Please purchase the course to watch.

Setting up a secure VPS

DNS and reverse proxy with caddy

Here is a summary of the video transcript:

  • Secure Server Setup
    The server is secured using SSH with a private key and password. Administrative access requires proper authentication before configuring domain routing.

  • Domain Name System (DNS) Fundamentals
    DNS translates human-readable domain names into IP addresses. An A record maps a domain to an IPv4 address, AAAA maps to IPv6, CNAME creates aliases, and MX handles email routing. DNS changes propagate globally and are controlled by TTL settings.

  • Pointing a Domain to a VPS
    A subdomain is configured in Cloudflare by creating A and AAAA records pointing to the VPS IP address. This connects the domain to the server infrastructure.

  • Reverse Proxy Concept
    A reverse proxy acts as a single entry point for incoming traffic and routes requests to applications running on different ports. It hides internal ports, enables multiple applications on one server, and simplifies domain-based routing.

  • HTTPS and Security Management
    The reverse proxy manages SSL/TLS certificates, enabling HTTPS by default. It also enhances security by preventing direct exposure of internal services and can support load balancing.

  • Using Caddy as Reverse Proxy
    Caddy is selected due to its simplicity, single-binary deployment, built-in reverse proxy, and automatic HTTPS via Let's Encrypt. It is written in Go and provides configuration validation utilities.

  • Installing and Running Caddy
    Caddy is installed on a Debian server via package manager. It runs as a systemd service, and its configuration file defines domain routing behavior.

  • Configuring Domain Routing with Caddy
    The Caddyfile is updated to bind the configured subdomain. After restarting the service, the domain successfully resolves with HTTPS and a valid certificate.

  • Next Deployment Steps
    The next steps include installing PostgreSQL, deploying the application binary, and managing it with systemd to make the application fully accessible online.