This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
Migrating from uWSGI to Gunicorn and FastAPI¶
Why do we migrate away from uWSGI¶
Starting with Galaxy release 22.01 the default application webserver is Gunicorn, which replaces uWSGI. We will remove support for running Galaxy under uWSGI in Galaxy release 22.05. We have made this move because uWSGI support for newer Python versions has been problematic and because we have modernized the API portion of our backend. The Galaxy web application is now an ASGI application driven by FastAPI and Starlette. This will enable numerous important features in the future that would not be possible (or would be more complicated to set up) otherwise. Importantly, FastAPI’s documentation is very good and should increase developer productivity.
The main advantage for our users today is that Galaxy hosts documentation for its API as an OpenAPI document that is directly generated from Galaxy’s source code, and so will never be out of date or differ from the actual implementation. Note that not all API endpoints have been modernized as of yet, this is an ongoing process.
To see the API documentation for your Galaxy server you can go to
Another immediate advantage is that parameters to all incoming API requests are validated against a Pydantic schema.
This will lead to fewer subtle bugs and make it easier to interface with Galaxy’s API.
In the future we are going to use Websockets and asynchronous programming to increase the reactivity of the Galaxy user interface. This would not be as simple under uWSGI.
How do I upgrade my instance to use Gunicorn¶
If you are using
run.sh to start Galaxy and have not set up job handling via uWSGI mules,
you do not need to do anything to start Galaxy under Gunicorn.
If you are using uWSGI mules, please read the Scaling and Load Balancing documentation. You will most likely want to set up the Gunicorn + Webless strategy.
If you are using an upstream proxy server such as NGINX or Apache and you’ve been
using the uWSGI protocol, you need to replace
You can find detailed documentation in the NGINX and Apache
If you are managing your Galaxy server via Ansible, you can continue to run Galaxy under uWSGI while we are working on updating the Ansible roles for installing Galaxy. We will update instructions here and on the Galaxy Training Network.
If you are starting Web and Job Handlers using an external process manager like systemd or supervisor, please read the Scaling and Load Balancing documentation. In particular, you can use gravity to generate supervisor configuration files that you can either use directly or as a basis to update your existing configuration.