mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #257] Feature Request: Allow configuration of docker container hostname and name #176
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nurgus on GitHub (Sep 24, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/257
At the moment the app containers use docker containerid as a hostname and Wolf_xxxx as the container name and the same xxx as the default app_state_folder.. It'd be super nice if we could configure both in the config. We can set the storage via app_state_folder, be nice to have one variable substring of all 3 for each user.
The container's internal hostname appears when using steam link and steam's remote streaming, which is sometimes handy. At the moment it looks like this:
I know I can do all this manually for each user but it'd be nice to automate it.
@ABeltramo commented on GitHub (Sep 24, 2025):
This will be possible once https://github.com/games-on-whales/wolf/pull/179 will be finally finished and merged. We have proper users and lobbies support; the hostname can be something meaningful then..
@jeanpdoliveira commented on GitHub (Sep 9, 2026):
Adding a data point from a different angle than the Steam Link display name: the container hostname is not only cosmetic today, and it also leaks into the persistent Proton/Wine prefix, where it changes on every session.
Where it comes from
Wolf creates a new container per Moonlight session and the shipped app definitions do not set
Hostnameinbase_create_json. Docker's documented default then applies and the container hostname is the container ID, sogethostname()inside the container returns a different value every session.This is already configurable with no code change:
DockerAPI::create(src/core/src/platforms/all/docker/docker/docker.cpp) parsesbase_create_json, then overwrites onlyImageandExposedPorts, mergesEnv, and mergesBinds/Devicesplus setsPortBindingsinsideHostConfig. A top-levelHostnamereaches the Docker API untouched.Where it ends up
A new container means a new wineserver. When ntdll builds the parameters for the first Windows process in the prefix (
build_initial_params->run_wineboot,dlls/ntdll/unix/env.c) it tries to create\KernelObjects\__wineboot_event; in a fresh wineserver that event does not exist yet, so it runswineboot.exe --init.winebootthen callscreate_computer_name_keys()unconditionally frommain()(programs/wineboot/wineboot.c), before theinit || updategate. It readsgethostname()and callsSetComputerNameExA, which writes into the prefix registry:HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Hostname(persistent)HKLM\System\CurrentControlSet\Control\ComputerName\ComputerName(persistent, uppercased and truncated to 15 chars)HKLM\System\CurrentControlSet\Control\ComputerName\ActiveComputerName(volatile, repopulated on every boot from the persistent one), which is whatGetComputerNameW()reads backNet effect: the prefix under
app_state_folderpersists, but the Windows machine name recorded inside it is re-derived from an ephemeral container hostname on every stream.Measured
Same prefix (
compatdata/1874000, created 2026-09-05), before and after addingHostnametobase_create_json:The prefix was created on 09-05 but the key carries a 09-09 timestamp, so this is a rewrite on a later run, not a value set once at prefix creation. Across the 15 Proton prefixes in my
app_state_folder, that key held 12 distinct values before the change, all in Docker short-ID form. Same host, same install, same user account.For contrast, Valve already treats prefix machine identity as worth preserving: the
protonscript carriesHKLM\Software\Microsoft\Cryptography\MachineGuidacross prefix rebuilds (old_machine_guid, proton_9.0 lines 587 and 847-850). ComputerName is the one identifier it cannot stabilise, because Wine re-derives it from the kernel hostname instead of storing it.Why this matters beyond the display name
Any Windows software inside the prefix that folds
GetComputerNameW()into a machine fingerprint sees a brand new machine on every session, even though nothing on the host changed. Licensing implementations are the visible case: #248 has two users reporting activation lockouts of the "installed on too many machines" kind (2025-09-05 and 2025-11-26), both attributing it to switching Proton versions. I hit the same class of lockout on a legitimately owned title after 9 sessions in one day, with no Proton version change involved (singleconfig_info, no per-appCompatToolMapping).Being explicit about the evidence boundary:
winebootrewrites the prefix keys from it on every run, my prefixes held 12 distinct values, and settingHostnamestops the churn.One constraint on the shape of the fix
A single global constant would be the wrong answer.
src/moonlight-server/audio/pulse_router.cppkeys its routing map on the container hostname (host_to_session.set(ev.hostname, ev.session_id)). Two concurrent containers sharing one hostname would collide there and the second would overwrite the first mapping.What satisfies both is a hostname stable across sessions of the same profile and unique across concurrent profiles, for example derived from the profile id. That matches the "something meaningful" @ABeltramo described once users and lobbies existed, and it would give the audio router a key that no longer depends on a value Docker randomises per container.
As a local workaround for a single-session setup, a fixed value in
base_create_jsonworks today, keeping it to 15 characters or fewer since the NetBIOS name is truncated there:Happy to send a docs PR describing the current behaviour and this constraint.