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

Add basic socket activation support #717

Closed
wants to merge 1 commit into from

Conversation

trchen1033
Copy link

Hello Eric,
I wrote a proof-of-concept implementation to support systemd socket activation. The motivation is is that I use an Nginx reverse proxy to host Moonraker and Fluidd under the same CORS domain, and I also want Nginx to handle TLS so I can easily integrate certbot.
There are some other advantages with socket activation:

  • Can listen to privileged ports without running as root
  • Unix socket support (or any arbitrary kind of SOCK_STREAM) comes for free, and we avoid the subtleties around setting up ownership and umask for the newly created socket.
  • Seamless service restart

This implementation is only a quick hack, least resistance path towards my use case. I would like to chat with you before jumping into a full implementation. Specifically there are a few issues I want to hear your opinion about:

  • Do we want to support TLS with it?
  • Do we want socket activation for the JSON-RPC socket as well?
  • How should we provide backward compatibility if we add new config option to listen to arbitrary number of sockets?
  • How should we handle Server.get_host_info(), HTTP Location header and generally other things that need to be aware of the server's published address?

@Arksine
Copy link
Owner

Arksine commented Sep 6, 2024

Hi. Unfortunately I missed this PR and its nearly 1 year old now. As you mention, there are issues internally with moonraker that would need to be addressed to support systemd socket activation. At this time I believe that its best to leave things as they are, however I'm open to further discussion. In the meantime I'll close this PR, however its fine to post in it and go into further detail about a fully integrated proposal.

@Arksine Arksine closed this Sep 6, 2024
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.

2 participants