Skip to content

fix: update feature for current gmuxd config model#2

Merged
mgabor3141 merged 1 commit into
mainfrom
fix-config-compat
Apr 4, 2026
Merged

fix: update feature for current gmuxd config model#2
mgabor3141 merged 1 commit into
mainfrom
fix-config-compat

Conversation

@mgabor3141
Copy link
Copy Markdown
Contributor

@mgabor3141 mgabor3141 commented Apr 4, 2026

The gmuxd config model changed (config.toml → host.toml, [network] section removed, bind address moved to GMUXD_LISTEN env var). The feature was writing the old format, which gmuxd now rejects at startup due to strict unknown-key validation.

Also fixes a port mismatch bug: the old entrypoint health-checked port 8790 but the config bound to 8791, so the "already running" check never succeeded.

Changes

Config approach: removed config file generation entirely. The bind address is now set via containerEnv in the feature JSON (GMUXD_LISTEN=0.0.0.0), which is the proper mechanism for devcontainer features. No host.toml is written; gmuxd uses all defaults.

Port: 8791 → 8790 (the default). Containers have their own network namespace, so there's no port conflict inside the container. For VS Code port forwarding, it auto-resolves conflicts if the host port is taken. Using the default port means zero config.

Entrypoint: simplified. The old entrypoint copied a bundled config file to the user's config dir on first boot. With env vars handling the bind address, the entrypoint just starts gmuxd.

Docs:

  • gmuxd auth-linkgmuxd auth (the command that actually exists)
  • Dead link to /develop/network-listener/security/
  • Added GMUXD_TOKEN section showing how to pre-provision a known token via containerEnv in devcontainer.json
  • Peer discovery section reworded to reflect planned (not implemented) status

Version: 1.0.0 → 1.1.0

Supersedes #1. The remote user handling and post-attach auth notice from that PR are worth doing but are improvements, not fixes for the broken config. They can be follow-ups.

Known limitation

gmuxd runs as root (the container's default user). In devcontainer images that use a non-root remote user (e.g. vscode), running gmuxd auth from a terminal inside the container won't find the Unix socket. Browser access via port forwarding works fine, and docker exec <container> gmuxd auth (which runs as root) also works. Running gmuxd as the remote user requires baking _REMOTE_USER into the entrypoint at install time, which is a follow-up.

Breaking changes from the gmuxd config restructure:
- config.toml was renamed to host.toml
- [network] section removed; bind address is now GMUXD_LISTEN env var
- Port is a top-level field, not nested under [network]
- gmuxd rejects unknown config keys, so the old format fails at startup

Changes:
- Remove config file generation entirely. Use GMUXD_LISTEN=0.0.0.0
  via containerEnv instead of writing a host.toml.
- Use default port 8790 (was 8791). Containers have their own network
  namespace so there's no conflict; VS Code auto-resolves host port
  conflicts when forwarding.
- Simplify entrypoint: no config copy dance, just start gmuxd.
- Fix gmuxd auth-link (doesn't exist) to gmuxd auth.
- Fix dead link to /develop/network-listener (deleted).
- Add GMUXD_TOKEN documentation for pre-provisioned tokens.
- Bump version to 1.1.0.
@mgabor3141 mgabor3141 merged commit 63c7bcc into main Apr 4, 2026
3 of 4 checks passed
@mgabor3141 mgabor3141 deleted the fix-config-compat branch April 4, 2026 17:33
mgabor3141 added a commit to gmuxapp/gmux that referenced this pull request Apr 4, 2026
Small update to the Peer Discovery & Aggregation planned page to reflect
the current state of the devcontainer feature:

- Container discovery signal is `devcontainer.metadata` label (from the
devcontainer spec), not a custom `gmux.peer=true` label
- Feature uses `GMUXD_LISTEN=0.0.0.0` via `containerEnv`, not a config
file
- Document two approaches for host-side token acquisition: `GMUXD_TOKEN`
for managed lifecycle, `docker exec gmuxd auth` for existing containers
- Fix Tailscale capitalization

Companion to gmuxapp/features#2 which fixes the feature itself.
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