Repository navigation
Let envd listen on a Unix socket - #118
Open
cptspacemanspiff wants to merge 1 commit into
Open
cptspacemanspiff wants to merge 1 commit into
cptspacemanspiff wants to merge 1 commit into
Conversation
cptspacemanspiff
marked this pull request as ready for review
October 13, 2026 01:16
A host that reaches the daemon over a local bridge rather than the network, such as a microVM whose socket is relayed over vsock, needs envd to serve a Unix socket. LIGHTSPEED_ENVD_LISTEN (--listen) now accepts unix:///absolute/path alongside host:port and tcp://host:port. - The daemon creates the socket's parent directory, binds the socket and restricts it to its own user (0600). - A socket left behind by an earlier run is replaced only when connecting to it is refused; a live listener, a socket the daemon cannot probe, or any other file at the path is left alone. - Accept errors on the TCP and Unix listeners are logged and the listener keeps serving instead of stopping the daemon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Long <19273992+cptspacemanspiff@users.noreply.github.com>
cptspacemanspiff
force-pushed
the
envd-unix-listener
branch
from
October 13, 2026 01:17
2933bd9 to
5a3a4fe
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have started working on a new environment provider wrapping SmolVM (I want to have something I can run cross-platform, and that seems to have that abstraction, and on user machines). As part of this I want to have the ability to fully lock-down the VM's network access, so envd only allowing TCP endpoints is an issue. To solve this I add the ability to use a unix domain socket as the endpoint, which a VM runtime can connect to from the other side.
For context here is the current (rough) additional provider: https://github.com/cptspacemanspiff/lightspeed-provider-smolvm
The only thing not directly related to unix domain socket, addition was that instead of crashing envd on 'out of file descriptors' or 'connect' errors, there is a sleep + error log, so that deamon and it's existing session connections won't get killed if there is something goes wrong with a new connection.
From Claude:
A host that reaches the daemon over a local bridge rather than the network, such as a microVM whose socket is relayed over vsock, needs envd to serve a Unix socket.
LIGHTSPEED_ENVD_LISTEN(--listen) now acceptsunix:///absolute/pathalongsidehost:portandtcp://host:port.Changes
environment-variables.mddocuments the newunix://form.🤖 Generated with Claude Code