From a8206012aec1fa405e35e4d49f27f154f267ce1f Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Thu, 11 Jun 2026 17:24:47 -0700 Subject: [PATCH] dev: make the dev-server bind host opt-in via SOULSYNC_WEB_BIND_HOST MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dev gunicorn config hard-bound 127.0.0.1:8008, so the dev server was unreachable from any other device — even via the host's own LAN IP. Read the bind host/port from SOULSYNC_WEB_BIND_HOST / SOULSYNC_WEB_BIND_PORT (same vars the direct web_server.py run already uses), defaulting to the existing 127.0.0.1:8008. Default behavior is unchanged (localhost-only), so other devs notice nothing. To reach the dev server from another device on the LAN, opt in explicitly: SOULSYNC_WEB_BIND_HOST=0.0.0.0 python dev.py --- gunicorn.dev.conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gunicorn.dev.conf.py b/gunicorn.dev.conf.py index 43068ff3..026d003c 100644 --- a/gunicorn.dev.conf.py +++ b/gunicorn.dev.conf.py @@ -3,7 +3,11 @@ from pathlib import Path import os -bind = "127.0.0.1:8008" +# Localhost-only by default (a dev server shouldn't expose itself to the LAN +# without asking). To reach it from another device on your network, opt in with +# SOULSYNC_WEB_BIND_HOST=0.0.0.0 python dev.py +# then browse to http://:8008 (and allow port 8008 in the firewall). +bind = f"{os.environ.get('SOULSYNC_WEB_BIND_HOST', '127.0.0.1')}:{os.environ.get('SOULSYNC_WEB_BIND_PORT', '8008')}" worker_class = "gthread" workers = 1 threads = 4