Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: document unix socket binding #766

Open
sielicki opened this issue Dec 6, 2023 · 4 comments
Open

request: document unix socket binding #766

sielicki opened this issue Dec 6, 2023 · 4 comments

Comments

@sielicki
Copy link

sielicki commented Dec 6, 2023

unix socket binding was added in jellyfin/jellyfin#3532 (and extended in further commits(?)) by @daullmer, but requires setting specific Kestrel environment variables which are not immediately obvious. Document this properly.

@sielicki
Copy link
Author

sielicki commented Dec 6, 2023

        /// <summary>
        /// The key for a setting that indicates whether kestrel should bind to a unix socket.
        /// </summary>
        public const string BindToUnixSocketKey = "kestrel:socket";

        /// <summary>
        /// The key for the unix socket path.
        /// </summary>
        public const string UnixSocketPathKey = "kestrel:socketPath";

        /// <summary>
        /// The permissions for the unix socket.
        /// </summary>
        public const string UnixSocketPermissionsKey = "kestrel:socketPermissions";

jellyfin/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs                                                                                                                      ```

@sielicki
Copy link
Author

sielicki commented Dec 6, 2023

Per https://jellyfin.org/docs/general/administration/configuration/

Environment variables: The documentation provided by Microsoft explains how to set these configuration options via environment variables. Jellyfin uses its own custom JELLYFIN_ prefix for these variables. For example, to set a value for the HttpListenerHost:DefaultRedirectPath setting, you would set a value for the JELLYFIN_HttpListenerHost__DefaultRedirectPath environment variable.

So the above would be:

  • JELLYFIN_kestrel__socketPermissions
  • JELLYFIN_kestrel__socketPath
  • JELLYFIN_kestrel__socket

Not immediately obvious what values are expected to bind here and how parsing works, though. Is it JELLYFIN_kestrel__socket=1? JELLYFIN_kestrel__socket=YES? JELLYFIN_kestrel__socket=true? JELLYFIN_kestrel__socketPermissions=0777? etc.

@sielicki
Copy link
Author

    "JELLYFIN_kestrel__socketPermissions=0777"
    "JELLYFIN_kestrel__socketPath=${socketPath}"
    "JELLYFIN_kestrel__socket=true"

This is what is working for me.

@felix920506
Copy link
Member

Hi, Please just make the edits and submit a PR to this repo if you already got it to work.

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

No branches or pull requests

2 participants