Home Cloud: Module 4

Module 4

Running services at home

A “service” is a program that listens for network requests and responds — a web page, an API, a database. At home, the same concepts apply as in the public cloud; only scale and exposure differ.

Ports & listeners

An IP identifies the machine; a port number (e.g. 80 for HTTP, 443 for HTTPS) identifies which program should handle the connection. Only one process should listen on a given IP+port combo at a time.

When you “visit” a site, your browser opens a connection to that server’s IP (via DNS) on port 443 for HTTPS. Locally, developers often use http://localhost:3000 — same idea, different port.

Static sites & simple HTTP

A static site is HTML, CSS, JS, and assets served as files — no server-side rendering required. Coffee Home’s desktop is largely static HTML; Coffee Pro still serves it through a real http:// listener so embedded apps see a normal web origin.

Why not only file://? Browsers treat file URLs and HTTP URLs differently for security — cookies, some APIs, and cross-page fetches. A small local HTTP server (what Coffee starts for you) lines up with how real dashboards and LAN apps behave.

On your LAN you would still pick a host and port (e.g. http://192.168.x.x:8080) the same way — IP + port points at the program that should answer.

APIs vs pages

A web page is meant for humans in a browser. An API returns data (often JSON) for apps or scripts. Your home cloud might serve both: a dashboard UI plus endpoints a mobile app calls on the LAN.

Reverse proxies (Caddy, nginx, Traefik) sit in front of many small services, terminate TLS, and route homeassistant.local vs photos.local — a pattern you will meet when you outgrow a single listener on one port.

Containers (one sentence)

Docker and friends package an app with its dependencies so it runs the same on Pi or PC. Not required for Coffee Academy HTML, but most modern homelab guides assume you will touch containers eventually.

Tie-in: Coffee Home as a launcher

The desktop’s dock and grid load URLs in iframes — a composition layer. Under the hood, each “app” is still normal web content. When you later point those URLs at http://your-server.local:port, Coffee Home becomes a literal home dashboard.