xonecas.io
8356
Wx

www-xonecas-io / commit a9c5698

dev server listens on every interface, for the host (1013)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 a9c5698e901d9a21cfa00f0a5352b06a7f4f7129 parent 92b31a0

2 files changed

cmd/site/main.go+3−3
@@ -3,7 +3,7 @@
33 // site import [-sources sources.txt] [-store repos] [-jobs 8] [-meta data/meta.json]
44 // site index [-sources sources.txt] [-store repos] [-overrides overrides.txt] [-meta data/meta.json] [-out data/projects.json]
55 // site build [-data data/projects.json] [-out public] [-tailwind bin/tailwindcss]
6-// site serve [-dir public] [-addr 127.0.0.1:8080]
6+// site serve [-dir public] [-addr :8080]
77 package main
88
99 import (
@@ -77,9 +77,9 @@ func main() {
7777 log.Printf("built %s into %s", *data, *out)
7878 case "serve":
7979 dir := fs.String("dir", "public", "folder to serve")
80- addr := fs.String("addr", "127.0.0.1:8080", "listen address")
80+ addr := fs.String("addr", ":8080", "listen address, on every interface so the host can reach the VM")
8181 fs.Parse(os.Args[2:])
82- log.Printf("serving %s on http://%s", *dir, *addr)
82+ log.Printf("serving %s on %s", *dir, *addr)
8383 log.Fatal(http.ListenAndServe(*addr, http.FileServer(http.Dir(*dir))))
8484 default:
8585 fmt.Fprintln(os.Stderr, "usage: site import|build|serve [flags]")
tickets/1013-dev-server-should-be-reachable-from-the-host.md+15−3
@@ -2,11 +2,23 @@
22 id: 1013
33 title: dev server should be reachable from the host
44 type: bug
5-status: todo
5+status: blocked
66 priority: p2
77 created: 2026-11-08T01:43:32Z
8-updated: 2026-11-08T01:43:49Z
8+updated: 2026-11-08T02:32:33Z
99 source: human
10-moves: 2026-11-08T01:43:44Z inbox doing drag; 2026-11-08T01:43:49Z doing todo drag
10+moves: 2026-11-08T01:43:44Z inbox doing drag; 2026-11-08T01:43:49Z doing todo drag; 2026-11-08T02:31:20Z todo doing drag; 2026-11-08T02:32:33Z doing blocked agent
1111 ---
1212
13+
14+## Notes
15+
16+- 2026-11-08 02:32Z (agent): Blocked on the VM's firewall. The code side is done.
17+
18+ DONE: 'site serve' (and 'make serve') listens on :8080, every interface, instead of 127.0.0.1:8080. In the VM, http://192.168.122.10:8080/ answers 200. It's running now.
19+
20+ BLOCKED: ufw in the VM denies incoming traffic except 22 and 5900, so the host still can't reach 8080. My attempt to open the port was refused by my permission settings ('ufw allow from 192.168.122.0/24 to any port 8080 proto tcp'), and I didn't work around it. Options:
21+ (a) Allow that rule for me, or run it yourself. It opens 8080 to the VM's local network only (RECOMMENDED). Your automation recreates the VM, so the rule won't survive a reset unless the automation adds it.
22+ (b) No firewall change: from the host, 'ssh -L 8080:localhost:8080 vm', then open http://localhost:8080. Port 22 is already open.
23+
24+ NOT CHECKED: an actual request from the host. I can only test from inside the VM.