Skip to content

fix(identity): a Docker container id is not a server name - #410

Merged
jeffcrouse merged 1 commit into
mainfrom
fix/container-hostname-name
Oct 13, 2026
Merged

jeffcrouse merged 1 commit into
mainfrom
fix/container-hostname-name

Conversation

@jeffcrouse

Copy link
Copy Markdown
Member

In Docker, socket.gethostname() is the container id, so /contract and the Bonjour TXT record called the NAS 8720566297e5, and the phone shows exactly that ("Needs 8720566297e5"). A hostname that is exactly twelve lowercase hex characters now falls back to "Familiar". A server_name set in settings still wins.

Phones pick up the new name on their next contract check (ServerConfiguration.checkContract stores any name that differs).

  • New test test_a_docker_container_id_is_not_a_name. It fails against the old server_identity.py and passes with the fix.

🤖 Generated with Claude Code

A container with no `hostname:` is named after the first twelve hex digits of its id, and
`_host_name()` passed that straight through as `server_name`. The phone showed
"Needs 8720566297e5" while away, and re-learned a new name on every recreate. Such a host now
falls back to "Familiar"; a chosen `server_name` still wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffcrouse
jeffcrouse merged commit 2533961 into main Oct 13, 2026
29 of 31 checks passed
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