You expected localhost. You got localhost:8080, or a database on 15433, and the connection string in your notes no longer works. Local ports are quiet sources of confusion. Here are eight surprises.

  1. 80 is often taken. Another web server, a VPN client, a dev proxy. Flisk falls back to 8080 for HTTP and 8443 for HTTPS, and prints the URLs.
  2. 5432 is the usual Postgres collision. A database you installed last year is still listening. The fallback is 15433.
  3. The port is part of the URL. Copying an old URL without the port sends you to the wrong place.
  4. You can force the normal ones. FLISK_HTTP_PORT=80 flisk up asks for port 80. If it is busy, it will tell you.
  5. .localhost names help. api.my-project.localhost:8080 is easier to remember than ten numbers.
  6. A dry run shows the ports before anything builds. flisk up --dry-run prints them and ends with "Would run: tilt up".
  7. A stale stack keeps its ports. flisk down frees them. flisk up --force kills an old Tilt that still answers.
  8. Config files should not hard-code ports. Read them from the output, or from the gateway name.

Quick debug

Run lsof -i :5432 (macOS and Linux) to see who owns a port. Then decide: stop that process, or use the fallback.

Ports are not hard. They only need to be written down, and printed by the tool that picked them.