Document listening on a unix socket #928

Closed
opened 2025-11-02 03:42:00 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @MTecknology on GitHub (Jul 30, 2017).

It seems that it's only possible to run gitea on a tcp socket. For some configuration deployments, it would be better if gitea could be configured to listen on a unix socket, ideally using something like the wsgi protocol.

Originally created by @MTecknology on GitHub (Jul 30, 2017). It seems that it's only possible to run gitea on a tcp socket. For some configuration deployments, it would be better if gitea could be configured to listen on a unix socket, ideally using something like the wsgi protocol.
GiteaMirror added the type/docs label 2025-11-02 03:42:00 -06:00
Author
Owner

@silverwind commented on GitHub (Jul 30, 2017):

Why wgsi over a plain http+unix or https+unix socket? Any benefits?

@silverwind commented on GitHub (Jul 30, 2017): Why wgsi over a plain `http+unix` or `https+unix` socket? Any benefits?
Author
Owner

@silverwind commented on GitHub (Jul 30, 2017):

Also, I think this is already supported as of https://github.com/gogits/gogs/pull/2852 by setting HTTP_ADDR to a path and possibly adjusting UNIX_SOCKET_PERMISSION. Should be documented better.

@silverwind commented on GitHub (Jul 30, 2017): Also, I think this is already supported as of https://github.com/gogits/gogs/pull/2852 by setting `HTTP_ADDR` to a path and possibly adjusting `UNIX_SOCKET_PERMISSION`. Should be documented better.
Author
Owner

@MTecknology commented on GitHub (Jul 30, 2017):

If it already exists as http{,s}+unix, that sounds good to me. I didn't find it documented anywhere so I assumed it didn't exist.

@MTecknology commented on GitHub (Jul 30, 2017): If it already exists as http{,s}+unix, that sounds good to me. I didn't find it documented anywhere so I assumed it didn't exist.
Author
Owner

@silverwind commented on GitHub (Jul 30, 2017):

This works for me:

PROTOCOL = unix
HTTP_ADDR = /tmp/gitea
UNIX_SOCKET_PERMISSION = 666

Looks like it only supports http+unix, so I could see it being improved to also support https+unix.

@silverwind commented on GitHub (Jul 30, 2017): This works for me: ``` PROTOCOL = unix HTTP_ADDR = /tmp/gitea UNIX_SOCKET_PERMISSION = 666 ``` Looks like it only supports http+unix, so I could see it being improved to also support https+unix.
Author
Owner

@MTecknology commented on GitHub (Jul 30, 2017):

Awesome! Should I leave this open as a documentation request or should I go ahead and close this?

@MTecknology commented on GitHub (Jul 30, 2017): Awesome! Should I leave this open as a documentation request or should I go ahead and close this?
Author
Owner

@silverwind commented on GitHub (Jul 30, 2017):

I'd leave it open for documentation.

@silverwind commented on GitHub (Jul 30, 2017): I'd leave it open for documentation.
Author
Owner

@silverwind commented on GitHub (Jul 30, 2017):

Noteable issue with unix sockets: https://github.com/go-gitea/gitea/issues/2232

@silverwind commented on GitHub (Jul 30, 2017): Noteable issue with unix sockets: https://github.com/go-gitea/gitea/issues/2232
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#928