I have a Galaxy instance behind an NGINX reverse-proxy protected by SSL, i.e. HTTPS. I try to use Bioblend to get access to Galaxy through the reverse proxy but I have SSL errors.
Python 3.13.7 | packaged by conda-forge | (main, Sep 3 2025, 14:33:26) [Clang 19.1.7 ] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>> from bioblend.galaxy import GalaxyInstance
gi = GalaxyInstance(‘localhost’, key=‘XXX’, verify=‘XXX/fullchain.pem’)
libs = gi.libraries.get_libraries()
Traceback (most recent call last):
File “”, line 1, in
libs = gi.libraries.get_libraries()
File “/opt/anaconda3/envs/bioblend/lib/python3.13/site-packages/bioblend/galaxy/libraries/init.py”, line 317, in get_libraries
libraries = self._get(params={“deleted”: deleted})
File “/opt/anaconda3/envs/bioblend/lib/python3.13/site-packages/bioblend/galaxy/client.py”, line 162, in _get
raise ConnectionError(
…<3 lines>…
)
bioblend.ConnectionError: HTTPSConnectionPool(host=‘localhost’, port=443): Max retries exceeded with url: /api/libraries?deleted=False (Caused by SSLError(SSLCertVerificationError(1, “[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for ‘localhost’. (_ssl.c:1032)”))), 0 attempts left:
In short, Bioblend is checking for the HOST URL the certificate was registered under, then that is mapped to where you keep Galaxy itself (same location or different).
Does this help? I asked the Admins to double check my advice! They will reply back here (to better document the conversation), but this is the cross-post as a reference. Thanks!
About the certificate, it is stored on the proxy and registered for localhost since my instance is available under https://localhost, which is forwarded to http://local-docker-ip:8080 by the proxy. the bind value in galaxy.yml is 0.0.0.0:8080.
I have no prefix, Galaxy is served from /.
I have no problem with the reverse proxy itself, it works well. My problem is to access it with Bioblend.
To double-check I ran the following command on my certificate:
Oh, ok, because it looks like what was quoted didn’t include the https:// part of the address! All good. I’ve decided to ask the people who create the container for feedback. Let’s keep the conversation here (the forum is preferred for Q&A) but as a reference this is where I posted.
My guess is still that the PROXY_PREFIX is involved when working with the container, and possibly required, but they can confirm and advise.
ps: Thanks for the kind comments! I’m just summarizing our group’s combined experience.
AH, ok, then you might want to review how the docker-galaxy was served. There are nested dockers! Using a proxy path is likely required to redirect to the where Galaxy actually lives.