Lion Cipher Lab

Harden an exposed local Ollama server: prove what 0.0.0.0 gives a stranger, then put an authenticating Caddy proxy in front

Why it matters

People who run a local model often want to reach it from a laptop, a phone or a container. The quick fix is to tell Ollama to listen on every network address. Ollama's own documentation says its local API does not require authentication, so after that change anyone who can reach the machine can list the models, run them on your hardware, copy them, delete them, or ask the server to download new ones. The same mistake shows up whenever a developer tool built for one machine gets a network address. The safe pattern is old and simple: keep the tool on the loopback address and put a small,…

What you'll learn

Steps in this lab

  1. Start from the default: private by location, not by password
  2. Open it up on purpose, for one minute, and see what a neighbour can do
  3. Install Caddy and make a password hash
  4. Write the Caddyfile: authenticate, then forward
  5. Put Ollama back on loopback, then test every door with curl
  6. A password still opens every endpoint: add a path allow-list
  7. Basic auth over plain HTTP is not secure: add TLS
  8. What this still does not give you
  9. Clean up

Open the full interactive lab →

Keep learning