app object and aliases it as application.
For the underlying tool, see Python.
Before you begin
- A Python app created in cPanel, version 3.10 or 3.11.
- The app root contains your Flask code (e.g.
app.pydefiningapp = Flask(__name__)). - A
requirements.txtlisting Flask and your other packages.
Wire up Passenger
Create passenger_wsgi.py
passenger_wsgi.py
flask_app = Flask(__name__)), alias it: from app import flask_app as application.Strip the dev server
Most Flask tutorials end with:if __name__ block, or remove it. It’s never executed under Passenger anyway. Just don’t call app.run() at module top level.
Common issues
500: 'did not provide an application callable'
500: 'did not provide an application callable'
passenger_wsgi.py doesn’t expose application. Check the import line: from app import app as application.ImportError on a package you just pip-installed
ImportError on a package you just pip-installed
Pip ran against the system Python, not the per-app virtualenv. Install via the cPanel Run Pip Install button, or activate the env first in SSH.
Changes don't show up after editing the code
Changes don't show up after editing the code
Passenger caches the loaded modules. Restart with the Restart button or
touch tmp/restart.txt.Need a hand?
Open a ticket
Best for anything that needs an account check or a config change on our end.
Live chat
Faster for quick questions during business hours.

