Self-hosting, sanely: the stack you run yourself

Volumes, ports, your own Git and CI, metrics and logs, one sign-in, local models, vector memory, agents with a shell.

After this course: run a self-hosted stack you can back up, expose safely and keep current: know which volume holds what, why a published port goes around your firewall, what each tool's licence lets you do, and which defaults leave a door open

12 lessons, 136 minutes of reading. $69, yours for good.

  1. Your stack is its volumes (free): The stack runs. Nineteen named volumes sit in `docker volume ls`: authentik-postgres, gitea, gitea-db, grafana, loki, node-red, ollama, open-webui, prometheus, qdrant, woodpecker-server and more. Nobody could say which ones would hurt to lose. Back up volumes, not containers, and know what each one holds before you need it back.
  2. A published port goes around your firewall: ufw says only SSH is allowed in. Yet the Grafana you started with `-p 3000:3000` answers from another machine. Publish a port only where it must be reachable: bind to 127.0.0.1 by default, and let one reverse proxy face the network.
  3. Your own Git: Gitea, and getting it back: The Gitea container is upgraded, and the repositories are fine. The users, issues and pull requests are gone. Back up the repositories and the database together, from a stopped or quiet instance, and practise the restore.
  4. CI you host: Woodpecker, and what the agent can touch: Self-hosted CI is green on every push. Months later you find a test file that CI never ran. Make CI fail when a test is not on its list, and treat a CI agent as root on its host.
  5. Metrics: Prometheus, and the label that ate the disk: Prometheus ran happily for a month. Then its disk filled, and the queries crawl. Label by things with a few values (service, status, method), never by things with unbounded ones; and choose your retention on purpose.
  6. Logs: Loki, and a collector that reached end of life: The `promtail` container still ships logs to Loki every day. Nothing looks wrong. A tool in your stack can stop being maintained while it keeps working. Check the life of each component, not only whether it runs.
  7. Grafana: a dashboard nobody reads, and an alert that reaches a person: Grafana has twelve beautiful dashboards. The service was down for six hours and nobody knew. For each thing that matters, one alert that reaches a phone, that fires only when something stays wrong, and says what to look at.
  8. One sign-in in front of everything: Authentik: Each self-hosted app has its own login, half of them with the default admin password nobody changed. Put one identity provider in front of every app, and still have each app check who is calling.
  9. Node-RED: an editor anyone on the network can deploy from: Node-RED wires your home automations together beautifully. Anyone on the Wi-Fi can open the editor and change them. Turn on the editor's login before Node-RED is reachable by anyone but you, and keep its credentials key somewhere you will not lose it.
  10. Local models: Ollama, Open WebUI, and the port with no password: You set OLLAMA_HOST=0.0.0.0 so Open WebUI in its container could reach Ollama. It worked. So could everyone else. Keep Ollama on localhost or a private Docker network, and let only the app that needs it reach it.
  11. Vector memory: Qdrant, and when one SQLite file is enough: The tutorial says an AI app needs a vector database, so Qdrant is running. It holds four thousand vectors and is open to the network. Choose the smallest store that answers your queries, and turn on authentication before anything else can reach it.
  12. Agents with a shell: OpenHands, and the walls you give it: The coding agent finished the task. It also rewrote a file outside the project folder you meant it to work in. Give an agent exactly one writable folder, no Docker socket, and a UI bound to localhost.

Every course