Skip to content

feat(cli): configurable bind host (--host flag + config host field) - #5

Open
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:feat/configurable-bind-host
Open

feat(cli): configurable bind host (--host flag + config host field)#5
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:feat/configurable-bind-host

Conversation

@addadi

@addadi addadi commented Aug 20, 2026

Copy link
Copy Markdown

What

Bind address was hardcoded to 127.0.0.1. This adds:

  • Config.host JSON field (default 127.0.0.1; empty value falls back to default)
  • --host <addr> CLI flag
  • Precedence: CLI --host > config file host > default — mirrors the existing --port behavior
  • Startup log / listen error messages now include the resolved host

Why

Multi-host and container deployments (e.g. reaching the server from another host or a container bridge) previously required a recompile to change the bind address. --port was already configurable; --host was the missing half.

Validation

  • zig build clean
  • zig build test green (new tests: default host, config-file host parse, host-unset keeps default)
  • Manual run: nulltickets --host 127.0.0.2 --port 7799 binds and serves /health on the given address

No behavior change for existing deployments: without --host and without a config host key, the server still binds 127.0.0.1.

Server previously hardcoded 127.0.0.1. Multi-host/container deployments
had to recompile to change the bind address.

- Config.host (JSON config, default 127.0.0.1, empty falls back to default)
- --host CLI flag; precedence CLI > config file > default, mirroring --port
- listen/log messages include the resolved host
- tests: default host, config-file host parse, host-unset keeps default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant