Touch Grass Later · Architecture Flow

Visiting mybuggy.dev

Every network hop, firewall check, TLS handshake, and backend service involved when a visitor loads mybuggy.dev or its subdomains on Amazon Lightsail (Sydney, ap-southeast-2).

← Back to mybuggy.dev
1

Browser & .dev HSTS Preload

Client

You type mybuggy.dev into your browser.

  • The .dev top-level domain is HSTS-preloaded, so modern browsers automatically upgrade requests to https:// on port 443.
  • If a non-HSTS client connects over plain HTTP on port 80, Caddy issues a 308 permanent redirect to HTTPS.
2

DNS Resolution

Public DNS

Your DNS resolver looks up the A record for mybuggy.dev (or its subdomains).

  • Resolves to the Amazon Lightsail Static IPv4 address for the Ubuntu-01 server.
3

AWS Lightsail Firewall

ap-southeast-2a

Traffic reaches the Ubuntu-01 instance (nano_3_2, Ubuntu 24.04 LTS, 1.0 GiB swap).

  • Port 443/tcp & 80/tcp: Open to 0.0.0.0/0 and ::/0 for HTTPS traffic, redirects, and ACME challenges.
  • Port 22/tcp: Restricted to the owner's SSH allowlist and Lightsail browser SSH.
  • Internal ports (3001, 3002): Blocked from the public internet.
4

Caddy Reverse Proxy & Auto-HTTPS

systemd: caddy

Caddy v2.11.9 terminates TLS and inspects the Host header against /etc/caddy/Caddyfile.

  • Automatically obtains and renews Let's Encrypt certificates via ACME http-01 challenges.
  • Negotiates HTTP/2 and advertises HTTP/3 (alt-svc: h3=":443").
5

Backend Target Selection

Localhost Isolated

Caddy routes the request either to static disk files (zero extra RAM) or a localhost-bound Docker container:

mybuggy.dev

Caddy file_server reads /opt/apps/landing/root/index.html directly from disk.

flowchart.mybuggy.dev

Caddy file_server serves this page from /opt/apps/landing/flowchart/index.html.

app1 / app2.mybuggy.dev

reverse_proxy 127.0.0.1:3001 or :3002 → nginx:alpine Docker containers.

6

Response & Supervision

200 OK

Caddy streams the encrypted HTML response back to your browser.

  • systemd supervises Caddy (logs via journald) and Docker Engine (restart: unless-stopped, json-file log rotation).
  • Automatic OS security updates run via unattended-upgrades.