Where is the gunicorn socket located?

hello, I followed the tutorials: Production, Scaling and Load Balancing and Proxy to create a Production Galaxy Instance.

I am trying to bind everything to the Gunicorn socket while using a Proxy with Nginx. But I do not know if I am making a mistake in the configuration files. I tried to Google the issue and consulted the Gunicorn official documentation.
What is the path to the Gunicorn supposed to be? I searched in: /etc/, /run/, /var/, /tmp/ and so on. My Galaxy instance is on a different “galaxy” user. Binding by IP on port 8080 works very well, but I am trying to bind by socket to access the server by a subdomain, like the tutorial “galaxy.example.org” while also securing with lets encrypt.

Thank you!

Could you explain more about this part? Please also let us know which version of Galaxy you are running.

And, let’s cross post this over to the Admin chat for expert help. They may reply here or there, and feel free to join the chat! You're invited to talk on Matrix

Thanks for the reply!

What I mean is that my galaxy instance is created on a different user called “galaxy”, as instructed in the tutorials, to avoid manipulation by root. I am on version 22.05.

At the moment I am trying to somehow find or create the socket file, maybe that will solve my issues.

In Galaxy 22.05 this would be controlled by the value of gravity.gunicorn.bind in galaxy.yml:

    bind: localhost:8080

To set to a unix domain socket, use:

    bind: unix:/path/to/gunicorn.sock

You can set the path to whatever makes sense in your case. In the Installing Galaxy with Ansible training we set this to /srv/galaxy/var/config/gunicorn.sock, but whether this directory makes sense for you depends on how you have deployed Galaxy.

Wait, so I just simply set a path? Doesn’t it have to be a path to where there is a .sock file? I mean, is the socket file supposed to be automatically generated or do I just specify the path? I think this my confusion.

Ah! Yes, you just set a path, gunicorn creates the socket on startup. This will need to match the path you specify in the nginx config, but gunicorn is what will create it.

1 Like

Well, that fixed everything. I’ve been searching like crazy for that .sock path not knowing that it is automatically generated.

My fault for being a total beginner in this area. Still, the problem is solved.

Thank you!

1 Like

No worries, glad you’ve got it working!