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.
- 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.
- 5432 is the usual Postgres collision. A database you installed last year is still listening. The fallback is 15433.
- The port is part of the URL. Copying an old URL without the port sends you to the wrong place.
- You can force the normal ones.
FLISK_HTTP_PORT=80 flisk upasks for port 80. If it is busy, it will tell you. -
.localhostnames help.api.my-project.localhost:8080is easier to remember than ten numbers. - A dry run shows the ports before anything builds.
flisk up --dry-runprints them and ends with "Would run: tilt up". - A stale stack keeps its ports.
flisk downfrees them.flisk up --forcekills an old Tilt that still answers. - 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.
