HostRight

Application hosting

FastAPI and ASGI on HostRight

Understand the WSGI deployment boundary before running FastAPI or another ASGI framework with HostRight Control Panel and Phusion Passenger.

FastAPI compatibility

FastAPI is an ASGI framework. HostRight's HostRight Control Panel Python application interface currently expects WSGI applications through Phusion Passenger. A direct uvicorn or hypercorn process is not the same as a standard HostRight Python application.

For Django, Flask, Pyramid, Bottle, and custom WSGI projects, use the Python deployment guide.

Before choosing an adapter

An ASGI-to-WSGI adapter may allow a limited FastAPI application to run through a WSGI interface, but it can change or remove async behavior, streaming behavior, WebSockets, and performance characteristics. Test the complete application before relying on it.

FastAPI applications that need WebSockets, long-lived connections, async background work, or high concurrency should be reviewed with HostRight support before production deployment.

If you test a WSGI adapter

Keep the project private and configure HostRight Control Panel with:

Application root: apps/example-fastapi
Application startup file: passenger_wsgi.py
Application entry point: application

The startup file must expose a WSGI callable created by the adapter. The exact adapter and setup depend on the FastAPI version and project structure. Do not guess the import path from a Flask example.

Test:

python -c "import passenger_wsgi; print(passenger_wsgi.application)"
curl -I https://example.com

If the project requires a native ASGI server, use a hosting architecture that supports that process model or contact support for an approved deployment path.